An Elasticsearch filtered query with a custom filter score query is
expected to do scoring process for the documents returned by the filter.
Instead the custom filter score query was fetching all documents and
evaluating each of those document against the filter set.
I did some analysis and have found the reasons for this behavior. I have
documented my findings in the under mentioned link. Hope this will benefit
those using custom_filters_score query.
minor note: the custom_filters_score is deprecated and replaced by function
score, see
In that context a filter may only be used for identifiying documents to be
applied to the function score instead of filtering before, so make sure you
are settings your filters correctly in order to not execute the function
score over each document.
An Elasticsearch filtered query with a custom filter score query is
expected to do scoring process for the documents returned by the filter.
Instead the custom filter score query was fetching all documents and
evaluating each of those document against the filter set.
I did some analysis and have found the reasons for this behavior. I have
documented my findings in the under mentioned link. Hope this will benefit
those using custom_filters_score 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.