I am looking for a way to tell the lucene searcher to ignore document boosting on certain queries?
In our search results we usually work with a dominant boost-factor calculated by the age of a document while indexing (the index is rebuild nightly).
Now, I am looking for a way offer search-functionality which ignores the age, but found yet no way to override/ignore the document boost.
Best regards,
Alex
http://lucene.apache.org/java/3_0_0/api/core/org/apache/lucene/search/Similarity.html
From the point 6, I reckon it is impossible to ignore boosts at search time:
Are you looking for something the QueryParser would understand? Because that is simply not possible.
You're adding the boost somewhere in your code, it is not done by Lucene by default. You'll have to remove this additional piece of code, or make it optional in order to ignore the boost.
Instead of storing your calculated-score as boost, you can store it in a new field, and by implementing CustomScoreQuery + CustomScoreProvider you can control which value(default score or your calculated-one in the field) to return