You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2022/05/13 01:36:25 UTC

[GitHub] [lucene] wormday commented on a diff in pull request #884: LUCENE-10568: fix javadocs errors in IndexWriter.DocStats

wormday commented on code in PR #884:
URL: https://github.com/apache/lucene/pull/884#discussion_r871932093


##########
lucene/core/src/java/org/apache/lucene/index/IndexWriter.java:
##########
@@ -6199,13 +6199,14 @@ public synchronized DocStats getDocStats() {
   public static final class DocStats {
     /**
      * The total number of docs in this index, including docs not yet flushed (still in the RAM
-     * buffer), not counting deletions.
+     * buffer), and including deletions. <b>NOTE:</b> buffered deletions are not counted. If you
+     * really need these to be counted you should call {@link IndexWriter#commit()} first.
      */
     public final int maxDoc;
+
     /**
      * The total number of docs in this index, including docs not yet flushed (still in the RAM
-     * buffer), and including deletions. <b>NOTE:</b> buffered deletions are not counted. If you
-     * really need these to be counted you should call {@link IndexWriter#commit()} first.
+     * buffer), not counting deletions.

Review Comment:
   
   `numDocs = maxDocs - deletedDocCount` 
   It is clear, but we do not expose the 'deletedDocCount' field.
   If it were me, I'd be tempted to look for this field.
   
   
   `not counting deleted documents`  It's been described very clearly
   
   How about this
   
   **maxDoc**
   The total number of docs in this index, counting docs not yet flushed (still in the RAM
   buffer), and counting deleted documents. <b>NOTE:</b> Buffered deletions are not counted. If you
   really need these to be counted you should call {@link IndexWriter#commit()} first.
   	 
   **numDocs**
   The total number of docs in this index, counting docs not yet flushed (still in the RAM
   buffer), but not counting deleted documents.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org