benwtrent commented on code in PR #13469:
URL: https://github.com/apache/lucene/pull/13469#discussion_r1631602139


##########
lucene/core/src/java/org/apache/lucene/codecs/lucene99/Lucene99FlatVectorsReader.java:
##########
@@ -217,6 +220,18 @@ public ByteVectorValues getByteVectorValues(String field) 
throws IOException {
         vectorData);
   }
 
+  @Override
+  public void search(String field, float[] target, KnnCollector knnCollector, 
Bits acceptDocs) throws IOException {

Review Comment:
   @msokolov `getByteVectorValues` and `getFloatVectorValues` already do this. 
They provide an iterator that will return `VectorScorer` which can score and 
forward iterate via doc ids (supports advance, next, etc.).
   
   Also, with the "flat codecs" it doesn't make much sense to gather up the 
accepted docs, place the results in a collector, etc. You want to score while 
you iterate. It would likely be way cheaper than doing it all up front like knn 
is doing.



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