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 exact search for cases when filteredIds < k to improve the recall for filtered k-NN Search #928

Conversation

navneet1v
Copy link
Collaborator

Description

Added exact search for cases when filteredIds < k to improve the recall for filtered k-NN Search

Next Steps:

  1. Add the unit tests and integration tests.
  2. Add the benchmark results on the github issue and compare them with Lucene.

Issues Resolved

#903

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 Jun 6, 2023

Codecov Report

Merging #928 (b2bd95d) into feature/faiss-filtering (1135d79) will decrease coverage by 0.42%.
The diff coverage is 22.95%.

@@                      Coverage Diff                      @@
##             feature/faiss-filtering     #928      +/-   ##
=============================================================
- Coverage                      83.92%   83.51%   -0.42%     
- Complexity                      1092     1094       +2     
=============================================================
  Files                            152      152              
  Lines                           4492     4518      +26     
  Branches                         400      403       +3     
=============================================================
+ Hits                            3770     3773       +3     
- Misses                           538      560      +22     
- Partials                         184      185       +1     
Impacted Files Coverage Δ
...java/org/opensearch/knn/index/query/KNNWeight.java 55.00% <22.95%> (-7.29%) ⬇️

... and 1 file with indirect coverage changes

Copy link
Member

@vamshin vamshin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks

@navneet1v navneet1v merged commit 96aaab7 into opensearch-project:feature/faiss-filtering Jun 8, 2023
navneet1v added a commit to navneet1v/k-NN that referenced this pull request Jun 14, 2023
navneet1v added a commit to navneet1v/k-NN that referenced this pull request Jun 14, 2023
navneet1v added a commit to navneet1v/k-NN that referenced this pull request Jun 14, 2023
…es include

 * Enabled the efficient filtering support for Faiss Engine (opensearch-project#907)
 * Fixed the ef_search default value for faiss HNSW with filters and updated the perf-tool to include Faiss HNSW tests (opensearch-project#926)
 * Added exact search for cases when filteredIds < k to improve the recall for exact search (opensearch-project#928)
 * Improved Exact Search to return only K results and added client side latency metric for query Benchmarks (opensearch-project#933)
 * Added Integration Tests and Unit test for Efficient Filtering for Faiss Engine (opensearch-project#934)

Signed-off-by: Navneet Verma <[email protected]>
navneet1v added a commit to navneet1v/k-NN that referenced this pull request Jun 14, 2023
…es include

 * Enabled the efficient filtering support for Faiss Engine (opensearch-project#907)
 * Fixed the ef_search default value for faiss HNSW with filters and updated the perf-tool to include Faiss HNSW tests (opensearch-project#926)
 * Added exact search for cases when filteredIds < k to improve the recall for exact search (opensearch-project#928)
 * Improved Exact Search to return only K results and added client side latency metric for query Benchmarks (opensearch-project#933)
 * Added Integration Tests and Unit test for Efficient Filtering for Faiss Engine (opensearch-project#934)

Signed-off-by: Navneet Verma <[email protected]>
navneet1v added a commit to navneet1v/k-NN that referenced this pull request Jun 14, 2023
…es include

 * Enabled the efficient filtering support for Faiss Engine (opensearch-project#907)
 * Fixed the ef_search default value for faiss HNSW with filters and updated the perf-tool to include Faiss HNSW tests (opensearch-project#926)
 * Added exact search for cases when filteredIds < k to improve the recall for exact search (opensearch-project#928)
 * Improved Exact Search to return only K results and added client side latency metric for query Benchmarks (opensearch-project#933)
 * Added Integration Tests and Unit test for Efficient Filtering for Faiss Engine (opensearch-project#934)

Signed-off-by: Navneet Verma <[email protected]>
navneet1v added a commit to navneet1v/k-NN that referenced this pull request Jun 14, 2023
…es include

 * Enabled the efficient filtering support for Faiss Engine (opensearch-project#907)
 * Fixed the ef_search default value for faiss HNSW with filters and updated the perf-tool to include Faiss HNSW tests (opensearch-project#926)
 * Added exact search for cases when filteredIds < k to improve the recall for exact search (opensearch-project#928)
 * Improved Exact Search to return only K results and added client side latency metric for query Benchmarks (opensearch-project#933)
 * Added Integration Tests and Unit test for Efficient Filtering for Faiss Engine (opensearch-project#934)

Signed-off-by: Navneet Verma <[email protected]>
navneet1v added a commit that referenced this pull request Jun 14, 2023
…es include (#936)

* Enabled the efficient filtering support for Faiss Engine (#907)
 * Fixed the ef_search default value for faiss HNSW with filters and updated the perf-tool to include Faiss HNSW tests (#926)
 * Added exact search for cases when filteredIds < k to improve the recall for exact search (#928)
 * Improved Exact Search to return only K results and added client side latency metric for query Benchmarks (#933)
 * Added Integration Tests and Unit test for Efficient Filtering for Faiss Engine (#934)

Signed-off-by: Navneet Verma <[email protected]>
navneet1v added a commit to navneet1v/k-NN that referenced this pull request Jun 14, 2023
…es include (opensearch-project#936)

* Enabled the efficient filtering support for Faiss Engine (opensearch-project#907)
 * Fixed the ef_search default value for faiss HNSW with filters and updated the perf-tool to include Faiss HNSW tests (opensearch-project#926)
 * Added exact search for cases when filteredIds < k to improve the recall for exact search (opensearch-project#928)
 * Improved Exact Search to return only K results and added client side latency metric for query Benchmarks (opensearch-project#933)
 * Added Integration Tests and Unit test for Efficient Filtering for Faiss Engine (opensearch-project#934)

Signed-off-by: Navneet Verma <[email protected]>
navneet1v added a commit to navneet1v/k-NN that referenced this pull request Jul 10, 2023
…es include (opensearch-project#936)

* Enabled the efficient filtering support for Faiss Engine (opensearch-project#907)
 * Fixed the ef_search default value for faiss HNSW with filters and updated the perf-tool to include Faiss HNSW tests (opensearch-project#926)
 * Added exact search for cases when filteredIds < k to improve the recall for exact search (opensearch-project#928)
 * Improved Exact Search to return only K results and added client side latency metric for query Benchmarks (opensearch-project#933)
 * Added Integration Tests and Unit test for Efficient Filtering for Faiss Engine (opensearch-project#934)

Signed-off-by: Navneet Verma <[email protected]>
navneet1v added a commit that referenced this pull request Jul 10, 2023
…es include (#936)

* Enabled the efficient filtering support for Faiss Engine (#907)
 * Fixed the ef_search default value for faiss HNSW with filters and updated the perf-tool to include Faiss HNSW tests (#926)
 * Added exact search for cases when filteredIds < k to improve the recall for exact search (#928)
 * Improved Exact Search to return only K results and added client side latency metric for query Benchmarks (#933)
 * Added Integration Tests and Unit test for Efficient Filtering for Faiss Engine (#934)

Signed-off-by: Navneet Verma <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants