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

Allow getting consistent docstats from IndexWriter

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 7.7, 8.0
    • 7.7, 8.0
    • None
    • None
    • New

    Description

      Today we have #numDocs() and #maxDoc() on IndexWriter. This is enough
      to get all stats for the current index but it's subject to concurrency
      and might return numbers that are not consistent ie. some cases can
      return maxDoc < numDocs which is undesirable. This change adds a getDocStats()
      method to index writer to allow fetching consistent numbers for these stats.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              simonw Simon Willnauer
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m