You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by umang <um...@gmail.com> on 2015/05/17 17:03:13 UTC
Camel elasticsearch bulk api not working
Hi,
I was experimenting with camel elasticsearch component. I was sending
following request to elasticsearch with INDEX operation. It is working as
expected.
{
"entityId":"test",
"userId":"test",
"timestamp":"2014-12-06 15:59:48",
"xyz":"test",
}
Now I changed the about request to a List and used BULK operation. The
typeconverter to BulkRequest is returning null now due to which it is
throwing NPE. What should be the request in Bulk indexing using
elasticsearch?
--
View this message in context: http://camel.465427.n5.nabble.com/Camel-elasticsearch-bulk-api-not-working-tp5767177.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel elasticsearch bulk api not working
Posted by umang <um...@gmail.com>.
Got it working now. Re read the documentation and found that we have to send
List<Map<String, String>> for bulk index and Map<String, String> for
single index. For single index automatically the request was getting
converted to Map.
--
View this message in context: http://camel.465427.n5.nabble.com/Camel-elasticsearch-bulk-api-not-working-tp5767177p5767206.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel elasticsearch bulk api not working
Posted by Henryk Konsek <he...@gmail.com>.
Can you show us your route? :) And the body you send to the ES producer.
Cheers!
niedz., 17.05.2015 o 17:03 użytkownik umang <um...@gmail.com>
napisał:
> Hi,
>
> I was experimenting with camel elasticsearch component. I was sending
> following request to elasticsearch with INDEX operation. It is working as
> expected.
>
> {
> "entityId":"test",
> "userId":"test",
> "timestamp":"2014-12-06 15:59:48",
> "xyz":"test",
> }
>
> Now I changed the about request to a List and used BULK operation. The
> typeconverter to BulkRequest is returning null now due to which it is
> throwing NPE. What should be the request in Bulk indexing using
> elasticsearch?
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Camel-elasticsearch-bulk-api-not-working-tp5767177.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>