# Deletions via couchdb river seem to be ignored

**URL:** <https://discuss.elastic.co/t/deletions-via-couchdb-river-seem-to-be-ignored/4876>\
**Category:** Elasticsearch\
**Created:** [July 16, 2011, 11:04am UTC](https://discuss.elastic.co/t/deletions-via-couchdb-river-seem-to-be-ignored/4876 "2011-07-16T11:04:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Richard\_Marr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/richard_marr/32/2601_2.png) [@Richard\_Marr](https://discuss.elastic.co/u/Richard_Marr)\
**Post date:** [July 16, 2011, 11:04am UTC](https://discuss.elastic.co/t/deletions-via-couchdb-river-seem-to-be-ignored/4876/1 "2011-07-16T11:04:26Z")

</div>

Hi all,

I'm using ES in combination with CouchDB and have come across a hiccup that  
I haven't managed to solve.

The CouchDB River plugin for ES worked perfectly for me right up until the  
point where I started allowing documents to be deleted in my app. The  
deletes are visible in Couch's change log, but don't seem to  
be propagating to ES. The ES log doesn't seem to contain anything  
enlightening and a cursory glance through the plugin source code hasn't  
helped. Subsequent writes to CouchDB are picked up correctly and deleting  
those docs directly via HTTP works fine.

Is this familiar to anyone or am I going to have to get my debugging pants  
on?

--  
Richard Marr

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [July 17, 2011, 6:30pm UTC](https://discuss.elastic.co/t/deletions-via-couchdb-river-seem-to-be-ignored/4876/2 "2011-07-17T18:30:14Z")

</div>

strange, I haven't heard of a user noticing that, and did not see something  
like that in my tests... . One thing you can do is set in the logging.yml  
file `river.couchdb` to TRACE, it will log all the operations received and  
executed from the \_changes stream

On Sat, Jul 16, 2011 at 2:04 PM, Richard Marr [richard.marr@gmail.com](mailto:richard.marr@gmail.com)wrote:

> Hi all,
> 
> I'm using ES in combination with CouchDB and have come across a hiccup that  
> I haven't managed to solve.
> 
> The CouchDB River plugin for ES worked perfectly for me right up until the  
> point where I started allowing documents to be deleted in my app. The  
> deletes are visible in Couch's change log, but don't seem to  
> be propagating to ES. The ES log doesn't seem to contain anything  
> enlightening and a cursory glance through the plugin source code hasn't  
> helped. Subsequent writes to CouchDB are picked up correctly and deleting  
> those docs directly via HTTP works fine.
> 
> Is this familiar to anyone or am I going to have to get my debugging pants  
> on?
> 
> --  
> Richard Marr

---

<div class="post-metadata">

**Author:** ![jeannette](https://avatars.discourse-cdn.com/v4/letter/j/f9ae1b/32.png) [@jeannette](https://discuss.elastic.co/u/jeannette)\
**Post date:** [December 5, 2011, 5:17pm UTC](https://discuss.elastic.co/t/deletions-via-couchdb-river-seem-to-be-ignored/4876/3 "2011-12-05T17:17:40Z")

</div>

I am experiencing the same issue. I appears the type is ignored.

curl -XPUT [http://localhost:5984/report\_product](http://localhost:5984/report_product) -d '{  
"\_id": "\_design/river",  
"filters": {  
"bytype": "function(doc, req) { if (doc.reporttype && req.query.reporttype) {if (doc.reporttype == req.query.reporttype) {return true;}} return false; }"  
}  
}'

curl -XPUT 'localhost:9200/\_river/ra/\_meta' -d '{  
"type": "couchdb",  
"couchdb": {  
"host": "localhost",  
"port": 5984,  
"db": "report\_product",  
"filter": "river/bytype",  
"filter\_params": {  
"reporttype": "ra"  
}  
},  
"index": {  
"index": "report\_product",  
"type": "ra"  
}  
}'

Note: I have also tried scripts on the river.. did not delete either, so I went with the above to specify type and index.

info] [\<0.2063.0\>] 127.0.0.1 - - 'GET' /report\_product/\_changes?feed=continuous&include\_docs=true&heartbeat=10000&filter=river%2Fbytype&reporttype=ra 200  
[info] [\<0.1677.0\>] 127.0.0.1 - - 'GET' /report\_product/\_changes?filter=river%2Fbytype&reporttype=fintel 200  
[info] [\<0.1677.0\>] 127.0.0.1 - - 'GET' /report\_product/\_changes?filter=river%2Fbytype&reporttype=ra 200  
[info] [\<0.1677.0\>] 127.0.0.1 - - 'GET' /report\_product/\_all\_docs?startkey=%22\_design%2F%22&endkey=%22\_design0%22&include\_docs=true 200  
...  
[info] [\<0.1677.0\>] 127.0.0.1 - - 'DELETE' /report\_product/481209903bb0460498f7cfc095009e34?rev=2-12366b50b040fbc244b6d25ad1bb123a 200

Changes..

{"results":[  
{"seq":4,"id":"\_design/river","changes":[{"rev":"2-1882c953f3a2f59c434584f1ca79fb2c"}]},  
{"seq":5,"id":"481209903bb0460498f7cfc095009e34","changes":[{"rev":"3-bec473db9bd0a6825f355063bb4f2708"}],"deleted":true}  
],  
"last\_seq":5}

any ideas?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 3:46am UTC](https://discuss.elastic.co/t/deletions-via-couchdb-river-seem-to-be-ignored/4876/4 "2017-07-06T03:46:24Z")

</div>


