I've stumbled upon weird behavior in ES, where it returns results that does not match the query.
We are on ES 2.4 with tribe, and i was wondering if anyone encountered such behavior.
Does the document contain a valid header.create_time? I am assuming so
since there is a sort value.
The should clauses of the boolean query are optional and are used to
increase the score of a document. Any matching should clause will increase
the score. As long as the must clause matches, you will get a hit.
What you are probably want is for that should match to be actually another
bool query alongside the existing exist clause. And since you are using
only exist and term queries, you also probably want to use filter clauses
and avoid scoring altogether.
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.