Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-1360

A Similarity class which has unique length norms for numTerms <= 10

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • None
    • None
    • core/query/scoring
    • None
    • New

    Description

      A Similarity class which extends DefaultSimilarity and simply overrides lengthNorm. lengthNorm is implemented as a lookup for numTerms <= 10, else as 1/sqrt(numTerms). This is to avoid term counts below 11 from having the same lengthNorm after stored as a single byte in the index.

      This is useful if your search is only on short fields such as titles or product descriptions.

      See mailing list discussion: http://www.nabble.com/How-to-boost-the-score-higher-in-case-user-query-matches-entire-field-value-than-just-some-words-within-a-field-td19079221.html

      Attachments

        1. LUCENE-1360.patch
          4 kB
          Robert Muir
        2. LUCENE-1380 visualization.pdf
          9 kB
          Lance Norskog
        3. ShortFieldNormSimilarity.java
          2 kB
          Sean Timm

        Issue Links

          Activity

            People

              otis Otis Gospodnetic
              timmsc Sean Timm
              Votes:
              3 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: