# CouchDB Integration Issues

**URL:** <https://discuss.elastic.co/t/couchdb-integration-issues/5219>\
**Category:** Elasticsearch\
**Created:** [August 22, 2011, 2:23pm UTC](https://discuss.elastic.co/t/couchdb-integration-issues/5219 "2011-08-22T14:23:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jramirez](https://avatars.discourse-cdn.com/v4/letter/j/e95f7d/32.png) [@jramirez](https://discuss.elastic.co/u/jramirez)\
**Post date:** [August 22, 2011, 2:23pm UTC](https://discuss.elastic.co/t/couchdb-integration-issues/5219/1 "2011-08-22T14:23:54Z")

</div>

Hi, I'm having trouble integrating elasticsearch with couchdb.

I followed the instructions here: [couchdb-integration](http://www.elasticsearch.org/tutorials/2010/08/01/couchb-integration.html) but when searching (curl -XGET [http://localhost:9200/doc\_es\_idx/\_search](http://localhost:9200/doc_es_idx/_search) -d '{}') I get this error message:

{"error":"IndexMissingException[[doc\_es\_idx] missing]","status":404}

I've checked other posts and documentation and found a way to get the river status: curl -XGET '[http://localhost:9200/\_river/doc\_es\_idx/\_status](http://localhost:9200/_river/doc_es_idx/_status)' and I'm getting this error:

{"\_index":"\_river","\_type":"doc\_es\_idx","\_id":"\_status","\_version":1,"exists":true, "\_source" : {"error":"NoClassSettingsException[Failed to load class with value [couchdb]]; nested: ClassNotFoundException[couchdb]; ","node":{"id":"cy4GWzNlSTqkYvLETwC6DQ","name":"Gibborim","transport\_address":"inet[/10.0.2.15:9300]"}}}

I'm not sure what could have gone wrong. I've installed elasticsearch (0.17.6) & couchdb (1.0.1), both are up and running. I've also installed the couchdb-river without problems.

I created the river like this:

curl -XPUT '[http://127.0.0.1:9200/\_river/doc\_es\_idx/\_meta](http://127.0.0.1:9200/_river/doc_es_idx/_meta)' -d '{"type":"couchdb","couchdb":{"host":"localhost","port":5984,"db":"documents\_db","filter":null},"index":{"index":"doc\_es\_idx","type":"doc\_es\_type","bulk\_size":"100","bulk\_timeout":"10ms"}}'

Any help getting this solved will be really appreciated.

---

<div class="post-metadata">

**Author:** ![jramirez](https://avatars.discourse-cdn.com/v4/letter/j/e95f7d/32.png) [@jramirez](https://discuss.elastic.co/u/jramirez)\
**Post date:** [August 23, 2011, 5:43pm UTC](https://discuss.elastic.co/t/couchdb-integration-issues/5219/2 "2011-08-23T17:43:17Z")

</div>

This is an update from my previous post. I decided to start all over again so I deleted all in elasticsearch, reinstalled the couch river plugin and created a new river like this:

curl -XPUT '[http://elasticsearch-host:9200/\_river/documents\_db\_river/\_meta](http://elasticsearch-host:9200/_river/documents_db_river/_meta)' -d '{  
"type" : "couchdb",  
"couchdb" : {  
"host" : "localhost",  
"port" : 5984,  
"db" : "documents\_db",  
"filter" : null  
}  
}'

So now I think the main problem I have is with the queries, for example look at this search:

curl -XGET [http://localhost:9200/\_river/documents\_db\_river/\_search](http://localhost:9200/_river/documents_db_river/_search) -d '{}'

{"took":3,"timed\_out":false,"\_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":3,"max\_score":1.0,"hits":[{"\_index":"\_river","\_type":"documents\_db\_river","\_id":"\_meta","\_score":1.0, "\_source" : {  
"type" : "couchdb",  
"couchdb" : {  
"host" : "localhost",  
"port" : 5984,  
"db" : "documents\_db",  
"filter" : null  
}  
}},{"\_index":"\_river","\_type":"documents\_db\_river","\_id":"\_status","\_score":1.0, "\_source" : {"ok":true,"node":{"id":"hnuszK\_cQu6GWZanGPiyZQ","name":"Brant, Betty","transport\_address":"inet[/10.0.2.15:9300]"}}},{"\_index":"\_river","\_type":"documents\_db\_river","\_id":"\_seq","\_score":1.0, "\_source" : {"couchdb":{"last\_seq":"4"}}}]}}

And I have 4 documents in my database so I know some how elastic search is able to access my db in couch.

If I try this search:

curl -XGET [http://localhost:9200/documents\_db/documents\_db\_river/\_search](http://localhost:9200/documents_db/documents_db_river/_search) -d '{}'

I get:

{"took":6,"timed\_out":false,"\_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":0,"max\_score":null,"hits":[]}}

So, things look better know, at least I'm not getting exceptions, and I'm sure elasticsearch is able to see my couchdb, the only problem I have is that I'm not getting any hits, I tried specific queries and I still get zero hits.

Anyone can help me with this?

---

<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:** [August 26, 2011, 2:29pm UTC](https://discuss.elastic.co/t/couchdb-integration-issues/5219/3 "2011-08-26T14:29:03Z")

</div>

> curl -XGET [http://localhost:9200/documents\_db/documents\_db\_river/\_search](http://localhost:9200/documents_db/documents_db_river/_search)  
> -d  
> '{}'

You are searching against and index called documents\_db, and a type called  
documents\_db\_river in elasticsearch.

By default, both the index and the type for the couchdb river will default  
to the couchdb db name. So, something like this should work:

curl -XGET [http://localhost:9200/documents\_db/documents\_db/\_search](http://localhost:9200/documents_db/documents_db/_search)[http://localhost:9200/documents\_db/documents\_db\_river/\_search](http://localhost:9200/documents_db/documents_db_river/_search)  
-d  
'{}'

On Tue, Aug 23, 2011 at 8:43 PM, jramirez [jose.alb@gmail.com](mailto:jose.alb@gmail.com) wrote:

> This is an update from my previous post. I decided to start all over again  
> so I deleted all in elasticsearch, reinstalled the couch river plugin and  
> created a new river like this:
> 
> curl -XPUT '[http://elasticsearch-host:9200/\_river/documents\_db\_river/\_meta](http://elasticsearch-host:9200/_river/documents_db_river/_meta)  
> '  
> -d '{  
> "type" : "couchdb",  
> "couchdb" : {  
> "host" : "localhost",  
> "port" : 5984,  
> "db" : "documents\_db",  
> "filter" : null  
> }  
> }'
> 
> So now I think the main problem I have is with the queries, for example  
> look  
> at this search:
> 
> curl -XGET [http://localhost:9200/\_river/documents\_db\_river/\_search](http://localhost:9200/_river/documents_db_river/_search) -d '{}'
> 
> {"took":3,"timed\_out":false,"\_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":3,"max\_score":1.0,"hits":[{"\_index":"\_river","\_type":"documents\_db\_river","\_id":"\_meta","\_score":1.0,  
> "\_source" : {  
> "type" : "couchdb",  
> "couchdb" : {  
> "host" : "localhost",  
> "port" : 5984,  
> "db" : "documents\_db",  
> "filter" : null  
> }
> 
> }},{"\_index":"\_river","\_type":"documents\_db\_river","\_id":"\_status","\_score":1.0,  
> "\_source" : {"ok":true,"node":{"id":"hnuszK\_cQu6GWZanGPiyZQ","name":"Brant,  
> Betty","transport\_address":"inet[/10.0.2.15:9300  
> ]"}}},{"\_index":"\_river","\_type":"documents\_db\_river","\_id":"\_seq","\_score":1.0,  
> "\_source" : {"couchdb":{"last\_seq":"4"}}}]}}
> 
> And I have 4 documents in my database so I know some how Elasticsearch is  
> able to access my db in couch.
> 
> If I try this search:
> 
> curl -XGET [http://localhost:9200/documents\_db/documents\_db\_river/\_search-d](http://localhost:9200/documents_db/documents_db_river/_search-d)  
> '{}'
> 
> I get:
> 
> {"took":6,"timed\_out":false,"\_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":0,"max\_score":null,"hits":}}
> 
> So, things look better know, at least I'm not getting exceptions, and I'm  
> sure elasticsearch is able to see my couchdb, the only problem I have is  
> that I'm not getting any hits, I tried specific queries and I still get  
> zero  
> hits.
> 
> Anyone can help me with this?
> 
> --  
> View this message in context:  
> [http://elasticsearch-users.115913.n3.nabble.com/CouchDB-Integration-Issues-tp3275195p3278754.html](http://elasticsearch-users.115913.n3.nabble.com/CouchDB-Integration-Issues-tp3275195p3278754.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).

---

<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:55am UTC](https://discuss.elastic.co/t/couchdb-integration-issues/5219/4 "2017-07-06T03:55:54Z")

</div>


