shubhamvishu commented on code in PR #13328:
URL: https://github.com/apache/lucene/pull/13328#discussion_r1584391143


##########
lucene/core/src/java/org/apache/lucene/codecs/TermStats.java:
##########
@@ -16,24 +16,10 @@
  */
 package org.apache.lucene.codecs;
 
-import org.apache.lucene.index.TermsEnum; // javadocs
-
 /**
  * Holder for per-term statistics.
  *
- * @see TermsEnum#docFreq
- * @see TermsEnum#totalTermFreq
+ * @param docFreq How many documents have at least one occurrence of this term.
+ * @param totalTermFreq Total number of times this term occurs across all 
documents in the field.
  */
-public class TermStats {
-  /** How many documents have at least one occurrence of this term. */
-  public final int docFreq;
-
-  /** Total number of times this term occurs across all documents in the 
field. */
-  public final long totalTermFreq;
-
-  /** Sole constructor. */
-  public TermStats(int docFreq, long totalTermFreq) {
-    this.docFreq = docFreq;
-    this.totalTermFreq = totalTermFreq;
-  }
-}
+public record TermStats(int docFreq, long totalTermFreq) {}

Review Comment:
   Thank you so much for looking into this @uschindler! I like the idea of 
having a quick fix and exclude the records ctor and methods for now. Also, I 
even tried to somehow get rid of the earlier issues with records `TermStats` 
and `ReaderSlice` but explicitly declaring the ctor and methods but it then 
started complaining about some other public records we added in this PR from 
the list of packages you shared above where we always expect javadocs. 
Disabling the check for records till its fixed in a separate issue makes sense 
to me.💯



-- 
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-unsubscr...@lucene.apache.org

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


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

Reply via email to