The index API (Elasticsearch Platform — Find real-time answers at scale | Elastic) can accept any form of json data (byte array, a string). So, you can create your own json with your favorite json lib, and feed it to the index operation (using the several setSource methods).
There is a built in embedded API to generate json (or smile format, which is a binary json format created by the jackson lib). Thats the one used in the example in the link above. It as different startArray methods.
On Friday, February 10, 2012 at 5:33 PM, Shane Witbeck wrote:
I've been trying to figure out how to add a list of complex objects via the Java API as illustrated in the guide here:
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.