The documentation for custom_filters_score does not provide an example of
how "script" can be used. However, it refers to function_score in later
versions of ES search, and the doc of function_score has the following
example:
The script in the example seems to imply that the script will solely
determine the score, but in practice the value evaluated by the script will
be multiplied with the query score. So the script in the example should
have been: "doc['my_numeric_field'].value / pow(param1, param2)"
I guess at least for function_score an alternative is to specify boost_mode
to "replace" instead of the default "multiply". But I don't think there is
an equivalent alternative for custom_filters_score. In any case, I think
the documentation should be updated or made clearer.
Thanks,
Hieu
On Thursday, September 18, 2014 2:32:45 PM UTC-7, Hieu Nguyen wrote:
The documentation for custom_filters_score does not provide an example of
how "script" can be used. However, it refers to function_score in later
versions of ES search, and the doc of function_score has the following
example:
The script in the example seems to imply that the script will solely
determine the score, but in practice the value evaluated by the script will
be multiplied with the query score. So the script in the example should
have been: "doc['my_numeric_field'].value / pow(param1, param2)"
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.