ChrisHegarty commented on code in PR #14119: URL: https://github.com/apache/lucene/pull/14119#discussion_r1923394010
########## lucene/backward-codecs/src/java/org/apache/lucene/backward_codecs/lucene92/OffHeapFloatVectorValues.java: ########## @@ -256,7 +256,7 @@ public DocIndexIterator iterator() { @Override public Bits getAcceptOrds(Bits acceptDocs) { - return null; + return new Bits.MatchNoBits(0); Review Comment: It would be good to clarify the API contract, which currently says: ``` /** Returns a Bits accepting docs accepted by the argument and having a vector value */ public Bits getAcceptOrds(Bits acceptDocs) { ... } ``` My understanding is that the `acceptedDocs` argument represents the allowed documents to match. Null here means that they are all allowed to match. Null is kind of "magical", since it's an indication of something without any allocation. It would be good to clarify what the behaviour is when the passed `acceptDocs` is null. -- 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