[ https://issues.apache.org/jira/browse/LUCENE-8609?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16722088#comment-16722088 ]
ASF subversion and git services commented on LUCENE-8609: --------------------------------------------------------- Commit e974311d91fd3f2f3aa015c9e56cf2d689290f41 in lucene-solr's branch refs/heads/jira/http2 from [~simonw] [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=e974311 ] LUCENE-8609: Allow getting consistent docstats from IndexWriter 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. This change also deprecates IndexWriter#numDocs() and IndexWriter#maxDoc() and replaces all their usages wiht IndexWriter#getDocStats() > Allow getting consistent docstats from IndexWriter > -------------------------------------------------- > > Key: LUCENE-8609 > URL: https://issues.apache.org/jira/browse/LUCENE-8609 > Project: Lucene - Core > Issue Type: Improvement > Affects Versions: master (8.0), 7.7 > Reporter: Simon Willnauer > Priority: Major > Fix For: master (8.0), 7.7 > > Time Spent: 50m > Remaining Estimate: 0h > > 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. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org