I have a document that contains nested documents. I know it is possible to
combine multiple filters on fields in the root document, but I haven't
figured out how to combine those filters with nested filters.
company_id is a field at the root of the document. categories.name is a
field at the root of a nested category document. The following query
returns 0 results, although there are documents that match this criteria.
Is it not possible to combine filters like this, or am I just doing it
wrong?
Should work fine. Since you are using a term filter which is an exact
case-sensitive match, is it possible that your categories.name field is
indexed differently (like standard) that would make term filter not match?
The field is indexed the same way I am searching on it, and should be an
exact match. The term filter matches when I remove the company_id filter,
and the company_id filter works when I remove the categories.name nested
filter. However, when combined, it does not return results.
On Wednesday, March 26, 2014 4:49:52 PM UTC-4, Binh Ly wrote:
Should work fine. Since you are using a term filter which is an exact
case-sensitive match, is it possible that your categories.name field is
indexed differently (like standard) that would make term filter not match?
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.