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

Allow getting consistent docstats from IndexWriter

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 7.7, 8.0
    • Fix Version/s: 7.7, 8.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      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

              • Assignee:
                Unassigned
                Reporter:
                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