Skip to content

[Approximation Framework] Extending approximation to top-level term queries on numeric fields #18679

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

sawansri
Copy link

@sawansri sawansri commented Jul 3, 2025

Description

Enables approximation in top level term queries on numeric fields by wrapping termQuery mappers in NumberFieldMapper with ApproximatePointRangeQuery instead of Lucene's newExactQuery

Related Issues

Resolves #18620

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@github-actions github-actions bot added enhancement Enhancement or improvement to existing feature or request Search:Performance labels Jul 3, 2025
@sawansri
Copy link
Author

sawansri commented Jul 3, 2025

I'm waiting on #18530 to get merged before rebasing and refactoring my tests to integrate with the parameterized versions in ApproximatePointRangeQueryTests.

@sawansri sawansri changed the title [Approximation Framework] Enabling approximation on top-level term queries on numeric fields [Approximation Framework] Extending approximation to top-level term queries on numeric fields Jul 3, 2025
Copy link
Contributor

github-actions bot commented Jul 3, 2025

❌ Gradle check result for e8e55c4: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

github-actions bot commented Jul 3, 2025

❌ Gradle check result for ce6db1c: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

github-actions bot commented Jul 4, 2025

✅ Gradle check result for 6582d5e: SUCCESS

Copy link

codecov bot commented Jul 4, 2025

Codecov Report

Attention: Patch coverage is 62.50000% with 24 lines in your changes missing coverage. Please review.

Project coverage is 72.84%. Comparing base (5d9695c) to head (067933a).

Files with missing lines Patch % Lines
...org/opensearch/index/mapper/NumberFieldMapper.java 62.50% 12 Missing and 12 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #18679      +/-   ##
============================================
+ Coverage     72.74%   72.84%   +0.10%     
- Complexity    68400    68475      +75     
============================================
  Files          5568     5568              
  Lines        314401   314429      +28     
  Branches      45598    45604       +6     
============================================
+ Hits         228696   229034     +338     
+ Misses        67055    66779     -276     
+ Partials      18650    18616      -34     

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

Copy link
Contributor

github-actions bot commented Jul 6, 2025

✅ Gradle check result for 067933a: SUCCESS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement or improvement to existing feature or request lucene Search:Performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Approximation Framework] Extend approximation to top-level term queries on numeric fields
1 participant