You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "benwtrent (via GitHub)" <gi...@apache.org> on 2025/01/16 20:00:10 UTC

[PR] move MultiLeafKnnCollector to decorator and remove unnecessary code [lucene]

benwtrent opened a new pull request, #14147:
URL: https://github.com/apache/lucene/pull/14147

   MultiLeafKnnCollector was missed during the switch to the KnnCollector.Decorator.
   
   Fixes this and removes duplicate.


-- 
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-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] move MultiLeafKnnCollector to decorator and remove unnecessary code [lucene]

Posted by "cpoerschke (via GitHub)" <gi...@apache.org>.
cpoerschke commented on code in PR #14147:
URL: https://github.com/apache/lucene/pull/14147#discussion_r1919800783


##########
lucene/core/src/java/org/apache/lucene/search/knn/MultiLeafKnnCollector.java:
##########
@@ -77,6 +76,7 @@ public MultiLeafKnnCollector(
       int interval,
       BlockingFloatHeap globalSimilarityQueue,
       AbstractKnnCollector subCollector) {
+    super(subCollector);

Review Comment:
   Perhaps `collector` in the decorator could be given protected visibility and then the `subCollector` member in this class would not be needed.



-- 
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-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] move MultiLeafKnnCollector to decorator and remove unnecessary code [lucene]

Posted by "benwtrent (via GitHub)" <gi...@apache.org>.
benwtrent commented on code in PR #14147:
URL: https://github.com/apache/lucene/pull/14147#discussion_r1925317415


##########
lucene/core/src/java/org/apache/lucene/search/knn/MultiLeafKnnCollector.java:
##########
@@ -77,6 +76,7 @@ public MultiLeafKnnCollector(
       int interval,
       BlockingFloatHeap globalSimilarityQueue,
       AbstractKnnCollector subCollector) {
+    super(subCollector);

Review Comment:
   For this particular use, it needs to be a `AbstractKnnCollector` which has different methods than the regular `KnnCollector`. So, changing the visibility doesn't really simplify things much.



-- 
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-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [PR] move MultiLeafKnnCollector to decorator and remove unnecessary code [lucene]

Posted by "benwtrent (via GitHub)" <gi...@apache.org>.
benwtrent merged PR #14147:
URL: https://github.com/apache/lucene/pull/14147


-- 
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-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org