CouchDB Integration Issues

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

I followed the instructions here: couchdb-integration but when searching (curl -XGET 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' 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' -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.

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' -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 -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 -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?

curl -XGET 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/_searchhttp://localhost:9200/documents_db/documents_db_river/_search
-d
'{}'

On Tue, Aug 23, 2011 at 8:43 PM, jramirez 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
'
-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 -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
'{}'

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
Sent from the Elasticsearch Users mailing list archive at Nabble.com.