I am trying to serialize the XContentBuilder objects over the write from
the client and regenerate at the server side. At the server side I am
trying
to rebuild the XContentBuilder and bulk seed into the ES server. However I
am not aware of any API where one can rebuild the XContentBuilder from
InputStream.
// Client side code
sendJSONObjects()
{
ByteArrayOutputStream bos = new ByteArrayOutputStream();
As the XContentBuilder is simply a builder pattern and not a data structure
for serializing, I am not sure you approach works (havent peeked at the
source though).
Alternatively you could use the XContentParser
Map<String, Object> foo =
JsonXContent.jsonXContent.createParser(is).mapAndClose()
Hope this helps (otherwise I most likely got your question wrong),
I am trying to serialize the XContentBuilder objects over the write from
the client and regenerate at the server side. At the server side I am
trying
to rebuild the XContentBuilder and bulk seed into the ES server. However I
am not aware of any API where one can rebuild the XContentBuilder from
InputStream.
// Client side code
sendJSONObjects()
{
ByteArrayOutputStream bos = new ByteArrayOutputStream();
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.