次のコードでelasticsearch用のcouchDBリバー(このelasticsearch exampleから)を作成しました:
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"
}
}'
このコマンドでelasticsearchを使用してcouchDBを検索しようとすると:
curl -XGET http://localhost:9200/tasks/tasks -d query{"user":"jbattle"}
応答を受け取ります: uri [/tasks/tasks] およびメソッド [GET][] のハンドラーが見つかりません
私は検索してきましたが、この問題の解決策をまだ発見していません。
アップデート:
適切なクエリは次のとおりです。
curl -XGET 'http://localhost:9200/_river/tasks/_search?q=user:jbattle&pretty=true'
ただし、エラーを受信しなくなったにもかかわらず、ヒット数は 0 です。
{
"took" : 1,
"timed_out" : false,
"_shards" : {
"total" : 1,
"successful" : 1,
"failed" : 0
},
"hits" : {
"total" : 0,
"max_score" : null,
"hits" : [ ]
}