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

[PR] Remove PriorityQueue.remove [lucene]

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

   Fixes #15309. 
   
   I've removed the public, linear, remove() method from PriorityQueue. I also made some methods protected which - in case somebody really wants to - can be used to implement the linear remove() in the way it was implemented before. This is actually also the workaround I used for DiversifiedTopDocsCollector. 
   
   Non-linear remove(element) on a PriorityQueue is not an easy thing to do without somehow tracking positions on the heap, which would make everything slower. Let's keep the essentials that are fast instead.
   
   This patch makes certain PQ members protected (size, upHeap, downHeap). I think it makes sense to do so because we already expose the heap buffer and allow subclassing. Seems like the above are necessary ingredients for implementing something reasonable in a subclass.


-- 
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] Remove PriorityQueue.remove [lucene]

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


-- 
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