# Zero results retrieved with ES

**URL:** <https://discuss.elastic.co/t/zero-results-retrieved-with-es/7879>\
**Category:** Elasticsearch\
**Created:** [May 28, 2012, 7:01am UTC](https://discuss.elastic.co/t/zero-results-retrieved-with-es/7879 "2012-05-28T07:01:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Serikozz](https://avatars.discourse-cdn.com/v4/letter/s/45deac/32.png) [@Serikozz](https://discuss.elastic.co/u/Serikozz)\
**Post date:** [May 28, 2012, 7:01am UTC](https://discuss.elastic.co/t/zero-results-retrieved-with-es/7879/1 "2012-05-28T07:01:38Z")

</div>

Can someone correct if I am doing smth wrong:  
I have collection of tweets which I stored in Mongodb. So I want to retrieve text of tweets from collection with keyword.  
so first, I`ve deleted existed index:

curl -X DELETE "[http://localhost:9200/tweetindex](http://localhost:9200/tweetindex)"  
{"ok":true,"acknowledged":true}

then,created index:

curl -XPOST "[http://localhost:9200/tweetindex](http://localhost:9200/tweetindex)"  
{"ok":true,"acknowledged":true}

after that, configured the river:

curl -XPUT "[http://localhost:9200/\_river/mongodb/\_meta](http://localhost:9200/_river/mongodb/_meta)" -d "{  
"type":"mongodb", "mongodb":{"db":"testtweet", "collection":"tweet"}  
, "index":{"name":"tweetindex", "type":"tweet"} }"  
{"ok":true,"\_index":"\_river","\_type":"mongodb","\_id":"\_meta","\_version":16}

however, when i want retrieve tweets I fail...

curl -XGET "[http://localhost:9200/tweetindex/\_search?q=happy](http://localhost:9200/tweetindex/_search?q=happy)"  
{"took":58,"timed\_out":false,"\_shards":{"total":5,"successful":5,"failed":0},"hi  
ts":{"total":0,"max\_score":null,"hits":[]}}

0 hits...

here is also tweets from my DB:

{ "\_id" : ObjectId("4fbb380cfed8f515a0000004"), "text" : "Lil Wayne Singlee Oh Y  
opp #SiyahTweetin笶､笶､笶､" }  
{ "\_id" : ObjectId("4fbb380cfed8f515a0000005"), "text" : "In a happy place right  
now but the best part is its only gonna get better" }  
{ "\_id" : ObjectId("4fbb380cfed8f515a0000002"), "text" : "Like damn I wish it wa  
s 6:00" }  
{ "\_id" : ObjectId("4fbb380dfed8f515a0000008"), "text" : "New post: Lesbian plea  
sure two ways [http://t.co/37d16t9t](http://t.co/37d16t9t)" }  
{ "\_id" : ObjectId("4fbb380dfed8f515a0000009"), "text" : "Omg..I'm kinda hungry.  
" }  
{ "\_id" : ObjectId("4fbb380dfed8f515a000000a"), "text" : "I have a crush on #oom  
f but she has no clue. Lol" }

I have about 1900 tweets.

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [May 29, 2012, 6:22pm UTC](https://discuss.elastic.co/t/zero-results-retrieved-with-es/7879/2 "2012-05-29T18:22:03Z")

</div>

Trying use the lucene query syntax field:value

curl -XGET "[http://localhost:9200/tweetindex/\_search?q=text:happy](http://localhost:9200/tweetindex/_search?q=text:happy)"

Without the field, I believe you will be search against the \_all  
field, which has its own analyzer.

--  
Ivan

On Mon, May 28, 2012 at 12:01 AM, Serikozz [serikozz@mail.ru](mailto:serikozz@mail.ru) wrote:

> Can someone correct if I am doing smth wrong:  
> I have collection of tweets which I stored in Mongodb. So I want to retrieve  
> text of tweets from collection with keyword.  
> so first, I`ve deleted existed index:
> 
> curl -X DELETE "[http://localhost:9200/tweetindex](http://localhost:9200/tweetindex)"  
> {"ok":true,"acknowledged":true}
> 
> then,created index:
> 
> curl -XPOST "[http://localhost:9200/tweetindex](http://localhost:9200/tweetindex)"  
> {"ok":true,"acknowledged":true}
> 
> after that, configured the river:
> 
> curl -XPUT "[http://localhost:9200/\_river/mongodb/\_meta](http://localhost:9200/_river/mongodb/_meta)" -d "{  
> "type":"mongodb", "mongodb":{"db":"aikin",  
> "collection":"a\_tweets"}  
> , "index":{"name":"tweetindex", "type":"a\_tweets"} }"  
> {"ok":true,"\_index":"\_river","\_type":"mongodb","\_id":"\_meta","\_version":16}
> 
> And then, created mapping:
> 
> curl -XPUT "[http://localhost:9200/tweetindex/a\_tweets/\_mapping](http://localhost:9200/tweetindex/a_tweets/_mapping)"  
> -d "{"a\_tweets":{"properties":{"text":{"type":"string",  
> "search\_anal  
> yzer":"snowball", "index\_analyzer":"snowball"}}}}"  
> {"ok":true,"acknowledged":true}  
> curl -XGET "[http://localhost:9200/tweetindex/\_mapping?pretty=true](http://localhost:9200/tweetindex/_mapping?pretty=true)"  
> {  
> "tweetindex" : {  
> "a\_tweets" : {  
> "properties" : {  
> "text" : {  
> "type" : "string",  
> "analyzer" : "snowball"}}}}}
> 
> however, when i want retrieve tweets I fail...
> 
> curl -XGET "[http://localhost:9200/tweetindex/\_search?q=happy](http://localhost:9200/tweetindex/_search?q=happy)"  
> {"took":58,"timed\_out":false,"\_shards":{"total":5,"successful":5,"failed":0},"hi  
> ts":{"total":0,"max\_score":null,"hits":}}
> 
> 0 hits...
> 
> here is also tweets from my DB:
> 
> { "\_id" : ObjectId("4fbb380cfed8f515a0000004"), "text" : "Lil Wayne Singlee  
> Oh Y  
> opp #SiyahTweetin笶､笶､笶､" }  
> { "\_id" : ObjectId("4fbb380cfed8f515a0000005"), "text" : "In a happy place  
> right  
> now but the best part is its only gonna get better" }  
> { "\_id" : ObjectId("4fbb380cfed8f515a0000002"), "text" : "Like damn I wish  
> it wa  
> s 6:00" }  
> { "\_id" : ObjectId("4fbb380dfed8f515a0000008"), "text" : "New post: Lesbian  
> plea  
> sure two ways [http://tgirlclips.com/lesbian-pleasure-two-ways/](http://t.co/37d16t9t)" }  
> { "\_id" : ObjectId("4fbb380dfed8f515a0000009"), "text" : "Omg..I'm kinda  
> hungry.  
> " }  
> { "\_id" : ObjectId("4fbb380dfed8f515a000000a"), "text" : "I have a crush on  
> #oom  
> f but she has no clue. Lol" }
> 
> I have about 1900 tweets.
> 
> --  
> View this message in context: [http://elasticsearch-users.115913.n3.nabble.com/Zero-results-retrieved-with-ES-tp4018417.html](http://elasticsearch-users.115913.n3.nabble.com/Zero-results-retrieved-with-ES-tp4018417.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![Serikozz](https://avatars.discourse-cdn.com/v4/letter/s/45deac/32.png) [@Serikozz](https://discuss.elastic.co/u/Serikozz)\
**Post date:** [May 30, 2012, 10:52am UTC](https://discuss.elastic.co/t/zero-results-retrieved-with-es/7879/3 "2012-05-30T10:52:34Z")

</div>

I have checked if ES even indexing tweets with curl localhost:9200/tweetindex/\_count , so it says {"count":0,"\_shards":{"total":5,"successful":5,"failed":0}}  
It seems it is not indexing at all...Am I doing smth wrong?

From log file

[2012-05-30 19:14:09,333][INFO][node] [Lightspeed] {0.19.3  
}[6476]: initializing ...  
[2012-05-30 19:14:09,405][INFO][plugins] [Lightspeed] loaded  
[river-mongodb, mapper-attachments], sites []  
[2012-05-30 19:14:12,595][INFO][node] [Lightspeed] {0.19.3  
}[6476]: initialized  
[2012-05-30 19:14:12,595][INFO][node] [Lightspeed] {0.19.3  
}[6476]: starting ...  
[2012-05-30 19:14:12,754][INFO][transport] [Lightspeed] bound\_a  
ddress {inet[/0:0:0:0:0:0:0:0:9300]}, publish\_address {inet[/192.168.1.249:9300]  
}  
[2012-05-30 19:14:15,929][INFO][cluster.service] [Lightspeed] new\_mas  
ter [Lightspeed][mAuUZJOnQ\_S1F5TK-bQ2Ug][inet[/192.168.1.249:9300]], reason: zen  
-disco-join (elected\_as\_master)  
[2012-05-30 19:14:16,170][INFO][discovery] [Lightspeed] elastic  
search/mAuUZJOnQ\_S1F5TK-bQ2Ug  
[2012-05-30 19:14:16,279][INFO][http] [Lightspeed] bound\_a  
ddress {inet[/0:0:0:0:0:0:0:0:9200]}, publish\_address {inet[/192.168.1.249:9200]  
}  
[2012-05-30 19:14:16,280][INFO][node] [Lightspeed] {0.19.3  
}[6476]: started  
[2012-05-30 19:14:16,808][INFO][gateway] [Lightspeed] recover  
ed [9] indices into cluster\_state  
[2012-05-30 19:14:19,697][INFO][river.mongodb] [Lightspeed] [mongod  
b][mongodb] starting mongodb stream: host [localhost], port [27017], gridfs [fal  
se], filter [testtweet], db [testtweet], indexing to [tweet]/[{}]  
[2012-05-30 19:14:20,383][INFO][river.mongodb] [Lightspeed] [mongod  
b][aikin] starting mongodb stream: host [localhost], port [27017], gridfs [false  
], filter [aikin], db [tweetindex], indexing to [a\_tweets]/[{}]  
[2012-05-30 19:14:20,552][INFO][river.mongodb] [Lightspeed] [mongod  
b][mongodb] No known previous slurping time for this collection  
[2012-05-30 19:14:20,553][INFO][river.mongodb] [Lightspeed] [mongod  
b][aikin] No known previous slurping time for this collection  
[2012-05-30 19:14:20,804][WARN][river.mongodb] [Lightspeed] [mongod  
b][aikin] A mongoDB cursor bug ?  
java.util.NoSuchElementException  
at java.util.LinkedList$ListItr.next(LinkedList.java:888)  
at com.mongodb.DBCursor.\_next(DBCursor.java:453)  
at com.mongodb.DBCursor.next(DBCursor.java:533)  
at org.elasticsearch.river.mongodb.MongoDBRiver$Slurper.processFullColle  
ction(MongoDBRiver.java:378)  
at org.elasticsearch.river.mongodb.MongoDBRiver$Slurper.run(MongoDBRiver  
.java:353)  
at java.lang.Thread.run(Thread.java:722)  
[2012-05-30 19:14:20,821][INFO][river.mongodb] [Lightspeed] [mongod  
b][aikin] No known previous slurping time for this collection  
[2012-05-30 19:16:59,250][INFO][cluster.metadata] [Lightspeed] [testtw  
eet] deleting index  
[2012-05-30 19:18:26,873][INFO][cluster.metadata] [Lightspeed] [testtw  
eet] creating index, cause [api], shards [5]/[1], mappings []

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [May 31, 2012, 10:55pm UTC](https://discuss.elastic.co/t/zero-results-retrieved-with-es/7879/4 "2012-05-31T22:55:43Z")

</div>

I have never used the MongoDB river, so I can't comment on the error.  
Maybe you should post the code that initializes the river and someone  
familiar can figure it out.

[mongod  
b][aikin] A mongoDB cursor bug ?  
java.util.NoSuchElementException  
at java.util.LinkedList$ListItr.next(LinkedList.java:888)  
at com.mongodb.DBCursor.\_next(DBCursor.java:453)  
at com.mongodb.DBCursor.next(DBCursor.java:533)  
at org.elasticsearch.river.mongodb.MongoDBRiver$Slurper.processFullColle  
ction(MongoDBRiver.java:378)  
at org.elasticsearch.river.mongodb.MongoDBRiver$Slurper.run(MongoDBRiver  
.java:353)  
at java.lang.Thread.run(Thread.java:722)

On Wed, May 30, 2012 at 3:52 AM, Serikozz [serikozz@mail.ru](mailto:serikozz@mail.ru) wrote:

> I have checked if ES even indexing tweets with curl  
> localhost:9200/tweetindex/\_count , so it says  
> {"count":0,"\_shards":{"total":5,"successful":5,"failed":0}}  
> It seems it is not indexing at all...Am I doing smth wrong?
> 
> From log file
> 
> [2012-05-30 19:14:09,333][INFO][node] [Lightspeed] {0.19.3  
> }[6476]: initializing ...  
> [2012-05-30 19:14:09,405][INFO][plugins] [Lightspeed] loaded  
> [river-mongodb, mapper-attachments], sites   
> [2012-05-30 19:14:12,595][INFO][node] [Lightspeed] {0.19.3  
> }[6476]: initialized  
> [2012-05-30 19:14:12,595][INFO][node] [Lightspeed] {0.19.3  
> }[6476]: starting ...  
> [2012-05-30 19:14:12,754][INFO][transport] [Lightspeed] bound\_a  
> ddress {inet[/0:0:0:0:0:0:0:0:9300]}, publish\_address  
> {inet[/192.168.1.249:9300]  
> }  
> [2012-05-30 19:14:15,929][INFO][cluster.service] [Lightspeed] new\_mas  
> ter [Lightspeed][mAuUZJOnQ\_S1F5TK-bQ2Ug][inet[/192.168.1.249:9300]], reason:  
> zen  
> -disco-join (elected\_as\_master)  
> [2012-05-30 19:14:16,170][INFO][discovery] [Lightspeed] elastic  
> search/mAuUZJOnQ\_S1F5TK-bQ2Ug  
> [2012-05-30 19:14:16,279][INFO][http] [Lightspeed] bound\_a  
> ddress {inet[/0:0:0:0:0:0:0:0:9200]}, publish\_address  
> {inet[/192.168.1.249:9200]  
> }  
> [2012-05-30 19:14:16,280][INFO][node] [Lightspeed] {0.19.3  
> }[6476]: started  
> [2012-05-30 19:14:16,808][INFO][gateway] [Lightspeed] recover  
> ed [9] indices into cluster\_state  
> [2012-05-30 19:14:19,697][INFO][river.mongodb] [Lightspeed] [mongod  
> b][mongodb] starting mongodb stream: host [localhost], port [27017], gridfs  
> [fal  
> se], filter [testtweet], db [testtweet], indexing to [tweet]/[{}]  
> [2012-05-30 19:14:20,383][INFO][river.mongodb] [Lightspeed] [mongod  
> b][aikin] starting mongodb stream: host [localhost], port [27017], gridfs  
> [false  
> ], filter [aikin], db [tweetindex], indexing to [a\_tweets]/[{}]  
> [2012-05-30 19:14:20,552][INFO][river.mongodb] [Lightspeed] [mongod  
> b][mongodb] No known previous slurping time for this collection  
> [2012-05-30 19:14:20,553][INFO][river.mongodb] [Lightspeed] [mongod  
> b][aikin] No known previous slurping time for this collection  
> [2012-05-30 19:14:20,804][WARN][river.mongodb] [Lightspeed] [mongod  
> b][aikin] A mongoDB cursor bug ?  
> java.util.NoSuchElementException  
> at java.util.LinkedList$ListItr.next(LinkedList.java:888)  
> at com.mongodb.DBCursor.\_next(DBCursor.java:453)  
> at com.mongodb.DBCursor.next(DBCursor.java:533)  
> at org.elasticsearch.river.mongodb.MongoDBRiver$Slurper.processFullColle  
> ction(MongoDBRiver.java:378)  
> at org.elasticsearch.river.mongodb.MongoDBRiver$Slurper.run(MongoDBRiver  
> .java:353)  
> at java.lang.Thread.run(Thread.java:722)  
> [2012-05-30 19:14:20,821][INFO][river.mongodb] [Lightspeed] [mongod  
> b][aikin] No known previous slurping time for this collection  
> [2012-05-30 19:16:59,250][INFO][cluster.metadata] [Lightspeed] [testtw  
> eet] deleting index  
> [2012-05-30 19:18:26,873][INFO][cluster.metadata] [Lightspeed] [testtw  
> eet] creating index, cause [api], shards [5]/[1], mappings
> 
> --  
> View this message in context: [http://elasticsearch-users.115913.n3.nabble.com/Zero-results-retrieved-with-ES-tp4018417p4018549.html](http://elasticsearch-users.115913.n3.nabble.com/Zero-results-retrieved-with-ES-tp4018417p4018549.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 3:26am UTC](https://discuss.elastic.co/t/zero-results-retrieved-with-es/7879/5 "2017-07-06T03:26:05Z")

</div>

Closed on July 6, 2017, 3:26am UTC


