Note that there are some explanatory texts on larger screens.

plurals
  1. POElasticSearch returns Zero Hits with MongoDB-River plugin
    primarykey
    data
    text
    <p>I am trying make "elasticsearch-river-mongodb" plug-in with my local MongoDB instance. </p> <p>With help from <a href="http://satishgandham.com/2012/09/a-complete-guide-to-integrating-mongodb-with-elastic-search/#comment-2871" rel="nofollow">http://satishgandham.com/2012/09/a-complete-guide-to-integrating-mongodb-with-elastic-search/#comment-2871</a> </p> <p>I am able to get rid of 404 exception. However, all my queries to ElasticSearch index return NO hits. </p> <p>Following are the steps I have followed in sequence. </p> <ol> <li>Installed MongoDB 2.4.3</li> <li>Enabled ReplicaSet = rs0</li> <li>Enabled oplogSize = 100</li> <li>Restarted MongoDB Server</li> <li>Configured the rsConf variable on MongoShell</li> <li>Initiated the ReplicaSet</li> </ol> <hr> <pre><code>rs0:PRIMARY&gt; rs.status() { "set" : "rs0", "date" : ISODate("2013-05-21T17:42:41Z"), "myState" : 1, "members" : [ { "_id" : 0, "name" : "127.0.0.1:27017", "health" : 1, "state" : 1, "stateStr" : "PRIMARY", "uptime" : 865, "optime" : { "t" : 1369157994, "i" : 1 }, "optimeDate" : ISODate("2013-05-21T17:39:54Z"), "self" : true } ], "ok" : 1 } </code></pre> <hr> <ol start="7"> <li>Installed ES</li> <li>Installed attachment plugin <code>(ES_HOME/bin/plugin -install elasticsearch/elasticsearch-mapper-attachments/1.4.0)</code></li> <li>Installed River plugin <code>(ES_HOME/bin/plugin -install richardwilly98/elasticsearch-river-mongodb/1.4.0)</code></li> <li>Restarted ES</li> <li>Curl ES to index documents from MongoDB with following command successfully.</li> </ol> <hr> <pre><code>purl -XPUT 'http://`127.0.0.1`:9200/_river/mongodb/_meta' -d '{ "type": "mongodb", "mongodb": { "db": "players", "collection": "scores" }, "index": { "name": "scoresindex", "type": "score" } }' </code></pre> <hr> <ol start="12"> <li>Added new documents to MongoDB </li> <li>On MongDB <code>db.oplog.rs.find()</code> collection returns new updates</li> </ol> <hr> <pre><code>rs0:PRIMARY&gt; db.oplog.rs.find() { "ts" : { "t" : 1369152540, "i" : 1 }, "h" : NumberLong(0), "v" : 2, "op" : "n", "ns" : "", "o" : { "msg" : "initiating set" } } { "ts" : { "t" : 1369152706, "i" : 1 }, "h" : NumberLong("7734203254950592529"), "v" : 2, "op" : "i", "ns" : "players.scores", "o" : { "_id" : ObjectId("519b9cc2871b3116f0b8006e"), "name" : "rohit", "score" : 20 } } { "ts" : { "t" : 1369157720, "i" : 1 }, "h" : NumberLong("2546253279621321716"), "v" : 2, "op" : "i", "ns" : "test.scores", "o" : { "_id" : ObjectId("519bb058b6fd31855ec8b0af"), "name" : "karthik", "score" : 20 } } { "ts" : { "t" : 1369157994, "i" : 1 }, "h" : NumberLong("-3356531630527802451"), "v" : 2, "op" : "i", "ns" : "test.scores", "o" : { "_id" : ObjectId("519bb16ab6fd31855ec8b0b0"), "name" : "dinesh", "score" : 20 } } </code></pre> <hr> <p>The problem i am facing is : Searching on ElasticSearch using following command</p> <hr> <pre><code>curl -XGET 'http://`127.0.0.1`:9200/scoresindex/_search?q=name:dinesh' </code></pre> <hr> <p>for newly added document to scores collection on MongoDB does not return any results. </p> <p>I have tried posting document directly to ES and it DOES return the results but not from the documents in MongoDB. </p> <p>Is there something i am missing? Appreciate your help in advance.</p> <p>Thank You</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload