Mongodb elasticsearch integration


(Kara) #1

I downloaded the https://github.com/richardwilly98/elasticsearch-river-mongodb/downloads
and tried the example: https://github.com/richardwilly98/elasticsearch-river-mongodb/blob/master/README.md.
It failed with on the following command:

curl -XGET "http://localhost:9200/testmongo/_search?q=firstName:John"
{"error":"IndexMissingException[[testmongo] missing]","status":404}

Any idea??

I have set the mongodb replica set - so the oplog is present.

Thanks for your help,
Kara


(Kara) #2

I got it. I had to copy the river jar files into the
elasticsearch-0.19.2/plugins/mongodb_river directory and restart the
elasticsearch. You need to create the plugins/mongodb_river directory
in the ES_HOME. It is not there by default.
Also, the query command should be curl -XGET "http://localhost:9200/
mongoindex/_search?q=firstName:John" It should be "mongoindex" not
"testmongo". Just a minor change in the example

Thanks,
Kara

On Apr 26, 3:35 pm, Kara karine.marab...@aero.org wrote:

I downloaded thehttps://github.com/richardwilly98/elasticsearch-river-mongodb/downloads
and tried the example:https://github.com/richardwilly98/elasticsearch-river-mongodb/blob/ma....
It failed with on the following command:

curl -XGET "http://localhost:9200/testmongo/_search?q=firstName:John"
{"error":"IndexMissingException[[testmongo] missing]","status":404}

Any idea??

I have set the mongodb replica set - so the oplog is present.

Thanks for your help,
Kara


(lsx) #3

Hi.
I got it before. And please see this:

  1. mongodb must open the oplog.
  2. If you use the example in the github, the index name is mongoindex.

Good Luck. :slight_smile:

在 2012年4月27日 上午6:35,Kara karine.marabyan@aero.org 写道:

I downloaded the https://github.com/richardwilly98/elasticsearch-river-mongodb/downloads
and tried the example: https://github.com/richardwilly98/elasticsearch-river-mongodb/blob/master/README.md.
It failed with on the following command:

curl -XGET "http://localhost:9200/testmongo/_search?q=firstName:John"
{"error":"IndexMissingException[[testmongo] missing]","status":404}

Any idea??

I have set the mongodb replica set - so the oplog is present.

Thanks for your help,
Kara


(system) #4