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

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

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 6.0
    • core/search
    • None
    • 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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment