I'm pretty new to elasticsearch, and I'm having trouble with searching
nested items in a couchdb document. I'm trying to find out what I'm
doing wrong.
You need to specify the full path to the field you want to query, for
example: hands.left.color, or hands.right.color. If you just specify color,
elasticsearch will pick one of those and query it (it would be nice if it
would automatically "expand" the query into one across all the color fields,
but its not there...).
Also, is "hands" an array of objects, or a single object?
I'm pretty new to elasticsearch, and I'm having trouble with searching
nested items in a couchdb document. I'm trying to find out what I'm
doing wrong.
You need to specify the full path to the field you want to query, for
example: hands.left.color, or hands.right.color. If you just specify color,
elasticsearch will pick one of those and query it (it would be nice if it
would automatically "expand" the query into one across all the color fields,
but its not there...).
Also, is "hands" an array of objects, or a single object?
I'm pretty new to elasticsearch, and I'm having trouble with searching
nested items in a couchdb document. I'm trying to find out what I'm
doing wrong.
If it is an array, then a common confusion is trying to find docs with
hands.left.color:green AND hands.right.color:blue, and expecting that only
an array element that contains both will return a hit. This is not the
case (by default), and it will return a result without regards to the array
elements.
If you would want to have array elements level query, you would need to use
nested mapping for hands, and use nested queries / filters to query hands.
You need to specify the full path to the field you want to query, for
example: hands.left.color, or hands.right.color. If you just specify
color,
elasticsearch will pick one of those and query it (it would be nice if it
would automatically "expand" the query into one across all the color
fields,
but its not there...).
Also, is "hands" an array of objects, or a single object?
I'm pretty new to elasticsearch, and I'm having trouble with searching
nested items in a couchdb document. I'm trying to find out what I'm
doing wrong.
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.