I have a problem understanding how to transform an IndexRequest to the Bulk
API format.
I would expect to find a method on IndexRequest or IndexRequestBuilder to
perform such transformation for me, but haven't found such.
alas, looking at the explanation, it says it expects the following JSON
structure:
I have a problem understanding how to transform an IndexRequest to the
Bulk API format.
I would expect to find a method on IndexRequest or IndexRequestBuilder
to perform such transformation for me, but haven't found such.
[...]
if that's so, than I kind of get it, but kind of not knowing how
to programmatically convert an IndexRequest to such form.
any hints at how to go about would be much appreciated ...
Logically a bulk request is a collection of other types of requests.
There are add() methods on BulkRequest that reflect this.
I have a problem understanding how to transform an IndexRequest to the
Bulk API format.
I would expect to find a method on IndexRequest or IndexRequestBuilder
to perform such transformation for me, but haven't found such.
[...]
if that's so, than I kind of get it, but kind of not knowing how
to programmatically convert an IndexRequest to such form.
any hints at how to go about would be much appreciated ...
Logically a bulk request is a collection of other types of requests.
There are add() methods on BulkRequest that reflect this.
I think I read your message too quickly. IIUC, you're asking if
IndexRequest can output a string of text suitable for injection into
a rabbit queue. It cannot. You should create lines of json using
whatever mechanism you like and then use those to form the payload of
your rabbit msg. If you'd like to use the ES lib to do that, take a
look at XContentFactory.jsonBuilder().
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.