Skip to content
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

Added max distance computation logic to enhance the switch to exact search in filtered Nearest Neighbor Search. #1066

Merged
merged 1 commit into from
Aug 28, 2023

Conversation

navneet1v
Copy link
Collaborator

Description

Added max distance computation logic to enhance the switch to exact search in filtered Nearest Neighbor Search.

Issues Resolved

#1049

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed as per the DCO using --signoff

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.

@codecov
Copy link

codecov bot commented Aug 28, 2023

Codecov Report

Merging #1066 (5ec5f54) into main (74b87e8) will decrease coverage by 0.28%.
Report is 4 commits behind head on main.
The diff coverage is 83.78%.

❗ Current head 5ec5f54 differs from pull request most recent head 6d27cec. Consider uploading reports for the commit 6d27cec to get more accurate results

@@             Coverage Diff              @@
##               main    #1066      +/-   ##
============================================
- Coverage     85.33%   85.06%   -0.28%     
- Complexity     1149     1180      +31     
============================================
  Files           154      159       +5     
  Lines          4692     4787      +95     
  Branches        425      433       +8     
============================================
+ Hits           4004     4072      +68     
- Misses          497      520      +23     
- Partials        191      195       +4     
Files Changed Coverage Δ
...search/knn/plugin/transport/ClearCacheRequest.java 50.00% <50.00%> (ø)
...earch/knn/plugin/transport/ClearCacheResponse.java 50.00% <50.00%> (ø)
...java/org/opensearch/knn/index/query/KNNWeight.java 84.57% <66.66%> (-1.06%) ⬇️
...nsearch/knn/plugin/transport/ClearCacheAction.java 75.00% <75.00%> (ø)
...n/java/org/opensearch/knn/index/KNNIndexShard.java 90.32% <80.00%> (-3.56%) ⬇️
...ain/java/org/opensearch/knn/index/KNNSettings.java 84.05% <80.00%> (-2.67%) ⬇️
...nn/plugin/transport/ClearCacheTransportAction.java 86.66% <86.66%> (ø)
...n/java/org/opensearch/knn/common/KNNConstants.java 94.11% <100.00%> (+0.36%) ⬆️
...rch/knn/index/memory/NativeMemoryCacheManager.java 95.48% <100.00%> (+0.28%) ⬆️
...main/java/org/opensearch/knn/plugin/KNNPlugin.java 100.00% <100.00%> (ø)
... and 4 more

... and 1 file with indirect coverage changes

jmazanec15
jmazanec15 previously approved these changes Aug 28, 2023
jmazanec15
jmazanec15 previously approved these changes Aug 28, 2023
@navneet1v navneet1v added backport 2.x enhancement backport 2.10 backport to 2.10 branch v2.10.0 Issues targeting release v2.10.0 labels Aug 28, 2023
@navneet1v
Copy link
Collaborator Author

I am simplifying the logic to put the default k-NN algo at the end so that new checks can be added in future if we enable any new setting.

@heemin32

…earch in filtered Nearest Neighbor Search.

Signed-off-by: Navneet Verma <[email protected]>
@navneet1v navneet1v merged commit 5907cb5 into opensearch-project:main Aug 28, 2023
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.x 2.x
# Navigate to the new working tree
cd .worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-1066-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 5907cb5d29903d52f88574087a8f5cf92d0e4e0c
# Push it to GitHub
git push --set-upstream origin backport/backport-1066-to-2.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-1066-to-2.x.

@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.10 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.10 2.10
# Navigate to the new working tree
cd .worktrees/backport-2.10
# Create a new branch
git switch --create backport/backport-1066-to-2.10
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 5907cb5d29903d52f88574087a8f5cf92d0e4e0c
# Push it to GitHub
git push --set-upstream origin backport/backport-1066-to-2.10
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.10

Then, create a pull request where the base branch is 2.10 and the compare/head branch is backport/backport-1066-to-2.10.

navneet1v added a commit to navneet1v/k-NN that referenced this pull request Aug 28, 2023
…earch in filtered Nearest Neighbor Search. (opensearch-project#1066)

Signed-off-by: Navneet Verma <[email protected]>
navneet1v added a commit to navneet1v/k-NN that referenced this pull request Aug 28, 2023
…earch in filtered Nearest Neighbor Search. (opensearch-project#1066)

Signed-off-by: Navneet Verma <[email protected]>
navneet1v added a commit that referenced this pull request Aug 28, 2023
…earch in filtered Nearest Neighbor Search. (#1066) (#1068)

Signed-off-by: Navneet Verma <[email protected]>
opensearch-trigger-bot bot pushed a commit that referenced this pull request Aug 28, 2023
…earch in filtered Nearest Neighbor Search. (#1066) (#1068)

Signed-off-by: Navneet Verma <[email protected]>
(cherry picked from commit 865f613)
navneet1v added a commit that referenced this pull request Aug 28, 2023
…earch in filtered Nearest Neighbor Search. (#1066) (#1068) (#1070)

Signed-off-by: Navneet Verma <[email protected]>
(cherry picked from commit 865f613)

Co-authored-by: Navneet Verma <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x backport 2.10 backport to 2.10 branch enhancement v2.10.0 Issues targeting release v2.10.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants