I need to perform a query + filter on child documents. For the query, I'm
using TopChildren.
Now I wonder what would be more efficient regarding query on date/numeric
(no score needed) fields of this child -
should I query on these fields using a HasChild filter in a bool query
with the TopChildren query,
or should I just combine those date/numeric fields within a single
TopChildren query?
I will answer myself:
Any queried type (the parent or any one of its children), if there should
be a filter on it, should be queried using a filtered query clause. Any
filtered field should come under the filtered-query *filter *clause, and
any analyzed or score-affecting field should come under the filtered-query *query
*clause.
בתאריך יום שלישי, 10 ביוני 2014 12:05:20 UTC+3, מאת Adam Porat:
Hi,
I need to perform a query + filter on child documents. For the query,
I'm using TopChildren.
Now I wonder what would be more efficient regarding query on date/numeric
(no score needed) fields of this child -
should I query on these fields using a HasChild filter in a bool query
with the TopChildren query,
or should I just combine those date/numeric fields within a single
TopChildren query?
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.