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

add maxtf to fieldinvertstate

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.1, 4.0-ALPHA
    • core/query/scoring
    • None
    • New, Patch Available

    Description

      the maximum within-document TF is a very useful scoring value,
      we should expose it so that people can use it in scoring

      consider the following sim:

      @Override
      public float idf(int docFreq, int numDocs) {
        return 1.0F; /* not used */
      }
      
      @Override
      public float computeNorm(String field, FieldInvertState state) {
        return state.getBoost() / (float) Math.sqrt(state.getMaxTF());
      }
      

      which is surprisingly effective, but more interesting for practical reasons.

      Attachments

        1. LUCENE-2864.patch
          6 kB
          Robert Muir

        Activity

          People

            rcmuir Robert Muir
            rcmuir Robert Muir
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: