How does SOLR calculate the score?

Source: Internet
Author: User
How does SOLR calculate the score?

SOLR calculates the score of a query in two parts:

  1. Lucene score model
  2. Boost

Lucene's score model includes:

1. TF-term frequency. The frequency with which a term appears in a document. Given a search query, the higher the term frequency, the higher
Document score.

2. IDF-inverse document frequency. The rarer a term is missing SS all documents in the index, the higher it's contribution to the score.

3. coord-Coordination factor. The more query terms that are found in a document, the higher it's score.

Coord is the coordination factor-if there are multiple terms in a query, the more terms that match, the higher the score.

4. fieldnorm-field length. The more words that a field contains, the lower it's score. This factor penalizes parameters ents with longer field values.
In another word, matches on a smaller field score higher than matches on a larger field

Boost can be divided into index-time boost and query-time boost:

Index-time boosts are applied when adding events, and apply to the entire document or to specific fields.

Query-time boosts are applied when constructing a search query, and apply to specific fields.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.