Open
Description
Describe the bug
Problem: If the number of requested top-N buckets (N) often exceeded or was close to the maximum bucket ordinal, making the use of a PriorityQueue for top-N selection inefficient or redundant.
Solution: Introduced conditional logic to optimize bucket selection:
* If N > max bucket ordinal: No-op (return all buckets).
* If N < max bucket ordinal but N is bellow 10% of max bucket ordinal: Use quickselect for top-N.
* Otherwise: Use PriorityQueue for top-N.
Related component
Search:Performance
Additional Details
Plugins
NA
Screenshots
NA
Host/Environment (please complete the following information):
- Tests using r5.xl host with EBS Gp3 16000 IOPS, 500Gb and 1000 throughput.
Additional context
Add any other context about the problem here.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Status