AFAIK, There are three types search I can perform on elasticsearch:
query => which will do scoring and affect the hit
filter => which will not do scoring and affect the hit
post_filter => which will be applied on the result of query/filter and
will not affect the hit and facet aggregation
At the java client library side, I am assuming there should be same three
types of apis existing, yes I found three.
But unfortunately the setFilter method of SearchRequestBuilder had been
marked as deprecated and also had
been delegated to the setPostFilter method of itself.
My question is how can I perform a filter query by java client? I found a
way by that I can do filter query as following:
If you only need the filter part you can use a constant score query that
only contains a filter, in that case you wouldn't need the match_all query
anymore.
On Friday, February 28, 2014 10:04:35 AM UTC+1, xzer LR wrote:
AFAIK, There are three types search I can perform on elasticsearch:
query => which will do scoring and affect the hit
filter => which will not do scoring and affect the hit
post_filter => which will be applied on the result of query/filter and
will not affect the hit and facet aggregation
At the java client library side, I am assuming there should be same three
types of apis existing, yes I found three.
But unfortunately the setFilter method of SearchRequestBuilder had been
marked as deprecated and also had
been delegated to the setPostFilter method of itself.
My question is how can I perform a filter query by java client? I found a
way by that I can do filter query as following:
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.