I have the problem that I like to “automagically” delete documents in my couch, which are at least 6 month old.
My CouchDb instance runs on a linux server, is there any way to achieve this quite simple (like writing a simple 2-line shell script) ?
I have the problem that I like to automagically delete documents in my couch,
Share
You can write an update function in couchdb that deletes a doc on certain criteria ( you can use params while calling the function) :
http://wiki.apache.org/couchdb/Document_Update_Handlers#Creating_an_Update_Handler
(look at “in-place” and imagine setting “_delete:true”).
something like
and calling
…db/_design/updatefuncdesigndoc/_update/deletefunc/dok_id_x?mindate=20110816
The only work is: calling each doc in a database explicit with this function (calling _all_docs or _changes first)