Lucene/Lucene.NET-Document.SetBoost()值? [英] 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?
例如:
如果我想将文档的权重提高10%,则应将其设置为1.1? 对于20%,然后是1.2?
If I wanted to boost a document's weighting by 10% then I should set it 1.1? For 20% then 1.2?
如果我开始将boosts设置为75.0,该怎么办?还是500.0?
What happens if I start setting boosts to values like 75.0? or 500.0?
固定格式
推荐答案
请参阅在搜索中调试相关性问题了解详情.
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.
这篇关于Lucene/Lucene.NET-Document.SetBoost()值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!