I am trying to boost particular documents based on a field value. It is generally working ok but some documents return a higher score even though they have a smaller boost value.
After debugging the query with the debugQuery=on request parameter I have noticed that the idf function is returning a higher score for a particular document, which is affecting the overall score.
Is there a way to ignore tf/idf scoring at query time?
You’ll want to create a custom Similarity which overrides the tf and idf methods, and use it in place of the DefaultSimilarity.
Something like:
The set it to use that similarity in your schema.xml: