ChrisHegarty commented on code in PR #13872: URL: https://github.com/apache/lucene/pull/13872#discussion_r1816687000
########## lucene/core/src/java21/org/apache/lucene/internal/vectorization/Lucene99MemorySegmentByteVectorScorerSupplier.java: ########## @@ -112,20 +96,20 @@ static final class CosineSupplier extends Lucene99MemorySegmentByteVectorScorerS @Override public RandomVectorScorer scorer(int ord) { checkOrdinal(ord); + MemorySegmentAccessInput slice = input.clone(); + byte[] scratch1 = new byte[vectorByteSize]; + byte[] scratch2 = new byte[vectorByteSize]; Review Comment: I have another idea. maybe we just delegate the null cases to the other on-heap scorer. That might be simpler. We do something similar in the native scorer we have in Elasticsearch. I can see how this looks in the branch, if u like? -- 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