I'm trying to restrict a query to search on multiple fields within the
same nested object, but I'm not sure how to do so. Take the following
example documents:
I want to search for all users with "Jack Smith" as a friend. If I
search on friends.name.first = "Jack" and friends.name.last = "Smith",
however, both documents are returned instead of just the first one. Is
there some way to restrict fields to be within the same nested object,
as opposed to any nested object?
On Wed, 2011-07-06 at 10:30 -0700, Ellery Crane wrote:
I'm trying to restrict a query to search on multiple fields within the
same nested object, but I'm not sure how to do so. Take the following
example documents:
Up until today, the answer would have been: create the friends as
separate docs.
Just landed in master: Nested Docs
There are bound to be problems with this still, as it has only just been
added, but this new feature will solve the issue you describe
On Wed, 2011-07-06 at 10:30 -0700, Ellery Crane wrote:
I'm trying to restrict a query to search on multiple fields within the
same nested object, but I'm not sure how to do so. Take the following
example documents:
Up until today, the answer would have been: create the friends as
separate docs.
Just landed in master: Nested Docshttps://github.com/elasticsearch/elasticsearch/issues/1095
There are bound to be problems with this still, as it has only just been
added, but this new feature will solve the issue you describe
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.