I'm having difficulty getting function scoring to work when the value is between zero and one (fractional). I want to use a reciprocal/inverse scoring function on these documents where 0.1 would be high and 10+ would be low. However, the function score query appears to ignore any document with a value less than 1.
See here example queries and document:
Any ideas what causes this or if there is a parameter I'm missing to get the function score to consider these documents?
It turned out we were mistakenly indexing that property as a short when we created the index. The values still displayed correctly under normal circumstances but when the index on that field was used in a query, the values were being cast to short which rounds them down to zero and caused the symptoms.
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.