Elasticsearch和MongoDB:5次尝试后找不到河流_meta文件

时间:2015-05-15 12:10:00

标签: mongodb elasticsearch elasticsearch-plugin

我有一个名为news的MongoDB数据库,我试图用ES编制索引。 使用这些插件:

richardwilly98.elasticsearch / elasticsearch-河流的mongodb / 2.0.9 elasticsearch / elasticsearch-mapper-attachments / 2.5.0

这是我尝试创建索引时发生的事情。我试图删除索引并重新创建它,而没有帮助。

$ curl -XPUT 'http://localhost:9200/_river/news/_meta' -d @init.json

init.json

{
"type": "mongodb",
"mongodb": {
    "db": "news",
    "collection": "entries"
},
"index": {
    "name": "news",
    "type": "entries"
}
}

这是一个日志

update_mapping [mongodb] (dynamic)
MongoDB River Plugin - version[2.0.9] - hash[73ddea5] - time[2015-04-06T21:16:46Z]
setRiverStatus called with mongodb - RUNNING
river mongodb startup pending
Starting river mongodb
MongoDB options: secondaryreadpreference [false], drop_collection [false], 
include_collection [], throttlesize [5000], gridfs [false], filter [null], 
db [news], collection [entries], script [null], indexing to [news]/[entries]
MongoDB version - 3.0.2
update_mapping [mongodb] (dynamic)
[org.elasticsearch.river.mongodb.CollectionSlurper] Cannot ..
  import collection entries into existing index
d with mongodb - INITIAL_IMPORT_FAILED
Started river mongodb
no river _meta document found after 5 attempts
no river _meta document found after 5 attempts

对可能出错的任何建议? 我在 OS X 上运行 ES 1.5.2 MongoDB 3.0.2

1 个答案:

答案 0 :(得分:1)

the mongodb river github pages上,看起来插件在版本1.4.2之前得到支持,但不高(即你正在运行1.5.2)

另请注意,在ES v1.5中已经弃用了河流,并且mongodb河项目中有open issue这个主题。

与@martins聊天后更新

最后,问题只是创建的河流的名称是错误的(即news而不是mongodb),以下命令将正确创建mongodb河,它仍然适用于ES 1.5 .2尽管没有经过官方测试。

curl -XPUT 'http://localhost:9200/_river/mongodb/_meta' -d @init.json