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


##########
lucene/core/src/java/org/apache/lucene/util/TermAndVector.java:
##########
@@ -24,23 +24,7 @@
  *
  * @lucene.experimental
  */
-public class TermAndVector {
-
-  private final BytesRef term;
-  private final float[] vector;
-
-  public TermAndVector(BytesRef term, float[] vector) {
-    this.term = term;
-    this.vector = vector;
-  }
-
-  public BytesRef getTerm() {
-    return this.term;
-  }
-
-  public float[] getVector() {
-    return this.vector;
-  }
+public record TermAndVector(BytesRef term, float[] vector) {

Review Comment:
   this class has the problem that it supplies a method to normalize the inner 
vector. This is against immutability of records. It is possible to do this, but 
feels bad.



-- 
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