开发者

what part of lucene score is calculated during search time?

  1. I'm trying to understanding what kind of score does l开发者_如何学Pythonucene performs during searching? I see Lucene TermVector contains bunch of statistics, when I search for a term, how the score is calculated in query time?

  2. Does TermVector and its statistics used during searching? if so how ?


The Similarity class is responsible for scoring documents.

A Collector iterates over documents. It is used in conjunction with a Scorer to assign scores and to rank documents by those scores. A Scorer instance calculates scores under specific conditions. There are more than a dozen different kinds of scorers. For example, a TermScorer calculates the raw score as follows:

getSimilarity().tf(f)*weightValue

The weight value is derived from the query. If normalization is turned on at index time (so that scores between queries are more or less comparable), the normalization is applied after this. Normalization factors are pre-computed and cached.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜