I can't seem to get the expected results when running a terms query for a field within a subobject of a nested object. Assume an example like this (where nestedField has type nested in the mapping):
Does not appear to return any results. Am I doing something wrong? Is this expected to work? Querying on topLevel does seem to work. Obviously this is just a fake example of the type of thing I'm trying to do, not the real one.
The only reason it worked with the toplevel object is that if you search on field "a", it actually searches on all fields that match *.a. By the way, the below query would work with your nested object:
@jpountz It appears that using the full path (nestedField.subObject.subObjectField) is causing an error in 2.x, as explained here. Is using the full path the "correct" way to run this query in 2.x?
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.