-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Improve sort-query performance by retaining the default totalHitsThreshold
for approximated match_all
queries
#18189
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
Conversation
totalHitsThreshold
value to defaults with approximation match_all
match_all
retain totalHitsThreshold
value to default with approximation
{"run-benchmark-test": "id_4"} |
match_all
retain totalHitsThreshold
value to default with approximation match_all
with approximation retain totalHitsThreshold
value to default
❌ Gradle check result for a8a80e3: 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? |
The Jenkins job url is https://build.ci.opensearch.org/job/benchmark-pull-request/3039/ . Final results will be published once the job is completed. |
23a29a4
to
fd7d055
Compare
❌ Gradle check result for fd7d055: 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? |
{"run-benchmark-test": "id_4"} |
The Jenkins job url is https://build.ci.opensearch.org/job/benchmark-pull-request/3040/ . Final results will be published once the job is completed. |
❌ Gradle check result for 1983cca: 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? |
Benchmark ResultsBenchmark Results for Job: https://build.ci.opensearch.org/job/benchmark-pull-request/3040/
|
Benchmark Baseline Comparison ResultsBenchmark Results for Job: https://build.ci.opensearch.org/job/benchmark-compare/94/
|
match_all
with approximation retain totalHitsThreshold
value to defaulttotalHitsThreshold
for approximated match_all
queries
Signed-off-by: Prudhvi Godithi <[email protected]>
❌ Gradle check result for e85b851: 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? |
❌ Gradle check result for e85b851: 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? |
❌ Gradle check result for f42e464: 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? |
server/src/internalClusterTest/java/org/opensearch/search/sort/FieldSortIT.java
Show resolved
Hide resolved
server/src/main/java/org/opensearch/search/approximate/ApproximatePointRangeQuery.java
Show resolved
Hide resolved
Accidently clicked approval ... |
server/src/main/java/org/opensearch/search/approximate/ApproximateScoreQuery.java
Show resolved
Hide resolved
I think you discovered a pretty important part, shortcut total hits, for giving the right Putting down a quick summary of "approximation"
One idea is to have ApproximateQuery itself able to provide a shortcut total hits, and at the time of building TopDocsCollectorContext, provide that. cc: @getsaurabh02 |
Thanks @bowenlan-amzn I see you already approved PR, once the gradle check is green we can get this merged. |
server/src/main/java/org/opensearch/search/approximate/ApproximateScoreQuery.java
Show resolved
Hide resolved
server/src/main/java/org/opensearch/search/approximate/ApproximateScoreQuery.java
Show resolved
Hide resolved
server/src/main/java/org/opensearch/search/query/TopDocsCollectorContext.java
Show resolved
Hide resolved
Thanks for the review folks, just a follow up to see if we can get this merged to main. |
The backport to
To backport manually, run these commands in your terminal: # Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch/backport-3.0 3.0
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch/backport-3.0
# Create a new branch
git switch --create backport/backport-18189-to-3.0
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 560ac1030c941c8cb01c4fcd29a919bd45ccabee
# Push it to GitHub
git push --set-upstream origin backport/backport-18189-to-3.0
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch/backport-3.0 Then, create a pull request where the |
Create a manual backport PR #18220. |
Description
Note: Seen some slight perf gains for desc_sort_timestamp and asc_sort_timestamp with this change.
Related Issues
Resolves #18206
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.