kaivalnp commented on code in PR #12820: URL: https://github.com/apache/lucene/pull/12820#discussion_r1399830085
##########
lucene/join/src/java/org/apache/lucene/search/join/DiversifyingChildrenByteKnnVectorQuery.java:
##########
@@ -158,59 +95,4 @@ public int hashCode() {
result = 31 * result + Arrays.hashCode(query);
return result;
}
-
- private static class ParentBlockJoinByteVectorScorer {
Review Comment:
This code implements a [special
`#exactSearch`](https://github.com/kaivalnp/lucene/blob/7eb8f6ee00f4da234e3c0ce1cfc331683fe4c3de/lucene/join/src/java/org/apache/lucene/search/join/DiversifyingChildrenFloatKnnVectorQuery.java#L78-L123)
for `DiversifyingChildren{Byte,Float}KnnVectorQuery` where we:
1. [Go over parent
docs](https://github.com/kaivalnp/lucene/blob/7eb8f6ee00f4da234e3c0ce1cfc331683fe4c3de/lucene/join/src/java/org/apache/lucene/search/join/DiversifyingChildrenFloatKnnVectorQuery.java#L102)
2. [Compute the best-scoring child for that
parent](https://github.com/kaivalnp/lucene/blob/7eb8f6ee00f4da234e3c0ce1cfc331683fe4c3de/lucene/join/src/java/org/apache/lucene/search/join/DiversifyingChildrenFloatKnnVectorQuery.java#L200-L208)
3. [Insert child into the
queue](https://github.com/kaivalnp/lucene/blob/7eb8f6ee00f4da234e3c0ce1cfc331683fe4c3de/lucene/join/src/java/org/apache/lucene/search/join/DiversifyingChildrenFloatKnnVectorQuery.java#L104-L107)
if the best-scoring child is better than any collected result
Now that we're [re-using the `KnnCollector` for
`#exactSearch`](https://github.com/kaivalnp/lucene/blob/reuse-graph-search/lucene/core/src/java/org/apache/lucene/search/AbstractKnnVectorQuery.java#L194-L196),
the existing `DiversifyingNearestChildrenKnnCollector` [implicitly does all of
this](https://github.com/kaivalnp/lucene/blob/03624754eb3ccf9da114ff5fc358cc230466ea3f/lucene/join/src/java/org/apache/lucene/search/join/DiversifyingNearestChildrenKnnCollector.java#L51-L68)
- via
[`NodeIdCachingHeap`](https://github.com/kaivalnp/lucene/blob/03624754eb3ccf9da114ff5fc358cc230466ea3f/lucene/join/src/java/org/apache/lucene/search/join/DiversifyingNearestChildrenKnnCollector.java#L107)
--
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]
