MongoDb river

Hi,

Can someone please give me an example of how to configure the MongoDB River
for two different collections – let’s say col1 and col2.

Regards,
Janusz

--

I think you can do it like this:

curl -XPUT 'http://localhost:9200/_river/mongodb1/_meta' -d '{ "type": "mongodb", "mongodb": { "db": "DATABASE_NAME", "collection": "col1", "gridfs": true }, "index": { "name": "ES_INDEX_NAME", "type": "ES_TYPE_NAME" } }'

curl -XPUT 'http://localhost:9200/_river/mongodb2/_meta' -d '{ "type": "mongodb", "mongodb": { "db": "DATABASE_NAME", "collection": "col2", "gridfs": true }, "index": { "name": "ES_INDEX_NAME", "type": "ES_TYPE_NAME" } }'
If you want to push content in different types, modify ES_TYPE_NAME.

Does it work?

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 5 janv. 2013 à 11:49, JD jdalecki@tycoint.com a écrit :

Hi,
Can someone please give me an example of how to configure the MongoDB River for two different collections – let’s say col1 and col2.
Regards,
Janusz

--

Yep. Thanks David.
I think we should document it. I don't know how. Should I raise a ticket?
Cheers,
Janusz

On Saturday, 5 January 2013 21:49:45 UTC+11, JD wrote:

Hi,

Can someone please give me an example of how to configure the MongoDB
River for two different collections – let’s say col1 and col2.

Regards,
Janusz

--

You can edit online the README file. It will create a pull request.

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 5 janv. 2013 à 13:04, JD jdalecki@tycoint.com a écrit :

Yep. Thanks David.
I think we should document it. I don't know how. Should I raise a ticket?
Cheers,
Janusz

On Saturday, 5 January 2013 21:49:45 UTC+11, JD wrote:

Hi,
Can someone please give me an example of how to configure the MongoDB River for two different collections – let’s say col1 and col2.
Regards,
Janusz

--

--