msokolov commented on PR #13779: URL: https://github.com/apache/lucene/pull/13779#issuecomment-2353036120
I pushed a new revision here addressing some of the major comments: 1. `KnnVectorValues.iterator()` now generally provides a new iterator; no caching is done. I removed `createIterator()`. Main impact was on VectorScorer (and in tests) where we now create iterators and store them locally. This is much better; thanks for the feedback. 2. I added implementations for `advance()` and got rid of the default impl. 3. I *removed* impls of `cost()` and added a default impl that throws UOE. This method is only ever used during search() and most of these values sources will never be searched. The exceptions are those that can be used by the ValueSource API: basically the indexed values returned by a reader. We have lots and lots of other values impls that are used during indexing for which we don't need cost. I briefly considered separating these new iterators from DISI, but that ended up in some trouble. 4. re: `getVectorByteLength()` @ChrisHegarty is correct that this is needed as it is today. We could in theory make it final (or inline it whatever) if we added some more VectorEncodings to represent the compressed cases, but I'm inclined to leave it as is. This way we could in theory support a variable size encoding? And anyway it isn't clear we want to mix up the "encoding" with compression? I didn't have a chance to look seriously at removing `copy()` API. I don't think we ought to create a simple wrapper though since afaict it would require an additional memory copy of every vector value. -- 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