Approximation framework to support numeric search_after queries#18896
Merged
prudhvigodithi merged 28 commits intoopensearch-project:mainfrom Aug 6, 2025
Merged
Approximation framework to support numeric search_after queries#18896prudhvigodithi merged 28 commits intoopensearch-project:mainfrom
search_after queries#18896prudhvigodithi merged 28 commits intoopensearch-project:mainfrom
Conversation
Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>
Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>
Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>
Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>
Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>
Contributor
Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>
23 tasks
kkewwei
approved these changes
Aug 6, 2025
Contributor
|
❌ Gradle check result for 9137fe5: 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? |
Contributor
Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>
Contributor
cwperks
approved these changes
Aug 6, 2025
Member
|
For some reason @kkewwei 's approval didn't count towards merge. Approving the PR while we figure out the codeowners issue. |
6468464
into
opensearch-project:main
34 of 35 checks passed
3 tasks
This was referenced Aug 7, 2025
65 tasks
RajatGupta02
pushed a commit
to RajatGupta02/OpenSearch
that referenced
this pull request
Aug 18, 2025
…ensearch-project#18896) * Initial commit for search_after queries Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Test with increment and decrement with search_after Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * search_after queries Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Support framework for search_after queries Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Fix gradle precommit issues Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Add comments Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Attempt to fix the test Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Attempt to fix the test Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Update CHANGELOG.md Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Update CHANGELOG.md and fetch upstream Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Update tests validating with lucene searchAfter Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Update tests validating with lucene searchAfter Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Update tests validating with lucene searchAfter Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Update code with comments Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Add encode tests Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Fix conflicts Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Fix spotless Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Code clean up Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Upstream fetch Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Upstream Fetch Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Add clamps Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Upstream Fetch to resolve conflicts Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> --------- Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>
kh3ra
pushed a commit
to kh3ra/OpenSearch
that referenced
this pull request
Sep 5, 2025
…ensearch-project#18896) * Initial commit for search_after queries Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Test with increment and decrement with search_after Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * search_after queries Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Support framework for search_after queries Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Fix gradle precommit issues Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Add comments Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Attempt to fix the test Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Attempt to fix the test Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Update CHANGELOG.md Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Update CHANGELOG.md and fetch upstream Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Update tests validating with lucene searchAfter Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Update tests validating with lucene searchAfter Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Update tests validating with lucene searchAfter Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Update code with comments Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Add encode tests Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Fix conflicts Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Fix spotless Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Code clean up Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Upstream fetch Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Upstream Fetch Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Add clamps Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Upstream Fetch to resolve conflicts Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> --------- Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>
vinaykpud
pushed a commit
to vinaykpud/OpenSearch
that referenced
this pull request
Sep 26, 2025
…ensearch-project#18896) * Initial commit for search_after queries Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Test with increment and decrement with search_after Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * search_after queries Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Support framework for search_after queries Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Fix gradle precommit issues Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Add comments Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Attempt to fix the test Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Attempt to fix the test Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Update CHANGELOG.md Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Update CHANGELOG.md and fetch upstream Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Update tests validating with lucene searchAfter Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Update tests validating with lucene searchAfter Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Update tests validating with lucene searchAfter Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Update code with comments Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Add encode tests Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Fix conflicts Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Fix spotless Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Code clean up Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Upstream fetch Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Upstream Fetch Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Add clamps Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> * Upstream Fetch to resolve conflicts Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com> --------- Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR targets to support
search_afterqueries from the solution described in this issue #18546.ASCsort and upper bound forDESCsort. Example:Adds new
byte[] encodePoint(Object value, boolean roundUp);inNumericPointEncoderas todaysearch_aftervalue is returned as object and requires converting it into the appropriate field specific byte[].search_afterwithASCsort we want values greater than thesearch_aftervalue and forDESCsort we want values less than thesearch_after.Handles the search_after conversation for dates with date math rounding operations, here is the sample query. Note the existing
parseToLongis for date math rounding operations and not for creatingsearch_afterbounds.Coming from this PR https://github.com/opensearch-project/OpenSearch/pull/18763/files where approximation code path is disabled for multi sort, hence
search_aftershould work as expected when dealing with multiple tie breakersearch_aftervaluesRegarding benchmarks following are the queries we should see improvement from the existing workloads
desc_sort_with_after_timestamp,asc_sort_with_after_timestampdesc_sort_with_after_timestamp,asc_sort_with_after_timestampasc_sort_with_after_population,desc_sort_with_after_geonameid,asc_sort_with_after_geonameidDescription
[Describe what this change achieves]
Related Issues
Resolves #18546
Check List
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.