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

MB-62230 - Pre-Filtering Support for kNN #2063

Merged
merged 18 commits into from
Sep 10, 2024
Merged

MB-62230 - Pre-Filtering Support for kNN #2063

merged 18 commits into from
Sep 10, 2024

Conversation

metonymic-smokey
Copy link
Member

@metonymic-smokey metonymic-smokey commented Aug 12, 2024

  1. Extended KNN queries to support filter queries if specified.
  2. Created a new collector, eligible collector, and a new document match handler for the filter queries as part of kNN.
  3. Run the filter queries prior to each kNN query and pass the results when constructing the kNN queries.
  4. Added unit tests for filtered kNN cases.
  5. Updated the documentation with an example of a filtered kNN request.

Copy link
Member

@abhinavdangeti abhinavdangeti left a comment

Choose a reason for hiding this comment

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

Made one pass, will require a few more after changes to API signatures.

search/query/knn.go Outdated Show resolved Hide resolved
search/query/knn.go Outdated Show resolved Hide resolved
search_knn.go Outdated Show resolved Hide resolved
index/scorch/optimize_knn.go Outdated Show resolved Hide resolved
index/scorch/snapshot_index.go Outdated Show resolved Hide resolved
index/scorch/snapshot_index_vr.go Outdated Show resolved Hide resolved
index/scorch/snapshot_index_vr.go Show resolved Hide resolved
index/scorch/snapshot_index.go Outdated Show resolved Hide resolved
index/scorch/snapshot_index.go Show resolved Hide resolved
index/scorch/snapshot_index_vr.go Show resolved Hide resolved
docs/vectors.md Outdated Show resolved Hide resolved
Thejas-bhat
Thejas-bhat previously approved these changes Aug 29, 2024
Copy link
Member

@abhinavdangeti abhinavdangeti left a comment

Choose a reason for hiding this comment

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

@metonymic-smokey no force pushing here please, checkout latest from branch pre-filter before pushing commits up. There're unit tests failing that needs looking into -

--- FAIL: TestSimilaritySearchPartitionedIndex (0.31s)
    search_knn_test.go:876: test case #0 failed: 0 hits returned
--- FAIL: TestSimilaritySearchMultipleSegments (0.27s)
    search_knn_test.go:876: test case #0 failed: 0 hits returned

@metonymic-smokey metonymic-smokey marked this pull request as draft September 10, 2024 07:35
@metonymic-smokey metonymic-smokey marked this pull request as ready for review September 10, 2024 08:49
search_knn.go Outdated Show resolved Hide resolved
@abhinavdangeti abhinavdangeti merged commit 33a34c3 into master Sep 10, 2024
9 checks passed
@abhinavdangeti abhinavdangeti deleted the pre-filter branch September 10, 2024 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants