incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Tisdall <>
Subject purging documents?
Date Fri, 18 May 2012 16:12:25 GMT
I accidentally created several million documents in my DB which I'd like to
undo.  ^_^  I know I can query each document to get the revision and then
issue a DELETE, but that seems like a lot of additional work.  Also, the
wiki says "Deleted documents remain in the database forever, even after
compaction, to allow eventual consistency when replicating." and that's a
lot of dead space.  Is there a way that I can purge all of those documents
given that I have the _ids that they were saved under?  I essentially would
like to return the DB to a state before I inserted all of those documents.

I'm also going to be inserting updated documents to the DB with those same
_ids, so another alternative is to post updates to each (but that would
also require getting the revision ids) and then clearing out old revisions.
 However, this would require fetching several million revision ids and then
figuring out how to force the DB to clear out all old revisions.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message