Kara
(Kara)
April 26, 2012, 10:35pm
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
(Kara)
April 26, 2012, 11:10pm
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
(lsx)
April 26, 2012, 11:23pm
3
Hi.
I got it before. And please see this:
opened 10:48AM - 06 Apr 12 UTC
closed 02:30PM - 06 Apr 12 UTC
Hi, I forgot something or did something wrong? there is no search result.
I goog… le by "elasticsearch IndexMissingException" but can not solve it.
These(1-5) are what I do:
1, bin/mongod --directoryperdb --dbpath=/var/data/db --logpath=/var/data/log/mongodb.log --fork
2, bin/elasticsearch
3, curl -XPUT 'http://localhost:9200/_river/mongodb/_meta' -d '{
"type": "mongodb",
"mongodb": {
"db": "testmongo",
"collection": "person"
},
"index": {
"name": "mongoindex",
"type": "person"
}
}'
4, bin/mongo
use testmongo
db.person.save({firstName: "John", lastName: "Doe"})
5, curl -XGET "localhost:9200/testmongo/person/_search?q=firstName:John&pretty=true"
And I got:
{
"error" : "IndexMissingException[[testmongo] missing]",
"status" : 404
}
When I tail the elasticsearch.log, there are some exceptions:
java.util.NoSuchElementException
at java.util.LinkedList$ListItr.next(LinkedList.java:715)
at com.mongodb.DBCursor._next(DBCursor.java:453)
at com.mongodb.DBCursor.next(DBCursor.java:533)
at org.elasticsearch.river.mongodb.MongoDBRiver$Slurper.processFullCollection(MongoDBRiver.java:378)
at org.elasticsearch.river.mongodb.MongoDBRiver$Slurper.run(MongoDBRiver.java:353)
at java.lang.Thread.run(Thread.java:636)
[2012-04-06 18:19:30,636][INFO ][river.mongodb ] [Rama-Tut] [mongodb][mongodb] No known previous slurping time for this collection
My environment:
debian 6 64bit
openjdk 6 64bit
mongodb 2.0.4 Linux 64-bit
elasticsearch 0.19.2
and
plugin -install elasticsearch/elasticsearch-mapper-attachments/1.2.0
plugin -install richardwilly98/elasticsearch-river-mongodb/1.1.0
So, what's my wrong please?
mongodb must open the oplog.
If you use the example in the github, the index name is mongoindex.
Good Luck.
在 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