MongoDb river

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

MongoDb river

Janusz Dalecki

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

--
 
 
Reply | Threaded
Open this post in threaded view
|

Re: MongoDb river

dadoonet
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 ;-)
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs


Le 5 janv. 2013 à 11:49, JD <[hidden email]> 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

--
 
 

--
 
 
Reply | Threaded
Open this post in threaded view
|

Re: MongoDb river

Janusz Dalecki
In reply to this post by Janusz Dalecki
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

--
 
 
Reply | Threaded
Open this post in threaded view
|

Re: MongoDb river

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


--
David ;-)
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs


Le 5 janv. 2013 à 13:04, JD <[hidden email]> 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

--
 
 

--