mongodb river plugin

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

mongodb river plugin

Janusz Dalecki

Hi,

I am trying to use mongodb river plugin – unfortunately without any success.

When I try to execute this command:

http://localhost:9200/_river/mongodb/_meta

{

    "type": "mongodb",

    "mongodb": {

        "db": "my_database",

        "collection": "ProductProduct"

    },

    "index": {

        "name": "mongoindex",

        "type": "ProductProduct"

    }

}

I am getting this exception:

 

Exception in thread "elasticsearch[Jazz][generic][T#4]" java.lang.NoSuchMethodError: org.elasticsear

ch.client.IndicesAdminClient.prepareCreate(Ljava/lang/String;)Lorg/elasticsearch/client/action/admin

/indices/create/CreateIndexRequestBuilder;

        at org.elasticsearch.river.mongodb.MongoDBRiver.start(MongoDBRiver.java:144)

        at org.elasticsearch.river.RiversService.createRiver(RiversService.java:146)

        at org.elasticsearch.river.RiversService$ApplyRivers$2.onResponse(RiversService.java:270)

        at org.elasticsearch.river.RiversService$ApplyRivers$2.onResponse(RiversService.java:264)

        at org.elasticsearch.action.support.TransportAction$ThreadedActionListener$1.run(TransportAc

 

I really don’t know why MongoDBRiver.start tries to resolve to the org.elasticsearch.client.action.admin.indices.create. CreateIndexRequestBuilder package instead of org.elasticsearch.action.admin.indices.create.CreateIndexRequestBuilder.

Any ideas guys?

Regards,

 

Janusz

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

Re: mongodb river plugin

dadoonet
What is your es server version?

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


Le 30 déc. 2012 à 11:58, JD <[hidden email]> a écrit :

Hi,

I am trying to use mongodb river plugin – unfortunately without any success.

When I try to execute this command:

http://localhost:9200/_river/mongodb/_meta

{

    "type": "mongodb",

    "mongodb": {

        "db": "my_database",

        "collection": "ProductProduct"

    },

    "index": {

        "name": "mongoindex",

        "type": "ProductProduct"

    }

}

I am getting this exception:

 

Exception in thread "elasticsearch[Jazz][generic][T#4]" java.lang.NoSuchMethodError: org.elasticsear

ch.client.IndicesAdminClient.prepareCreate(Ljava/lang/String;)Lorg/elasticsearch/client/action/admin

/indices/create/CreateIndexRequestBuilder;

        at org.elasticsearch.river.mongodb.MongoDBRiver.start(MongoDBRiver.java:144)

        at org.elasticsearch.river.RiversService.createRiver(RiversService.java:146)

        at org.elasticsearch.river.RiversService$ApplyRivers$2.onResponse(RiversService.java:270)

        at org.elasticsearch.river.RiversService$ApplyRivers$2.onResponse(RiversService.java:264)

        at org.elasticsearch.action.support.TransportAction$ThreadedActionListener$1.run(TransportAc

 

I really don’t know why MongoDBRiver.start tries to resolve to the org.elasticsearch.client.action.admin.indices.create. CreateIndexRequestBuilder package instead of org.elasticsearch.action.admin.indices.create.CreateIndexRequestBuilder.

Any ideas guys?

Regards,

 

Janusz

--
 
 

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

Re: mongodb river plugin

Janusz Dalecki
In reply to this post by Janusz Dalecki
Hi,
Its elasticsearch 0.20.1.
Which version should I use?
Regards,
Janusz

On Sunday, December 30, 2012 9:58:25 PM UTC+11, JD wrote:

Hi,

I am trying to use mongodb river plugin – unfortunately without any success.

When I try to execute this command:

http://localhost:9200/_river/mongodb/_meta

{

    "type": "mongodb",

    "mongodb": {

        "db": "my_database",

        "collection": "ProductProduct"

    },

    "index": {

        "name": "mongoindex",

        "type": "ProductProduct"

    }

}

I am getting this exception:

 

Exception in thread "elasticsearch[Jazz][generic][T#4]" java.lang.NoSuchMethodError: org.elasticsear

ch.client.IndicesAdminClient.prepareCreate(Ljava/lang/String;)Lorg/elasticsearch/client/action/admin

/indices/create/CreateIndexRequestBuilder;

        at org.elasticsearch.river.mongodb.MongoDBRiver.start(MongoDBRiver.java:144)

        at org.elasticsearch.river.RiversService.createRiver(RiversService.java:146)

        at org.elasticsearch.river.RiversService$ApplyRivers$2.onResponse(RiversService.java:270)

        at org.elasticsearch.river.RiversService$ApplyRivers$2.onResponse(RiversService.java:264)

        at org.elasticsearch.action.support.TransportAction$ThreadedActionListener$1.run(TransportAc

 

I really don’t know why MongoDBRiver.start tries to resolve to the org.elasticsearch.client.action.admin.indices.create. CreateIndexRequestBuilder package instead of org.elasticsearch.action.admin.indices.create.CreateIndexRequestBuilder.

Any ideas guys?

Regards,

 

Janusz

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

Re: mongodb river plugin

dadoonet
With mongo river 1.6.0?


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


Le 30 déc. 2012 à 21:10, JD <[hidden email]> a écrit :

Hi,
Its elasticsearch 0.20.1.
Which version should I use?
Regards,
Janusz

On Sunday, December 30, 2012 9:58:25 PM UTC+11, JD wrote:

Hi,

I am trying to use mongodb river plugin – unfortunately without any success.

When I try to execute this command:

http://localhost:9200/_river/mongodb/_meta

{

    "type": "mongodb",

    "mongodb": {

        "db": "my_database",

        "collection": "ProductProduct"

    },

    "index": {

        "name": "mongoindex",

        "type": "ProductProduct"

    }

}

I am getting this exception:

 

Exception in thread "elasticsearch[Jazz][generic][T#4]" java.lang.NoSuchMethodError: org.elasticsear

ch.client.IndicesAdminClient.prepareCreate(Ljava/lang/String;)Lorg/elasticsearch/client/action/admin

/indices/create/CreateIndexRequestBuilder;

        at org.elasticsearch.river.mongodb.MongoDBRiver.start(MongoDBRiver.java:144)

        at org.elasticsearch.river.RiversService.createRiver(RiversService.java:146)

        at org.elasticsearch.river.RiversService$ApplyRivers$2.onResponse(RiversService.java:270)

        at org.elasticsearch.river.RiversService$ApplyRivers$2.onResponse(RiversService.java:264)

        at org.elasticsearch.action.support.TransportAction$ThreadedActionListener$1.run(TransportAc

 

I really don’t know why MongoDBRiver.start tries to resolve to the org.elasticsearch.client.action.admin.indices.create. CreateIndexRequestBuilder package instead of org.elasticsearch.action.admin.indices.create.CreateIndexRequestBuilder.

Any ideas guys?

Regards,

 

Janusz

--
 
 

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

Re: mongodb river plugin

Janusz Dalecki
In reply to this post by Janusz Dalecki
Sorry David for stupid question.
I don't seem to be able to find the version 1.6.0 of mongo river.
Would you know how to get it?
Regards,
Janusz

On Sunday, December 30, 2012 9:58:25 PM UTC+11, JD wrote:

Hi,

I am trying to use mongodb river plugin – unfortunately without any success.

When I try to execute this command:

http://localhost:9200/_river/mongodb/_meta

{

    "type": "mongodb",

    "mongodb": {

        "db": "my_database",

        "collection": "ProductProduct"

    },

    "index": {

        "name": "mongoindex",

        "type": "ProductProduct"

    }

}

I am getting this exception:

 

Exception in thread "elasticsearch[Jazz][generic][T#4]" java.lang.NoSuchMethodError: org.elasticsear

ch.client.IndicesAdminClient.prepareCreate(Ljava/lang/String;)Lorg/elasticsearch/client/action/admin

/indices/create/CreateIndexRequestBuilder;

        at org.elasticsearch.river.mongodb.MongoDBRiver.start(MongoDBRiver.java:144)

        at org.elasticsearch.river.RiversService.createRiver(RiversService.java:146)

        at org.elasticsearch.river.RiversService$ApplyRivers$2.onResponse(RiversService.java:270)

        at org.elasticsearch.river.RiversService$ApplyRivers$2.onResponse(RiversService.java:264)

        at org.elasticsearch.action.support.TransportAction$ThreadedActionListener$1.run(TransportAc

 

I really don’t know why MongoDBRiver.start tries to resolve to the org.elasticsearch.client.action.admin.indices.create. CreateIndexRequestBuilder package instead of org.elasticsearch.action.admin.indices.create.CreateIndexRequestBuilder.

Any ideas guys?

Regards,

 

Janusz

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

Re: mongodb river plugin

Janusz Dalecki
In reply to this post by Janusz Dalecki
Hi,
I have also tried to build 1.6.0 from repository using maven - but it gives me this error:
[ERROR] Failed to execute goal on project elasticsearch-river-mongodb: Could not resolve dependencies for project org.elasticsearch:elasticsearch-river-mongodb:jar:1.6.0: Could not find artifact de.flapdoodle.embed:de.flapdoodle.embed.mongo:jar:1.28-SNAPSHOT in sonatype-releases (http://oss.sonatype.org/content/repositories/releases) -> [Help 1]

Any help appreciated.
Regards,
Janusz

On Sunday, December 30, 2012 9:58:25 PM UTC+11, JD wrote:

Hi,

I am trying to use mongodb river plugin – unfortunately without any success.

When I try to execute this command:

http://localhost:9200/_river/mongodb/_meta

{

    "type": "mongodb",

    "mongodb": {

        "db": "my_database",

        "collection": "ProductProduct"

    },

    "index": {

        "name": "mongoindex",

        "type": "ProductProduct"

    }

}

I am getting this exception:

 

Exception in thread "elasticsearch[Jazz][generic][T#4]" java.lang.NoSuchMethodError: org.elasticsear

ch.client.IndicesAdminClient.prepareCreate(Ljava/lang/String;)Lorg/elasticsearch/client/action/admin

/indices/create/CreateIndexRequestBuilder;

        at org.elasticsearch.river.mongodb.MongoDBRiver.start(MongoDBRiver.java:144)

        at org.elasticsearch.river.RiversService.createRiver(RiversService.java:146)

        at org.elasticsearch.river.RiversService$ApplyRivers$2.onResponse(RiversService.java:270)

        at org.elasticsearch.river.RiversService$ApplyRivers$2.onResponse(RiversService.java:264)

        at org.elasticsearch.action.support.TransportAction$ThreadedActionListener$1.run(TransportAc

 

I really don’t know why MongoDBRiver.start tries to resolve to the org.elasticsearch.client.action.admin.indices.create. CreateIndexRequestBuilder package instead of org.elasticsearch.action.admin.indices.create.CreateIndexRequestBuilder.

Any ideas guys?

Regards,

 

Janusz

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

Re: mongodb river plugin

dadoonet
That strange. It's not a best pratice to release a version containing SNAPSHOT dependencies.
I suggest that to raise an issue to track it on https://github.com/richardwilly98/elasticsearch-river-mongodb/issues
 
Can't you install it with
bin\plugin -install richardwilly98/elasticsearch-river-mongodb/1.6.0
 
If it does not work, try to download it from https://github.com/downloads/richardwilly98/elasticsearch-river-mongodb/elasticsearch-river-mongodb-1.6.0.zip
 
HTH
David

Le 30 décembre 2012 à 22:21, JD <[hidden email]> a écrit :
Hi,
I have also tried to build 1.6.0 from repository using maven - but it gives me this error:
[ERROR] Failed to execute goal on project elasticsearch-river-mongodb: Could not resolve dependencies for project org.elasticsearch:elasticsearch-river-mongodb:jar:1.6.0: Could not find artifact de.flapdoodle.embed:de.flapdoodle.embed.mongo:jar:1.28-SNAPSHOT in sonatype-releases (http://oss.sonatype.org/content/repositories/releases) -> [Help 1]
 
Any help appreciated.
Regards,
Janusz

On Sunday, December 30, 2012 9:58:25 PM UTC+11, JD wrote:

 

Hi,

I am trying to use mongodb river plugin – unfortunately without any success.

When I try to execute this command:

http://localhost:9200/_river/mongodb/_meta

{

    "type": "mongodb",

    "mongodb": {

        "db": "my_database",

        "collection": "ProductProduct"

    },

    "index": {

        "name": "mongoindex",

        "type": "ProductProduct"

    }

}

I am getting this exception:

 

Exception in thread "elasticsearch[Jazz][generic][T#4]" java.lang.NoSuchMethodError: org.elasticsear

ch.client.IndicesAdminClient.prepareCreate(Ljava/lang/String;)Lorg/elasticsearch/client/action/admin

/indices/create/CreateIndexRequestBuilder;

        at org.elasticsearch.river.mongodb.MongoDBRiver.start(MongoDBRiver.java:144)

        at org.elasticsearch.river.RiversService.createRiver(RiversService.java:146)

        at org.elasticsearch.river.RiversService$ApplyRivers$2.onResponse(RiversService.java:270)

        at org.elasticsearch.river.RiversService$ApplyRivers$2.onResponse(RiversService.java:264)

        at org.elasticsearch.action.support.TransportAction$ThreadedActionListener$1.run(TransportAc

 

I really don’t know why MongoDBRiver.start tries to resolve to the org.elasticsearch.client.action.admin.indices.create. CreateIndexRequestBuilder package instead of org.elasticsearch.action.admin.indices.create.CreateIndexRequestBuilder.

Any ideas guys?

Regards,

 

Janusz

 

--
 
 

 

--
David Pilato
http://www.scrutmydocs.org/
http://dev.david.pilato.fr/
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

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

Re: mongodb river plugin

Janusz Dalecki
In reply to this post by Janusz Dalecki

Hi,

Thanks for the tips. After following your instructions I don’t get any more exceptions – however now I get this error below:

[2012-12-31 16:14:12,281][INFO ][river.mongodb            ] [Magus] [mongodb][mongodb] starting mongodb server

(s): host [localhost], port [27017]

[2012-12-31 16:14:12,282][INFO ][river.mongodb            ] [Magus] [mongodb][mongodb] starting mongodb stream: options: secondaryreadpreference [false], gridfs [false], filter [testmongo], db [mongoindex], indexing to [person]/[{}]

[2012-12-31 16:14:13,006][ERROR][river.mongodb            ] [Magus] [mongodb][mongodb] Cannot find oplog.rs collection. Please use check this link: http://goo.gl/2x5IW

When I follow the instructions from mongodb plugin site to create the index and the document  - like the ones below:

curl -XPUT 'http://localhost:9200/_river/mongodb/_meta' -d '{

    "type": "mongodb",

    "mongodb": {

        "db": "testmongo",

        "collection": "person"

    },

    "index": {

        "name": "mongoindex",

        "type": "person"

    }

}'

In the mongodb command console I execute:

use testmongo

var p = {firstName: "John", lastName: "Doe"}

db.person.save(p)

 

Then when I execute the instruction below:

curl -XGET 'http://localhost:9200/mongoindex/_search?q=firstName:John'

… I always get an empty result, like below (hits.total = 0):

{

    "took": 25,

    "timed_out": false,

    "_shards": {

        "total": 5,

        "successful": 5,

        "failed": 0

    },

    "hits": {

        "total": 0,

        "max_score": null,

        "hits": []

    }

}

I suspect the reason for that is the error that comes when I start elasticsearch (with mongodb river plugin):

Cannot find oplog.rs collection

I have no idea what the problem is. I have found some answers talking about some “replica set” set on MongoDB, but I have standalone MongoDB – just one node (localhost: 27017).

I am using MongoDb version: 2.2.2-rc1, elasticsearch-0.20.1 and Mongo River Plugin 1.6.0

Regards,

 

Janusz


On Sunday, December 30, 2012 9:58:25 PM UTC+11, JD wrote:

Hi,

I am trying to use mongodb river plugin – unfortunately without any success.

When I try to execute this command:

http://localhost:9200/_river/mongodb/_meta

{

    "type": "mongodb",

    "mongodb": {

        "db": "my_database",

        "collection": "ProductProduct"

    },

    "index": {

        "name": "mongoindex",

        "type": "ProductProduct"

    }

}

I am getting this exception:

 

Exception in thread "elasticsearch[Jazz][generic][T#4]" java.lang.NoSuchMethodError: org.elasticsear

ch.client.IndicesAdminClient.prepareCreate(Ljava/lang/String;)Lorg/elasticsearch/client/action/admin

/indices/create/CreateIndexRequestBuilder;

        at org.elasticsearch.river.mongodb.MongoDBRiver.start(MongoDBRiver.java:144)

        at org.elasticsearch.river.RiversService.createRiver(RiversService.java:146)

        at org.elasticsearch.river.RiversService$ApplyRivers$2.onResponse(RiversService.java:270)

        at org.elasticsearch.river.RiversService$ApplyRivers$2.onResponse(RiversService.java:264)

        at org.elasticsearch.action.support.TransportAction$ThreadedActionListener$1.run(TransportAc

 

I really don’t know why MongoDBRiver.start tries to resolve to the org.elasticsearch.client.action.admin.indices.create. CreateIndexRequestBuilder package instead of org.elasticsearch.action.admin.indices.create.CreateIndexRequestBuilder.

Any ideas guys?

Regards,

 

Janusz

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

Re: mongodb river plugin

dadoonet
You have to fix this error before searching in ES. The river is not working.
Unfortunately, I don't use MongoDB myself so I can't help more here. 
 
My last advice can be "follow instructions here:  https://github.com/richardwilly98/elasticsearch-river-mongodb/wiki"
 
> The current implementation monitors oplog collection from the local database. Make sure to enable replica set  0. It does not support master / slave replication. Monitoring is done using tailable cursor  1. All operations are supported: insert, update, delete.
 
 
David.
 
Le 31 décembre 2012 à 11:40, JD <[hidden email]> a écrit :

 

Hi,

Thanks for the tips. After following your instructions I don’t get any more exceptions – however now I get this error below:

[2012-12-31 16:14:12,281][INFO ][river.mongodb            ] [Magus] [mongodb][mongodb] starting mongodb server

(s): host [localhost], port [27017]

[2012-12-31 16:14:12,282][INFO ][river.mongodb            ] [Magus] [mongodb][mongodb] starting mongodb stream: options: secondaryreadpreference [false], gridfs [false], filter [testmongo], db [mongoindex], indexing to [person]/[{}]

[2012-12-31 16:14:13,006][ERROR][river.mongodb            ] [Magus] [mongodb][mongodb] Cannot find oplog.rs collection. Please use check this link: http://goo.gl/2x5IW

When I follow the instructions from mongodb plugin site to create the index and the document  - like the ones below:

curl -XPUT 'http://localhost:9200/_river/mongodb/_meta' -d '{

    "type": "mongodb",

    "mongodb": {

        "db": "testmongo",

        "collection": "person"

    },

    "index": {

        "name": "mongoindex",

        "type": "person"

    }

}'

In the mongodb command console I execute:

use testmongo

var p = {firstName: "John", lastName: "Doe"}

db.person.save(p)

 

Then when I execute the instruction below:

curl -XGET 'http://localhost:9200/mongoindex/_search?q=firstName:John'

… I always get an empty result, like below (hits.total = 0):

{

    "took": 25,

    "timed_out": false,

    "_shards": {

        "total": 5,

        "successful": 5,

        "failed": 0

    },

    "hits": {

        "total": 0,

        "max_score": null,

        "hits": []

    }

}

I suspect the reason for that is the error that comes when I start elasticsearch (with mongodb river plugin):

Cannot find oplog.rs collection

I have no idea what the problem is. I have found some answers talking about some “replica set” set on MongoDB, but I have standalone MongoDB – just one node (localhost: 27017).

I am using MongoDb version: 2.2.2-rc1, elasticsearch-0.20.1 and Mongo River Plugin 1.6.0

Regards,

 

Janusz

 


On Sunday, December 30, 2012 9:58:25 PM UTC+11, JD wrote:

 

Hi,

I am trying to use mongodb river plugin – unfortunately without any success.

When I try to execute this command:

http://localhost:9200/_river/mongodb/_meta

{

    "type": "mongodb",

    "mongodb": {

        "db": "my_database",

        "collection": "ProductProduct"

    },

    "index": {

        "name": "mongoindex",

        "type": "ProductProduct"

    }

}

I am getting this exception:

 

Exception in thread "elasticsearch[Jazz][generic][T#4]" java.lang.NoSuchMethodError: org.elasticsear

ch.client.IndicesAdminClient.prepareCreate(Ljava/lang/String;)Lorg/elasticsearch/client/action/admin

/indices/create/CreateIndexRequestBuilder;

        at org.elasticsearch.river.mongodb.MongoDBRiver.start(MongoDBRiver.java:144)

        at org.elasticsearch.river.RiversService.createRiver(RiversService.java:146)

        at org.elasticsearch.river.RiversService$ApplyRivers$2.onResponse(RiversService.java:270)

        at org.elasticsearch.river.RiversService$ApplyRivers$2.onResponse(RiversService.java:264)

        at org.elasticsearch.action.support.TransportAction$ThreadedActionListener$1.run(TransportAc

 

I really don’t know why MongoDBRiver.start tries to resolve to the org.elasticsearch.client.action.admin.indices.create. CreateIndexRequestBuilder package instead of org.elasticsearch.action.admin.indices.create.CreateIndexRequestBuilder.

Any ideas guys?

Regards,

 

Janusz

 

--
 
 

 
 

--
David Pilato
http://www.scrutmydocs.org/
http://dev.david.pilato.fr/
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

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

Re: mongodb river plugin

ChrisB
I know this post is a few months old, but I ran into this problem as well and did find a solution: http://loosexaml.wordpress.com/2012/09/03/how-to-get-a-mongodb-oplog-without-a-full-replica-set/.  

In case that link goes down, I'll repro the relevant parts here.  You need to set up a replica set, regardless of whether you're running a single MongoDB node or not: configure your mongodb instance to have a replica set name and oplog size by adding

replSet=rs0
oplogSize=100

to the config file, restart mongod, open the mongo shell, and run "rs.initiate()" to initiate your single node replica set.  The river commands/indexing should work after that.

~Chris

On Monday, December 31, 2012 2:52:18 AM UTC-8, David Pilato wrote:
You have to fix this error before searching in ES. The river is not working.
Unfortunately, I don't use MongoDB myself so I can't help more here. 
 
My last advice can be "follow instructions here:  https://github.com/richardwilly98/elasticsearch-river-mongodb/wiki"
 
> The current implementation monitors oplog collection from the local database. Make sure to enable replica set  0. It does not support master / slave replication. Monitoring is done using tailable cursor  1. All operations are supported: insert, update, delete.
 
 
David.
 
Le 31 décembre 2012 à 11:40, JD <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="rYc19D2EvFoJ">jdal...@...> a écrit :

 

Hi,

Thanks for the tips. After following your instructions I don’t get any more exceptions – however now I get this error below:

[2012-12-31 16:14:12,281][INFO ][river.mongodb            ] [Magus] [mongodb][mongodb] starting mongodb server

(s): host [localhost], port [27017]

[2012-12-31 16:14:12,282][INFO ][river.mongodb            ] [Magus] [mongodb][mongodb] starting mongodb stream: options: secondaryreadpreference [false], gridfs [false], filter [testmongo], db [mongoindex], indexing to [person]/[{}]

[2012-12-31 16:14:13,006][ERROR][river.mongodb            ] [Magus] [mongodb][mongodb] Cannot find oplog.rs collection. Please use check this link: http://goo.gl/2x5IW

When I follow the instructions from mongodb plugin site to create the index and the document  - like the ones below:

curl -XPUT 'http://localhost:9200/_river/mongodb/_meta' -d '{

    "type": "mongodb",

    "mongodb": {

        "db": "testmongo",

        "collection": "person"

    },

    "index": {

        "name": "mongoindex",

        "type": "person"

    }

}'

In the mongodb command console I execute:

use testmongo

var p = {firstName: "John", lastName: "Doe"}

db.person.save(p)

 

Then when I execute the instruction below:

curl -XGET 'http://localhost:9200/mongoindex/_search?q=firstName:John'

… I always get an empty result, like below (hits.total = 0):

{

    "took": 25,

    "timed_out": false,

    "_shards": {

        "total": 5,

        "successful": 5,

        "failed": 0

    },

    "hits": {

        "total": 0,

        "max_score": null,

        "hits": []

    }

}

I suspect the reason for that is the error that comes when I start elasticsearch (with mongodb river plugin):

Cannot find oplog.rs collection

I have no idea what the problem is. I have found some answers talking about some “replica set” set on MongoDB, but I have standalone MongoDB – just one node (localhost: 27017).

I am using MongoDb version: 2.2.2-rc1, elasticsearch-0.20.1 and Mongo River Plugin 1.6.0

Regards,

 

Janusz

 


On Sunday, December 30, 2012 9:58:25 PM UTC+11, JD wrote:

 

Hi,

I am trying to use mongodb river plugin – unfortunately without any success.

When I try to execute this command:

http://localhost:9200/_river/mongodb/_meta

{

    "type": "mongodb",

    "mongodb": {

        "db": "my_database",

        "collection": "ProductProduct"

    },

    "index": {

        "name": "mongoindex",

        "type": "ProductProduct"

    }

}

I am getting this exception:

 

Exception in thread "elasticsearch[Jazz][generic][T#4]" java.lang.NoSuchMethodError: org.elasticsear

ch.client.IndicesAdminClient.prepareCreate(Ljava/lang/String;)Lorg/elasticsearch/client/action/admin

/indices/create/CreateIndexRequestBuilder;

        at org.elasticsearch.river.mongodb.MongoDBRiver.start(MongoDBRiver.java:144)

        at org.elasticsearch.river.RiversService.createRiver(RiversService.java:146)

        at org.elasticsearch.river.RiversService$ApplyRivers$2.onResponse(RiversService.java:270)

        at org.elasticsearch.river.RiversService$ApplyRivers$2.onResponse(RiversService.java:264)

        at org.elasticsearch.action.support.TransportAction$ThreadedActionListener$1.run(TransportAc

 

I really don’t know why MongoDBRiver.start tries to resolve to the org.elasticsearch.client.action.admin.indices.create. CreateIndexRequestBuilder package instead of org.elasticsearch.action.admin.indices.create.CreateIndexRequestBuilder.

Any ideas guys?

Regards,

 

Janusz

 

--
 
 

 
 

--
David Pilato
http://www.scrutmydocs.org/
http://dev.david.pilato.fr/
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: mongodb river plugin

Way Cool
Still not working. No errors at all though. Just did not return anything.
Reply | Threaded
Open this post in threaded view
|

Re: mongodb river plugin

saiprasad mishra
This post has NOT been accepted by the mailing list yet.
The following versions combinations worked for me .. all usecases like insert/update/delete a mongo document and flowing to elastic search

Configure a replicaset like below in mongo 2.2.1 mac osx version

mongod --port 27017 --dbpath /data/db0 --replSet rs0 --smallfiles --oplogSize 128
mongod --port 27018 --dbpath /data/db1 --replSet rs0 --smallfiles --oplogSize 128
mongod --port 27019 --dbpath /data/db2 --replSet rs0 --smallfiles --oplogSize 128

Intall the following river plugin and dependencies

ES_HOME/bin/plugin -install mobz/elasticsearch-head - optional in case you want to see whats happening in elastic search visually and query

ES_HOME/bin/plugin -install elasticsearch/elasticsearch-mapper-attachments/1.7.0

%ES_HOME%\bin\plugin.bat -url https://oss.sonatype.org/content/repositories/releases/com/github/richardwilly98/elasticsearch/elasticsearch-river-mongodb/1.6.8/elasticsearch-river-mongodb-1.6.8.zip -install river-mongodb


The index was created by pointing to the primary

curl -XPUT "localhost:9200/_river/mydb/_meta" -d '
{
  "type": "mongodb",
  "mongodb": {
    "servers": [
      { "host": "xxx", "port": 27017 }
    ],
    "db": "mydb",
    "collection": "sampleDoc"
  },
  "index": {
    "name": "mongoindex10",
    "type": "sampleDoc"
  }
}'



Reply | Threaded
Open this post in threaded view
|

Re: mongodb river plugin

saiprasad mishra
In reply to this post by Way Cool
The following versions combinations worked for me .. all usecases like insert/update/delete a mongo document and flowing to elastic search 

Configure a replicaset like below in mongo 2.2.1 mac osx version 

mongod --port 27017 --dbpath /data/db0 --replSet rs0 --smallfiles --oplogSize 128 
mongod --port 27018 --dbpath /data/db1 --replSet rs0 --smallfiles --oplogSize 128 
mongod --port 27019 --dbpath /data/db2 --replSet rs0 --smallfiles --oplogSize 128 

Intall the following river plugin and dependencies 

ES_HOME/bin/plugin -install mobz/elasticsearch-head - optional in case you want to see whats happening in elastic search visually and query 

ES_HOME/bin/plugin -install elasticsearch/elasticsearch-mapper-attachments/1.7.0 

%ES_HOME%\bin\plugin.bat -url https://oss.sonatype.org/content/repositories/releases/com/github/richardwilly98/elasticsearch/elasticsearch-river-mongodb/1.6.8/elasticsearch-river-mongodb-1.6.8.zip -install river-mongodb 


The index was created by pointing to the primary 

curl -XPUT "localhost:9200/_river/mydb/_meta" -d ' 

  "type": "mongodb", 
  "mongodb": { 
    "servers": [ 
      { "host": "xxx", "port": 27017 } 
    ], 
    "db": "mydb", 
    "collection": "sampleDoc" 
  }, 
  "index": { 
    "name": "mongoindex10", 
    "type": "sampleDoc" 
  } 
}' 

On Thursday, March 28, 2013 4:41:00 PM UTC-7, Way Cool wrote:
Still not working. No errors at all though. Just did not return anything.



--
View this message in context: http://elasticsearch-users.115913.n3.nabble.com/mongodb-river-plugin-tp4027551p4032585.html
Sent from the ElasticSearch Users mailing list archive at Nabble.com.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.