couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kowsik <>
Subject Deleting docs using view
Date Sat, 22 Jan 2011 05:55:13 GMT
This is a feature request. Is it possible to add a DELETE command to
the views? Something like

DELETE /db/_design/foo/_view/bar?<view-params>

What I'm looking for is a way to bulk delete the docs that match the
views without having to fetch the doc _id's and _rev's first before
bulk deleting them. Saves a round trip if Couch can just take the
latest revision of the docs that match the query and bulk delete them.
Similar to what's described in this gist:

One issue that I can think about is there might be multiple emit's for
each doc so Couch has to do additional work to uniquify the _id's
before deleting them, but this would dramatically simplify the client
requesting this.

Dunno how hard this is to implement.



View raw message