Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Lucene / Lucene.NET - Document.SetBoost() values?

I know it takes in a float, but what are some typical values for various levels of boosting within a result?

For example:

If I wanted to boost a document's weighting by 10% then I should set it 1.1? For 20% then 1.2?

What happens if I start setting boosts to values like 75.0? or 500.0?

Edit: Fixed Formatting

like image 288
mwjackson Avatar asked Oct 07 '09 13:10

mwjackson


1 Answers

Please see the Lucene Similarity Documentation for the formula. In principle, all other factors being equal, setting a document's boost to 1.1 will indeed give it a score that is 10% higher as compared to an identical document with a boost of 1.0. If you have a set of documents that should be intrinsically preferred in searches, this may be a good idea. Note that document boost is an indexing-time attribute, making it impossible to change the document's boost without reindexing it. There are other important factors in scoring - including term match scores, norms etc. See Debugging Relevance Issues in Search for details.

like image 115
Yuval F Avatar answered Oct 04 '22 02:10

Yuval F