I’ve created a couchDB river (from this elasticsearch example) for elasticsearch with the following code:
curl -XPUT 'localhost:9200/_river/tasks/_meta' -d '{
"type" : "couchdb",
"couchdb" : {
"host" : "localhost",
"port" : 5984,
"db" : "tasks",
"filter" : null
},
"index" : {
"index" : "tasks",
"type" : "tasks",
"bulk_size" : "100",
"bulk_timeout" : "10ms"
}
}'
When I try to search the the couchDB using elasticsearch with this command:
curl -XGET http://localhost:9200/tasks/tasks -d query{"user":"jbattle"}
I get the response:
No handler found for uri [/tasks/tasks] and method [GET][]
I’ve been searching but have yet to discover a solution to/for this issue.
UPDATE:
I’ve discovered the proper query is:
curl -XGET 'http://localhost:9200/_river/tasks/_search?q=user:jbattle&pretty=true'
Though, despite no longer receiving an error, I get 0 hits:
{
"took" : 1,
"timed_out" : false,
"_shards" : {
"total" : 1,
"successful" : 1,
"failed" : 0
},
"hits" : {
"total" : 0,
"max_score" : null,
"hits" : [ ]
}
Both of your queries are incorrect. The first one is missing the endpoint
/_searchand the second one is querying index_riverinstead of indextasks.The
_riverindex is where your river is stored not your data. When you configured your river, you specified indextasks.So try this instead:
Or if that doesn’t work, try searching for any docs in
tasks/tasks:clint