mayya-sharipova commented on code in PR #992:
URL: https://github.com/apache/lucene/pull/992#discussion_r919332844
##########
lucene/core/src/java/org/apache/lucene/codecs/perfield/PerFieldKnnVectorsFormat.java:
##########
@@ -102,9 +104,22 @@ private class FieldsWriter extends KnnVectorsWriter {
}
@Override
- public void writeField(FieldInfo fieldInfo, KnnVectorsReader
knnVectorsReader)
+ public KnnFieldVectorsWriter addField(FieldInfo fieldInfo) throws
IOException {
+ KnnVectorsWriter writer = getInstance(fieldInfo);
+ return writer.addField(fieldInfo);
+ }
+
+ @Override
+ public void flush(int maxDoc, Sorter.DocMap sortMap) throws IOException {
+ for (WriterAndSuffix was : formats.values()) {
+ was.writer.flush(maxDoc, sortMap);
+ }
+ }
+
+ @Override
+ public void mergeOneField(FieldInfo fieldInfo, KnnVectorsReader
knnVectorsReader)
throws IOException {
- getInstance(fieldInfo).writeField(fieldInfo, knnVectorsReader);
+ getInstance(fieldInfo).mergeOneField(fieldInfo, knnVectorsReader);
Review Comment:
@jtibshirani Thanks for the suggestion, but we can't at the same time make
`KnnVectorsWriter#merge` final and also un-support this `mergeOneField`?
Should we keep `mergeOneField` and make `KnnVectorsWriter#merge` final as
your other suggestion?
--
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]