1

我正在尝试在我的工作站上配置 ElasticSearch 以使用远程 mongo 数据库上的大型集合。我安装了河,但我不能让它工作。我有这个配置元素:

curl -XPUT 'http://localhost:9200/_river/mongodb/_meta' -d '{ 
"type": "mongodb", 
"mongodb": { 
"host":"10.42.210.214",
"port":"27017",
"login":"admin",
"password":"something",
    "db": "somedb", 
    "collection": "somecollection"
}, 
"index": {
    "name": "mongoindex", 
    "type": "somecollection" 
}
}'

当我搜索时:

http://localhost:9200/somecollection/_search?query=matchAll&pretty=true

... 它说:

{ "error" : "IndexMissingException[[somecollection] missing]", "status" : 404 }

我怎样才能让它索引东西/调试问题?

4

2 回答 2

1

您确定 Elasticsearch 的答案是no collection

我很想看看 ES 发送的结果。

顺便说一句,您是否启用了 mongodb副本集

于 2013-01-04T16:49:00.683 回答
0

你应该http://localhost:9200/mongoindex/_search?query=matchAll&pretty=true用来做搜索。查看mongoindex

于 2015-09-23T08:07:55.883 回答