Skip to content

Conversation

@opensearch-trigger-bot
Copy link
Contributor

Backport 7db7a5a from #18702.

…ts (#18702)

* optimize num agg using quick select for topN when applicable

Signed-off-by: Rishabh Maurya <rishabhmaurya05@gmail.com>
(cherry picked from commit 130d890)

* Updated the numeric term aggregation logic to select topN

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

* Updated the algorithm selection logic

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

* Added a feature flag for the implementation

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

* Added profile debug information

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

* use priority queue method for significant terms

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

* Refactored the selection strategy

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

* Added tests case with proper assertions

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

* Added cluster settings for selection strategy

Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>

---------

Signed-off-by: Rishabh Maurya <rishabhmaurya05@gmail.com>
Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>
Co-authored-by: Rishabh Maurya <rishabhmaurya05@gmail.com>
(cherry picked from commit 7db7a5a)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@github-actions
Copy link
Contributor

github-actions bot commented Aug 7, 2025

✅ Gradle check result for dcc2a6a: SUCCESS

@codecov
Copy link

codecov bot commented Aug 7, 2025

Codecov Report

❌ Patch coverage is 89.47368% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.79%. Comparing base (5cddeb8) to head (dcc2a6a).
⚠️ Report is 5 commits behind head on 3.2.

Files with missing lines Patch % Lines
...egations/bucket/terms/BucketSelectionStrategy.java 92.95% 2 Missing and 3 partials ⚠️
...regations/bucket/terms/NumericTermsAggregator.java 76.47% 4 Missing ⚠️
...va/org/opensearch/search/DefaultSearchContext.java 80.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##                3.2   #18974      +/-   ##
============================================
- Coverage     72.90%   72.79%   -0.12%     
+ Complexity    69349    69314      -35     
============================================
  Files          5642     5643       +1     
  Lines        318636   318713      +77     
  Branches      46107    46112       +5     
============================================
- Hits         232306   232011     -295     
- Misses        67484    67936     +452     
+ Partials      18846    18766      -80     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rishabhmaurya rishabhmaurya merged commit 65601fa into 3.2 Aug 7, 2025
52 checks passed
@github-actions github-actions bot deleted the backport/backport-18702-to-3.2 branch August 7, 2025 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants