couch-to-postgres icon indicating copy to clipboard operation
couch-to-postgres copied to clipboard

SQL DELETE - document functionality

Open sysadminmike opened this issue 10 years ago • 1 comments

Do with bulk updates setting doc._deleted flag to true

Should be straight forward to do once bulk function in place - as this can be then done with

json_object_set_key(doc::json, '_deleted'::text, true):

Make a function to help which just gets passed the doc id and rev plus array of fields to keep in the deleted doc so not upset anyone with elastic search couch river (https://github.com/elasticsearch/elasticsearch-river-couchdb - Indexing Databases with Multiple Types)

ie bulk submit needs to be something like: "docs" : [{ "_id: 2, "_rev" : "rev", "_deleted" : true, "type" : "Person" }]'

sysadminmike avatar Dec 17 '14 19:12 sysadminmike

Add example delete to readme

sysadminmike avatar Dec 17 '14 19:12 sysadminmike