Integrate (Install) ActiveMQ river in embedded elastic search

Hello everybody,

I intend to use ActiveMQ river and elasticsearch integrated in the same JVM.
In the ActiveMQ river installation guide is mention the following command

bin/plugin -install domdorn/elasticsearch-river-activemq/1.0.

What should I do to have the same effect from java code? I want to have
ActiveMQ, ActiveMQ river and Elasticsearch in the same java virtual machine.

Thank you very much,
Doru

--
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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/50d5603e-21d4-4a06-8867-87c982ba1b7c%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

I guess you just need to add the river jar and its dependencies in your class path.

If you use Maven, it should be very easy.

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr

Le 19 février 2014 à 13:56:11, Doru Sular (doru.sular@gmail.com) a écrit:

Hello everybody,

I intend to use ActiveMQ river and elasticsearch integrated in the same JVM.
In the ActiveMQ river installation guide is mention the following command

bin/plugin -install domdorn/elasticsearch-river-activemq/1.0.

What should I do to have the same effect from java code? I want to have ActiveMQ, ActiveMQ river and Elasticsearch in the same java virtual machine.

Thank you very much,
Doru

--
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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/50d5603e-21d4-4a06-8867-87c982ba1b7c%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/etPan.5304c5ec.74b0dc51.3861%40MacBook-Air-de-David.local.
For more options, visit https://groups.google.com/groups/opt_out.

That's all?
I don't need any ES api calls? I will try it soon, thank you very much!
Doru

On Wednesday, February 19, 2014 3:55:40 PM UTC+1, David Pilato wrote:

I guess you just need to add the river jar and its dependencies in your
class path.

If you use Maven, it should be very easy.

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet https://twitter.com/dadoonet | @elasticsearchfrhttps://twitter.com/elasticsearchfr

Le 19 février 2014 à 13:56:11, Doru Sular (doru....@gmail.com<javascript:>)
a écrit:

Hello everybody,

I intend to use ActiveMQ river and elasticsearch integrated in the same
JVM.
In the ActiveMQ river installation guide is mention the following command

bin/plugin -install domdorn/elasticsearch-river-activemq/1.0.

What should I do to have the same effect from java code? I want to have
ActiveMQ, ActiveMQ river and Elasticsearch in the same java virtual machine.

Thank you very much,
Doru

--
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 elasticsearc...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/50d5603e-21d4-4a06-8867-87c982ba1b7c%40googlegroups.com
.
For more options, visit https://groups.google.com/groups/opt_out.

--
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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/b9ce5266-e452-4d92-ae53-f611541dded8%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

As soon as the jar file have a es-plugin.properties file, it will be loaded by the node.

Of course, you will need then to create the river itself which will require one API Call (prepareIndex).

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

Le 19 févr. 2014 à 17:07, Doru Sular doru.sular@gmail.com a écrit :

That's all?
I don't need any ES api calls? I will try it soon, thank you very much!
Doru

On Wednesday, February 19, 2014 3:55:40 PM UTC+1, David Pilato wrote:

I guess you just need to add the river jar and its dependencies in your class path.

If you use Maven, it should be very easy.

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr

Le 19 février 2014 à 13:56:11, Doru Sular (doru....@gmail.com) a écrit:

Hello everybody,

I intend to use ActiveMQ river and elasticsearch integrated in the same JVM.
In the ActiveMQ river installation guide is mention the following command

bin/plugin -install domdorn/elasticsearch-river-activemq/1.0.

What should I do to have the same effect from java code? I want to have ActiveMQ, ActiveMQ river and Elasticsearch in the same java virtual machine.

Thank you very much,
Doru

--
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 elasticsearc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/50d5603e-21d4-4a06-8867-87c982ba1b7c%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/b9ce5266-e452-4d92-ae53-f611541dded8%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/3B318930-1D8F-44E9-82AD-1E95E9099A23%40pilato.fr.
For more options, visit https://groups.google.com/groups/opt_out.

Hi David

I have successfully created the riever, unfortunatelly the the documents
are not stored in the index I specify. I can see via debugger that the
messages are taken from the queue, but the bulk request is failing,
Here is my confdiguration:
public void createRiver()
{
try
{
XContentBuilder riverSource = XContentFactory.jsonBuilder().
startObject() //
.field("type", "activemq") //
.startObject("activemq") //
.field("brokerUrl", "vm://localhost") //
.field("sourceType", "queue") //
.field("sourceName", "elasticsearch") //
.field("consumerName",
"activemq_elasticsearch_river_pilot_river") //
.field("durable", false) //
.field("filter", "") //
.endObject() //
.startObject("index") //
.field("name", "pilot-logs")
.field("type", "messages")
.field("bulk_size", 100) //
.field("bulk_timeout", "10ms") //
.endObject() //
.endObject(); // main object

        this.client.index(Requests.indexRequest("_river").type(

"pilot_river").id("_meta").source(riverSource))
.actionGet();
}
catch (IOException e)
{
e.printStackTrace();
}
}

The index where I need to have my messages is called "pilot-logs".
Do you have any suggestions?
Thank you very much,
Doru

On Wednesday, February 19, 2014 7:37:58 PM UTC+1, David Pilato wrote:

As soon as the jar file have a es-plugin.properties file, it will be
loaded by the node.

Of course, you will need then to create the river itself which will
require one API Call (prepareIndex).

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

Le 19 févr. 2014 à 17:07, Doru Sular <doru....@gmail.com <javascript:>> a
écrit :

That's all?
I don't need any ES api calls? I will try it soon, thank you very much!
Doru

On Wednesday, February 19, 2014 3:55:40 PM UTC+1, David Pilato wrote:

I guess you just need to add the river jar and its dependencies in your
class path.

If you use Maven, it should be very easy.

--
David Pilato | Technical Advocate | Elasticsearch.com
http://Elasticsearch.com

@dadoonet https://twitter.com/dadoonet | @elasticsearchfrhttps://twitter.com/elasticsearchfr

Le 19 février 2014 à 13:56:11, Doru Sular (doru....@gmail.com) a écrit:

Hello everybody,

I intend to use ActiveMQ river and elasticsearch integrated in the same
JVM.
In the ActiveMQ river installation guide is mention the following command

bin/plugin -install domdorn/elasticsearch-river-activemq/1.0.

What should I do to have the same effect from java code? I want to have
ActiveMQ, ActiveMQ river and Elasticsearch in the same java virtual machine.

Thank you very much,
Doru

--
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 elasticsearc...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/50d5603e-21d4-4a06-8867-87c982ba1b7c%40googlegroups.com
.
For more options, visit https://groups.google.com/groups/opt_out.

--
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 elasticsearc...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/b9ce5266-e452-4d92-ae53-f611541dded8%40googlegroups.com
.
For more options, visit https://groups.google.com/groups/opt_out.

--
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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/b7b604d0-1676-476d-8c2c-c920c33bfa7b%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

What say logs?

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

Le 20 févr. 2014 à 13:00, Doru Sular doru.sular@gmail.com a écrit :

Hi David

I have successfully created the riever, unfortunatelly the the documents are not stored in the index I specify. I can see via debugger that the messages are taken from the queue, but the bulk request is failing,
Here is my confdiguration:
public void createRiver()
{
try
{
XContentBuilder riverSource = XContentFactory.jsonBuilder().startObject() //
.field("type", "activemq") //
.startObject("activemq") //
.field("brokerUrl", "vm://localhost") //
.field("sourceType", "queue") //
.field("sourceName", "elasticsearch") //
.field("consumerName", "activemq_elasticsearch_river_pilot_river") //
.field("durable", false) //
.field("filter", "") //
.endObject() //
.startObject("index") //
.field("name", "pilot-logs")
.field("type", "messages")
.field("bulk_size", 100) //
.field("bulk_timeout", "10ms") //
.endObject() //
.endObject(); // main object

        this.client.index(Requests.indexRequest("_river").type("pilot_river").id("_meta").source(riverSource))
                .actionGet();
        }
    catch (IOException e)
        {
        e.printStackTrace();
        }
    }

The index where I need to have my messages is called "pilot-logs".
Do you have any suggestions?
Thank you very much,
Doru

On Wednesday, February 19, 2014 7:37:58 PM UTC+1, David Pilato wrote:

As soon as the jar file have a es-plugin.properties file, it will be loaded by the node.

Of course, you will need then to create the river itself which will require one API Call (prepareIndex).

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

Le 19 févr. 2014 à 17:07, Doru Sular doru....@gmail.com a écrit :

That's all?
I don't need any ES api calls? I will try it soon, thank you very much!
Doru

On Wednesday, February 19, 2014 3:55:40 PM UTC+1, David Pilato wrote:

I guess you just need to add the river jar and its dependencies in your class path.

If you use Maven, it should be very easy.

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr

Le 19 février 2014 à 13:56:11, Doru Sular (doru....@gmail.com) a écrit:

Hello everybody,

I intend to use ActiveMQ river and elasticsearch integrated in the same JVM.
In the ActiveMQ river installation guide is mention the following command

bin/plugin -install domdorn/elasticsearch-river-activemq/1.0.

What should I do to have the same effect from java code? I want to have ActiveMQ, ActiveMQ river and Elasticsearch in the same java virtual machine.

Thank you very much,
Doru

--
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 elasticsearc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/50d5603e-21d4-4a06-8867-87c982ba1b7c%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
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 elasticsearc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/b9ce5266-e452-4d92-ae53-f611541dded8%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/b7b604d0-1676-476d-8c2c-c920c33bfa7b%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/DC8987A7-4436-40A3-8157-3942797CE0F8%40pilato.fr.
For more options, visit https://groups.google.com/groups/opt_out.

The exception is:
"org.elasticsearch.action.ActionRequestValidationException: Validation
Failed: 1: no requests added;"

I have the feeling that the messages in queue should be alternante:

{ "index" : { "_index" : "twitter", "_type" : "tweet", "_id" : "1" } }
{ "tweet" : { "text" : "this is first tweet" } }

{ "index" : { "_index" : "twitter", "_type" : "tweet", "_id" : "1" } }
{ "tweet" : { "text" : "this is second tweet" } }

{ "index" : { "_index" : "twitter", "_type" : "tweet", "_id" : "1" } }
{ "tweet" : { "text" : "this is third tweet" } }

That's the way how bulk api is working? Each real message should be
prefixed by the index command? Or I can have

{ "index" : { "_index" : "twitter", "_type" : "tweet", "_id" : "1" } }
{ "tweet" : { "text" : "this is first tweet" } }
{ "tweet" : { "text" : "this is second tweet" } }
{ "tweet" : { "text" : "this is third tweet" } }

?
I am a little bit confused...

On Thursday, February 20, 2014 1:13:25 PM UTC+1, David Pilato wrote:

What say logs?

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

Le 20 févr. 2014 à 13:00, Doru Sular <doru....@gmail.com <javascript:>> a
écrit :

Hi David

I have successfully created the riever, unfortunatelly the the documents
are not stored in the index I specify. I can see via debugger that the
messages are taken from the queue, but the bulk request is failing,
Here is my confdiguration:
public void createRiver()
{
try
{
XContentBuilder riverSource = XContentFactory.jsonBuilder().
startObject() //
.field("type", "activemq") //
.startObject("activemq") //
.field("brokerUrl", "vm://localhost") //
.field("sourceType", "queue") //
.field("sourceName", "elasticsearch") //
.field("consumerName",
"activemq_elasticsearch_river_pilot_river") //
.field("durable", false) //
.field("filter", "") //
.endObject() //
.startObject("index") //
.field("name", "pilot-logs")
.field("type", "messages")
.field("bulk_size", 100) //
.field("bulk_timeout", "10ms") //
.endObject() //
.endObject(); // main object

        this.client.index(Requests.indexRequest("_river").type(

"pilot_river").id("_meta").source(riverSource))
.actionGet();
}
catch (IOException e)
{
e.printStackTrace();
}
}

The index where I need to have my messages is called "pilot-logs".
Do you have any suggestions?
Thank you very much,
Doru

On Wednesday, February 19, 2014 7:37:58 PM UTC+1, David Pilato wrote:

As soon as the jar file have a es-plugin.properties file, it will be
loaded by the node.

Of course, you will need then to create the river itself which will
require one API Call (prepareIndex).

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

Le 19 févr. 2014 à 17:07, Doru Sular doru....@gmail.com a écrit :

That's all?
I don't need any ES api calls? I will try it soon, thank you very much!
Doru

On Wednesday, February 19, 2014 3:55:40 PM UTC+1, David Pilato wrote:

I guess you just need to add the river jar and its dependencies in your
class path.

If you use Maven, it should be very easy.

--
David Pilato | Technical Advocate | Elasticsearch.com
http://Elasticsearch.com

@dadoonet https://twitter.com/dadoonet | @elasticsearchfrhttps://twitter.com/elasticsearchfr

Le 19 février 2014 à 13:56:11, Doru Sular (doru....@gmail.com) a écrit:

Hello everybody,

I intend to use ActiveMQ river and elasticsearch integrated in the same
JVM.
In the ActiveMQ river installation guide is mention the following command

bin/plugin -install domdorn/elasticsearch-river-activemq/1.0.

What should I do to have the same effect from java code? I want to have
ActiveMQ, ActiveMQ river and Elasticsearch in the same java virtual machine.

Thank you very much,
Doru

--
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 elasticsearc...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/50d5603e-21d4-4a06-8867-87c982ba1b7c%40googlegroups.com
.
For more options, visit https://groups.google.com/groups/opt_out.

--
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 elasticsearc...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/b9ce5266-e452-4d92-ae53-f611541dded8%40googlegroups.com
.
For more options, visit https://groups.google.com/groups/opt_out.

--
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 elasticsearc...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/b7b604d0-1676-476d-8c2c-c920c33bfa7b%40googlegroups.com
.
For more options, visit https://groups.google.com/groups/opt_out.

--
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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/b494f678-b864-47c6-b89f-cc45539bb891%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No you can not have the later format.

Check Bulk API docs: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-bulk.html

Don't forget the last \n char BTW.

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr

Le 20 février 2014 à 14:51:23, Doru Sular (doru.sular@gmail.com) a écrit:

The exception is:
"org.elasticsearch.action.ActionRequestValidationException: Validation Failed: 1: no requests added;"

I have the feeling that the messages in queue should be alternante:

{ "index" : { "_index" : "twitter", "_type" : "tweet", "_id" : "1" } }
{ "tweet" : { "text" : "this is first tweet" } }

{ "index" : { "_index" : "twitter", "_type" : "tweet", "_id" : "1" } }
{ "tweet" : { "text" : "this is second tweet" } }

{ "index" : { "_index" : "twitter", "_type" : "tweet", "_id" : "1" } }
{ "tweet" : { "text" : "this is third tweet" } }

That's the way how bulk api is working? Each real message should be prefixed by the index command? Or I can have

{ "index" : { "_index" : "twitter", "_type" : "tweet", "_id" : "1" } }
{ "tweet" : { "text" : "this is first tweet" } }
{ "tweet" : { "text" : "this is second tweet" } }
{ "tweet" : { "text" : "this is third tweet" } }

?
I am a little bit confused...

On Thursday, February 20, 2014 1:13:25 PM UTC+1, David Pilato wrote:
What say logs?

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

Le 20 févr. 2014 à 13:00, Doru Sular doru....@gmail.com a écrit :

Hi David

I have successfully created the riever, unfortunatelly the the documents are not stored in the index I specify. I can see via debugger that the messages are taken from the queue, but the bulk request is failing,
Here is my confdiguration:
public void createRiver()
{
try
{
XContentBuilder riverSource = XContentFactory.jsonBuilder().startObject() //
.field("type", "activemq") //
.startObject("activemq") //
.field("brokerUrl", "vm://localhost") //
.field("sourceType", "queue") //
.field("sourceName", "elasticsearch") //
.field("consumerName", "activemq_elasticsearch_river_pilot_river") //
.field("durable", false) //
.field("filter", "") //
.endObject() //
.startObject("index") //
.field("name", "pilot-logs")
.field("type", "messages")
.field("bulk_size", 100) //
.field("bulk_timeout", "10ms") //
.endObject() //
.endObject(); // main object

        this.client.index(Requests.indexRequest("_river").type("pilot_river").id("_meta").source(riverSource))
                .actionGet();
        }
    catch (IOException e)
        {
        e.printStackTrace();
        }
    }

The index where I need to have my messages is called "pilot-logs".
Do you have any suggestions?
Thank you very much,
Doru

On Wednesday, February 19, 2014 7:37:58 PM UTC+1, David Pilato wrote:
As soon as the jar file have a es-plugin.properties file, it will be loaded by the node.

Of course, you will need then to create the river itself which will require one API Call (prepareIndex).

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

Le 19 févr. 2014 à 17:07, Doru Sular doru....@gmail.com a écrit :

That's all?
I don't need any ES api calls? I will try it soon, thank you very much!
Doru

On Wednesday, February 19, 2014 3:55:40 PM UTC+1, David Pilato wrote:
I guess you just need to add the river jar and its dependencies in your class path.

If you use Maven, it should be very easy.

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr

Le 19 février 2014 à 13:56:11, Doru Sular (doru....@gmail.com) a écrit:

Hello everybody,

I intend to use ActiveMQ river and elasticsearch integrated in the same JVM.
In the ActiveMQ river installation guide is mention the following command

bin/plugin -install domdorn/elasticsearch-river-activemq/1.0.

What should I do to have the same effect from java code? I want to have ActiveMQ, ActiveMQ river and Elasticsearch in the same java virtual machine.

Thank you very much,
Doru

--
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 elasticsearc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/50d5603e-21d4-4a06-8867-87c982ba1b7c%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

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 elasticsearc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/b9ce5266-e452-4d92-ae53-f611541dded8%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

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 elasticsearc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/b7b604d0-1676-476d-8c2c-c920c33bfa7b%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/b494f678-b864-47c6-b89f-cc45539bb891%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/etPan.53060a9a.109cf92e.3fd6%40MacBook-Air-de-David.local.
For more options, visit https://groups.google.com/groups/opt_out.

Thank you very much, I will try again.
Doru

On Thursday, February 20, 2014 3:00:58 PM UTC+1, David Pilato wrote:

No you can not have the later format.

Check Bulk API docs:
Elasticsearch Platform — Find real-time answers at scale | Elastic

Don't forget the last \n char BTW.

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet https://twitter.com/dadoonet | @elasticsearchfrhttps://twitter.com/elasticsearchfr

Le 20 février 2014 à 14:51:23, Doru Sular (doru....@gmail.com<javascript:>)
a écrit:

The exception is:
"org.elasticsearch.action.ActionRequestValidationException: Validation
Failed: 1: no requests added;"

I have the feeling that the messages in queue should be alternante:

{ "index" : { "_index" : "twitter", "_type" : "tweet", "_id" : "1" } }
{ "tweet" : { "text" : "this is first tweet" } }

{ "index" : { "_index" : "twitter", "_type" : "tweet", "_id" : "1" } }
{ "tweet" : { "text" : "this is second tweet" } }

{ "index" : { "_index" : "twitter", "_type" : "tweet", "_id" : "1" } }
{ "tweet" : { "text" : "this is third tweet" } }

That's the way how bulk api is working? Each real message should be
prefixed by the index command? Or I can have

{ "index" : { "_index" : "twitter", "_type" : "tweet", "_id" : "1" } }
{ "tweet" : { "text" : "this is first tweet" } }
{ "tweet" : { "text" : "this is second tweet" } }
{ "tweet" : { "text" : "this is third tweet" } }

?
I am a little bit confused...

On Thursday, February 20, 2014 1:13:25 PM UTC+1, David Pilato wrote:

What say logs?

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

Le 20 févr. 2014 à 13:00, Doru Sular doru....@gmail.com a écrit :

Hi David

I have successfully created the riever, unfortunatelly the the documents
are not stored in the index I specify. I can see via debugger that the
messages are taken from the queue, but the bulk request is failing,
Here is my confdiguration:
public void createRiver()
{
try
{
XContentBuilder riverSource = XContentFactory.jsonBuilder().
startObject() //
.field("type", "activemq") //
.startObject("activemq") //
.field("brokerUrl", "vm://localhost") //
.field("sourceType", "queue") //
.field("sourceName", "elasticsearch") //
.field("consumerName",
"activemq_elasticsearch_river_pilot_river") //
.field("durable", false) //
.field("filter", "") //
.endObject() //
.startObject("index") //
.field("name", "pilot-logs")
.field("type", "messages")
.field("bulk_size", 100) //
.field("bulk_timeout", "10ms") //
.endObject() //
.endObject(); // main object

        this.client.index(Requests.indexRequest("_river").type(

"pilot_river").id("_meta").source(riverSource))
.actionGet();
}
catch (IOException e)
{
e.printStackTrace();
}
}

The index where I need to have my messages is called "pilot-logs".
Do you have any suggestions?
Thank you very much,
Doru

On Wednesday, February 19, 2014 7:37:58 PM UTC+1, David Pilato wrote:

As soon as the jar file have a es-plugin.properties file, it will be
loaded by the node.

Of course, you will need then to create the river itself which will
require one API Call (prepareIndex).

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

Le 19 févr. 2014 à 17:07, Doru Sular doru....@gmail.com a écrit :

That's all?
I don't need any ES api calls? I will try it soon, thank you very much!
Doru

On Wednesday, February 19, 2014 3:55:40 PM UTC+1, David Pilato wrote:

I guess you just need to add the river jar and its dependencies in
your class path.

If you use Maven, it should be very easy.

 -- 

David Pilato | Technical Advocate | Elasticsearch.com
http://Elasticsearch.com

@dadoonet https://twitter.com/dadoonet | @elasticsearchfrhttps://twitter.com/elasticsearchfr

Le 19 février 2014 à 13:56:11, Doru Sular (doru....@gmail.com) a écrit:

Hello everybody,

I intend to use ActiveMQ river and elasticsearch integrated in the same
JVM.
In the ActiveMQ river installation guide is mention the following
command

bin/plugin -install domdorn/elasticsearch-river-activemq/1.0.

What should I do to have the same effect from java code? I want to have
ActiveMQ, ActiveMQ river and Elasticsearch in the same java virtual machine.

Thank you very much,
Doru

--
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 elasticsearc...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/50d5603e-21d4-4a06-8867-87c982ba1b7c%40googlegroups.com
.
For more options, visit https://groups.google.com/groups/opt_out.

--
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 elasticsearc...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/b9ce5266-e452-4d92-ae53-f611541dded8%40googlegroups.com
.
For more options, visit https://groups.google.com/groups/opt_out.

--
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 elasticsearc...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/b7b604d0-1676-476d-8c2c-c920c33bfa7b%40googlegroups.com
.
For more options, visit https://groups.google.com/groups/opt_out.

--
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 elasticsearc...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/b494f678-b864-47c6-b89f-cc45539bb891%40googlegroups.com
.
For more options, visit https://groups.google.com/groups/opt_out.

--
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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/2a17eed0-76b0-4914-90f2-b66ea7d9cc82%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.