簡體   English   中英

使用遠程Mongodb進行彈性搜索

[英]Elastic Search with Remote Mongodb

我正在嘗試在工作站上配置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 }

我如何使其索引東西/調試問題?

你確定從Elasticsearch答案是no collection

我很好奇看到ES發送的結果。

順便說一句,您是否啟用了mongodb 副本集

您應該使用http://localhost:9200/mongoindex/_search?query=matchAll&pretty=true進行搜索。 看一下mongoindex

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM