# What am I missing about the river-mongodb?

**URL:** https://discuss.elastic.co/t/what-am-i-missing-about-the-river-mongodb/7122
**Category:** Elasticsearch
**Created:** [March 26, 2012, 8:54am UTC](https://discuss.elastic.co/t/what-am-i-missing-about-the-river-mongodb/7122 "2012-03-26T08:54:53Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![lsx](https://avatars.discourse-cdn.com/v4/letter/l/e36b37/32.png) [@lsx](https://discuss.elastic.co/u/lsx)
#### Post date: [March 26, 2012, 8:54am UTC](https://discuss.elastic.co/t/what-am-i-missing-about-the-river-mongodb/7122/1 "2012-03-26T08:54:53Z")

</div>

Hi, I am new in ES.  
I do a test as the river-mongodb example:

[in terminal]  
curl -XPUT '[http://localhost:9200/\_river/mongodb/\_meta](http://localhost:9200/_river/mongodb/_meta)' -d '{  
"type": "mongodb",  
"mongodb": {  
"db": "testmongo",  
"collection": "person"  
},  
"index": {  
"name": "mongoindex",  
"type": "person"  
}  
}'

[in mongodb]  
use testmongo  
var p = {'firstName': "John", 'lastName': "Doe"}  
db.person.save(p);

[in terminal]  
curl -XGET "[http://localhost:9200/testmongo/\_search?q=firstName:John](http://localhost:9200/testmongo/_search?q=firstName:John)"

And I get the error:  
{"error":"IndexMissingException[[testmongo] missing]","status":404}

So what am I missing or something I make it wrong? How can I pass my  
first test?  
My environment:  
Debian version: 6/64bit  
OpenJDK version:1.6.0\_18 64bit  
ES version: 0.19.1  
river-mongodb version: 1.1.0  
mongodb version: 2.0.2

Thank you for help. 🙂

---

<div class="post-metadata">

### Author: ![Roly\_Vicaria](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/roly_vicaria/32/506_2.png) [@Roly\_Vicaria](https://discuss.elastic.co/u/Roly_Vicaria)
#### Post date: [March 27, 2012, 2:01pm UTC](https://discuss.elastic.co/t/what-am-i-missing-about-the-river-mongodb/7122/2 "2012-03-27T14:01:11Z")

</div>

You called the index "mongoindex" up above....i think you're curl command  
just needs to change the index name from "testmongo" to "mongoindex".  
disclaimer, i haven't used this, I'm just guessing.

On Monday, March 26, 2012 4:54:53 AM UTC-4, lsx wrote:

> Hi, I am new in ES.  
> I do a test as the river-mongodb example:
> 
> [in terminal]  
> curl -XPUT '[http://localhost:9200/\_river/mongodb/\_meta](http://localhost:9200/_river/mongodb/_meta)' -d '{  
> "type": "mongodb",  
> "mongodb": {  
> "db": "testmongo",  
> "collection": "person"  
> },  
> "index": {  
> "name": "mongoindex",  
> "type": "person"  
> }  
> }'
> 
> [in mongodb]  
> use testmongo  
> var p = {'firstName': "John", 'lastName': "Doe"}  
> db.person.save(p);
> 
> [in terminal]  
> curl -XGET "[http://localhost:9200/testmongo/\_search?q=firstName:John](http://localhost:9200/testmongo/_search?q=firstName:John)"
> 
> And I get the error:  
> {"error":"IndexMissingException[[testmongo] missing]","status":404}
> 
> So what am I missing or something I make it wrong? How can I pass my  
> first test?  
> My environment:  
> Debian version: 6/64bit  
> OpenJDK version:1.6.0\_18 64bit  
> ES version: 0.19.1  
> river-mongodb version: 1.1.0  
> mongodb version: 2.0.2
> 
> Thank you for help. 🙂

---

<div class="post-metadata">

### Author: ![lsx](https://avatars.discourse-cdn.com/v4/letter/l/e36b37/32.png) [@lsx](https://discuss.elastic.co/u/lsx)
#### Post date: [March 27, 2012, 2:45pm UTC](https://discuss.elastic.co/t/what-am-i-missing-about-the-river-mongodb/7122/3 "2012-03-27T14:45:33Z")

</div>

Thank you for your help.  
I test the "mongoindex" and I get these:  
{"took":4,"timed\_out":false,"\_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":0,"max\_score":null,"hits":}}  
I think these maybe some states but not what I want.  
I see the docs of ES about the index and get, it show the data like :  
{  
"\_index" : "twitter",  
"\_type" : "tweet",  
"\_id" : "1",  
"\_source" : {  
"user" : "kimchy",  
"postDate" : "2009-11-15T14:12:12",  
"message" : "trying out Elastic Search"  
}  
}  
So I must make something wrong, I will read the docs and try. 🙂

Thanks. 🙂  
在 2012年3月27日 下午10:01，Roly Vicaria [rolyv19@gmail.com](mailto:rolyv19@gmail.com) 写道：

> You called the index "mongoindex" up above....i think you're curl command  
> just needs to change the index name from "testmongo" to "mongoindex".  
> disclaimer, i haven't used this, I'm just guessing.
> 
> On Monday, March 26, 2012 4:54:53 AM UTC-4, lsx wrote:
> 
> > Hi, I am new in ES.  
> > I do a test as the river-mongodb example:
> > 
> > [in terminal]  
> > curl -XPUT '[http://localhost:9200/\_river/mongodb/\_meta](http://localhost:9200/_river/mongodb/_meta)' -d '{  
> > "type": "mongodb",  
> > "mongodb": {  
> > "db": "testmongo",  
> > "collection": "person"  
> > },  
> > "index": {  
> > "name": "mongoindex",  
> > "type": "person"  
> > }  
> > }'
> > 
> > [in mongodb]  
> > use testmongo  
> > var p = {'firstName': "John", 'lastName': "Doe"}  
> > db.person.save(p);
> > 
> > [in terminal]  
> > curl -XGET "[http://localhost:9200/testmongo/\_search?q=firstName:John](http://localhost:9200/testmongo/_search?q=firstName:John)"
> > 
> > And I get the error:  
> > {"error":"IndexMissingException[[testmongo] missing]","status":404}
> > 
> > So what am I missing or something I make it wrong? How can I pass my  
> > first test?  
> > My environment:  
> > Debian version: 6/64bit  
> > OpenJDK version:1.6.0\_18 64bit  
> > ES version: 0.19.1  
> > river-mongodb version: 1.1.0  
> > mongodb version: 2.0.2
> > 
> > Thank you for help. 🙂

---

<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:34am UTC](https://discuss.elastic.co/t/what-am-i-missing-about-the-river-mongodb/7122/4 "2017-07-06T03:34:36Z")

</div>


