Perhaps I am missing something in the Java API, but how can I index a
nested document that is created from either another XContentBuilder or
other JSON creator such as Jackson?
From what I can tell, the value(...) methods do not support passing in
JSON/XContentBuilder. My current workaround is to convert the JSON into a
Map<String, Object). Is there a simpler solution?
without looking at the source and guessing wild at the early morning, what
about using bytes() method of the content builder? I think the value()
method can handle that...
--Alex
On Wed, May 1, 2013 at 2:14 AM, Ivan Brusic ivan@brusic.com wrote:
Perhaps I am missing something in the Java API, but how can I index a
nested document that is created from either another XContentBuilder or
other JSON creator such as Jackson?
From what I can tell, the value(...) methods do not support passing in
JSON/XContentBuilder. My current workaround is to convert the JSON into a
Map<String, Object). Is there a simpler solution?
There are the rawField() methods for streaming an XContentBuilder into
another.
Jörg
Am 02.05.13 08:53, schrieb Alexander Reelsen:
Hey Ivan,
without looking at the source and guessing wild at the early morning,
what about using bytes() method of the content builder? I think the
value() method can handle that...
Perhaps I am missing something in the Java API, but how can I
index a nested document that is created from either another
XContentBuilder or other JSON creator such as Jackson?
From what I can tell, the value(...) methods do not support
passing in JSON/XContentBuilder. My current workaround is to
convert the JSON into a Map<String, Object). Is there a simpler
solution?
Cheers,
Ivan
Alexander, I thought about that, but my assumption is that it would be
treated no differently than indexing a String.
Jörg, nested documents are not indexed under a new field, but as values
under an array. Need a rawValue() method.
Will explore the code more next week.
Ivan
On Wed, May 1, 2013 at 11:53 PM, Alexander Reelsen alr@spinscale.de wrote:
Hey Ivan,
without looking at the source and guessing wild at the early morning, what
about using bytes() method of the content builder? I think the value()
method can handle that...
--Alex
On Wed, May 1, 2013 at 2:14 AM, Ivan Brusic ivan@brusic.com wrote:
Perhaps I am missing something in the Java API, but how can I index a
nested document that is created from either another XContentBuilder or
other JSON creator such as Jackson?
From what I can tell, the value(...) methods do not support passing in
JSON/XContentBuilder. My current workaround is to convert the JSON into a
Map<String, Object). Is there a simpler solution?
Back at work after being out last week. As predicted, neither indexing as
bytes nor rawField work with nested documents. Will continue using my
workaround of converting to a Map.
Surely I can't be the first one to index sub-builders.
--
Ivan
On Thu, May 2, 2013 at 8:48 AM, Ivan Brusic ivan@brusic.com wrote:
Alexander, I thought about that, but my assumption is that it would be
treated no differently than indexing a String.
Jörg, nested documents are not indexed under a new field, but as values
under an array. Need a rawValue() method.
Will explore the code more next week.
Ivan
On Wed, May 1, 2013 at 11:53 PM, Alexander Reelsen alr@spinscale.dewrote:
Hey Ivan,
without looking at the source and guessing wild at the early morning,
what about using bytes() method of the content builder? I think the value()
method can handle that...
--Alex
On Wed, May 1, 2013 at 2:14 AM, Ivan Brusic ivan@brusic.com wrote:
Perhaps I am missing something in the Java API, but how can I index a
nested document that is created from either another XContentBuilder or
other JSON creator such as Jackson?
From what I can tell, the value(...) methods do not support passing in
JSON/XContentBuilder. My current workaround is to convert the JSON into a
Map<String, Object). Is there a simpler solution?
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.