ldematte commented on code in PR #16053:
URL: https://github.com/apache/lucene/pull/16053#discussion_r3233416193
##########
lucene/core/src/java/org/apache/lucene/codecs/lucene99/Lucene99FlatVectorsWriter.java:
##########
@@ -58,14 +59,40 @@ public final class Lucene99FlatVectorsWriter extends
FlatVectorsWriter {
private final SegmentWriteState segmentWriteState;
private final IndexOutput meta, vectorData;
+ private final IOFunction<FieldInfo, FlatFieldVectorsWriter<?>>
fieldWriterFactory;
- private final List<FieldWriter<?>> fields = new ArrayList<>();
+ private record FieldData(FlatFieldVectorsWriter<?> fieldWriter, FieldInfo
fieldInfo) {}
+
+ private final List<FieldData> fields = new ArrayList<>();
Review Comment:
We could store FlatFieldVectorsWriters and FieldInfos separately in 2
arrays, but I think using a small record here is cleaner
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]