What's wrong with it? The has_parent clause is nested in the query properly.
Is it the presence of the bool query that is a problem? Because a simple {:query
=> { :has_parent: {...} }}works fine.
I also managed to make it work by placing the has_parent clause in a filter
instead of the query. But I want the has_parent clause to affect facet
counts. So I think what I would need would be a filtered_query?
If you want to AND the has_parent to your bool criteria, simply move it
into the must array and it will work fine. The DSL should be something like
this:
Am I correct when I say that I should move things like { "term": { "verified": "true" } } to filters? They will affect facet counts if they
are inside a filtered query, right?
On Tuesday, March 11, 2014 5:06:52 PM UTC-4, Binh Ly wrote:
If you want to AND the has_parent to your bool criteria, simply move it
into the must array and it will work fine. The DSL should be something like
this:
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.