romseygeek commented on code in PR #14748: URL: https://github.com/apache/lucene/pull/14748#discussion_r2121218882
########## lucene/core/src/java/org/apache/lucene/search/DocAndFloatFeatureBuffer.java: ########## @@ -21,29 +21,32 @@ import org.apache.lucene.util.IntsRef; /** - * Wrapper around parallel arrays storing doc IDs and their corresponding frequencies. + * Wrapper around parallel arrays storing doc IDs and their corresponding features, stored as Java + * floats. These features may be anything, but are typically a term frequency or a score. * * @lucene.internal */ -public final class DocAndFreqBuffer { +public final class DocAndFloatFeatureBuffer { + + private static final float[] EMPTY_FLOATS = new float[0]; /** Doc IDs */ public int[] docs = IntsRef.EMPTY_INTS; - /** Frequencies */ - public int[] freqs = IntsRef.EMPTY_INTS; + /** Scores */ Review Comment: ```suggestion /** Float-valued features */ ``` ########## lucene/core/src/java/org/apache/lucene/search/DocAndFloatFeatureBuffer.java: ########## @@ -21,29 +21,32 @@ import org.apache.lucene.util.IntsRef; /** - * Wrapper around parallel arrays storing doc IDs and their corresponding frequencies. + * Wrapper around parallel arrays storing doc IDs and their corresponding features, stored as Java + * floats. These features may be anything, but are typically a term frequency or a score. * * @lucene.internal */ -public final class DocAndFreqBuffer { +public final class DocAndFloatFeatureBuffer { + + private static final float[] EMPTY_FLOATS = new float[0]; /** Doc IDs */ public int[] docs = IntsRef.EMPTY_INTS; - /** Frequencies */ - public int[] freqs = IntsRef.EMPTY_INTS; + /** Scores */ + public float[] features = EMPTY_FLOATS; - /** Number of valid entries in the doc ID and frequency arrays. */ + /** Number of valid entries in the doc ID and score arrays. */ Review Comment: ```suggestion /** Number of valid entries in the doc ID and float-valued feature arrays. */ ``` -- 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