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

Instead of docCount(), maxDoc() is used for numberOfDocuments in SimilarityBase

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.0
    • Component/s: core/search
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      SimilarityBase.java has the following line :

       long numberOfDocuments = collectionStats.maxDoc();
      

      It seems like collectionStats.docCount(), which returns the total number of documents that have at least one term for this field, is more appropriate statistics here.

        Attachments

        1. LUCENE-6711.patch
          0.9 kB
          Ahmet Arslan
        2. LUCENE-6711.patch
          1 kB
          Ahmet Arslan
        3. LUCENE-6711.patch
          5 kB
          Ahmet Arslan
        4. LUCENE-6711.patch
          7 kB
          Ahmet Arslan

          Issue Links

            Activity

              People

              • Assignee:
                rcmuir Robert Muir
                Reporter:
                iorixxx Ahmet Arslan
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: