Hi all,
did not found anything about this topic
it seems to me, that arrays of objects are not detected automatically:
(java insert)
startObject()
.startObject("someThing")
.field("id", 42)
.field("fieldName", "fieldValue")
.endObject()
.startObject("someThing")
.field("id", 43)
.field("fieldName", "other fieldValue")
.endObject()
.endObject()
results in something like:
{
"someThing":{
"id":42,
"fieldName":"fieldValue"
},
"someThing":{
"id":43,
"fieldName":"other fieldValue"
}
}
i am expecting something like
{
"someThing":[
{
"id":42,
"fieldName":"fieldValue"
},
{
"id":43,
"fieldName":"other fieldValue"
}
]
}
for me it is not possible to insert something in this way (we do not have
the all the "someThing"s at one time):
startArray("someThing")
.startObject()
.field("id", 42)
.field("fieldName", "fieldValue")
.endObject()
.startObject()
.field("id", 43)
.field("fieldName", "other fieldValue")
.endObject()
.endArray()
searching works also for e.g. "other fieldValue" but when I parse the
source of the searchHit (java again), i get not a list for "someThing",
only a normal Map is found.
Is there some error in my considerations/coding or is this a bug?
Best regards,
Daniel
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.