javasoze opened a new issue, #15473: URL: https://github.com/apache/lucene/issues/15473
### Description If an index with very large doc count, is sorted: `myfield:asc`, and the query has sort spec: `myfield:asc`, we can get early-termination goodness and opens dorrs for many other optimization opportunities. However, when query has sort spec: `myfield:desc`, this presents to be the worst case because we would be `up-heap` and `rebalance` for every hit, because larger docids will always win the competition against the min-val of the priority queue. The proposal is to catch this case, and use a FIFO queue like `ArrayDequeue` instead of `PriorityQueue` to always insert into the queue. I am not sure if this is too much of an edge case to be included in Lucene, feel free to close the issue if so. -- 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]
