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

[FEATURE] Support filter queries for approximate k-NN that is based on Faiss #4330

Closed
martin-gaievski opened this issue Aug 29, 2022 · 2 comments
Labels
enhancement Enhancement or improvement to existing feature or request untriaged

Comments

@martin-gaievski
Copy link
Member

Is your feature request related to a problem? Please describe.
We do not have support to effectively filter docs and then apply k-NN specifically on the filtered docs. This will help guarantee to obtain k Nearest Neighbors on the filtered set. Please note, we're requesting only for Faiss based approximate k-NN search.

Describe the solution you'd like
Ideally we'd like to do k-NN approximate search on a sub-set of docs that match filtering criteria and have a guarantee of top K docs in result. We want to be able to define the filter(s) in knn query and use existing OpenSearch queries as filters (boolean, term etc.).

Describe alternatives you've considered
Pre-filtering is supported with scoring script but in form of exact brute-force k-NN search. Post-filtering can be done as approximate search with post-processing, but problem is that top k results are not guaranteed.

Additional context
We'd like to have parity with k-NN powered by Lucene, opensearch-project/k-NN#376

@martin-gaievski martin-gaievski added enhancement Enhancement or improvement to existing feature or request untriaged labels Aug 29, 2022
@martin-gaievski martin-gaievski changed the title [FEATURE] Support filter queries for approximate k-NN that is based on Faiss HNSW engine [FEATURE] Support filter queries for approximate k-NN that is based on Faiss Aug 29, 2022
@dblock
Copy link
Member

dblock commented Aug 29, 2022

Should this issue live in the k-nn repo?

@martin-gaievski
Copy link
Member Author

Should this issue live in the k-nn repo?

agree, let me close this one

@martin-gaievski martin-gaievski closed this as not planned Won't fix, can't repro, duplicate, stale Aug 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement or improvement to existing feature or request untriaged
Projects
None yet
Development

No branches or pull requests

2 participants