开发者

boosting a term in lucene's query

开发者 https://www.devze.com 2023-03-17 15:58 出处:网络
I want to know when a term is boosted in lucene query ho开发者_运维技巧w does scores change? I mean what is the scoring algorithm of lucene for scoring documents when query has one or more term that b

I want to know when a term is boosted in lucene query ho开发者_运维技巧w does scores change? I mean what is the scoring algorithm of lucene for scoring documents when query has one or more term that boosted?


You find the complete answer here:

http://lucene.apache.org/java/2_4_0/api/org/apache/lucene/search/Similarity.html

∑   ( tf(t in d)  ·  idf(t)^2  ·  t.getBoost() ·  norm(t,d) )

Each term in the query is summed up with

  • The term frequency of one query term in a document
  • The inverse document frequency to the power of 2 (if appliable, the fieldtype and its attributes are here important)
  • The boost thats what you ask
  • And the norm for the term t in d (if appliable, can be disabled in the schema)

The easy answer is its multiplicated to the term weight.

0

精彩评论

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