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 pre-filter queries for Lucene-based approximate k-NN #376

Closed
vamshin opened this issue Apr 25, 2022 · 9 comments
Closed
Assignees
Labels
Features Introduces a new unit of functionality that satisfies a requirement v2.4.0 'Issues and PRs related to version v2.4.0'

Comments

@vamshin
Copy link
Member

vamshin commented Apr 25, 2022

Is your feature request related to a problem?
We do not have support to pre filter docs and then apply k-NN specifically on the filtered docs. This will help guarantee to obtain k Nearsest Neighbors on the filtered set. Please note, this is applicable only to Lucene based approximate k-NN search

What solution would you like?
Rely on Lucene's KnnVectorQuery to operate over a subset of liveDocs.
https://issues.apache.org/jira/browse/LUCENE-10382

@vamshin vamshin added 2.2.0 Features Introduces a new unit of functionality that satisfies a requirement and removed untriaged enhancement labels Apr 25, 2022
@vamshin vamshin added 2.3.0 and removed 2.2.0 labels May 11, 2022
@KelseyJuraschka
Copy link

I would love to see this feature implemented. Any ideas on when in the roadmap this may land? Elastic recently released their implementation.

@vamshin
Copy link
Member Author

vamshin commented Jun 13, 2022

Hi @KelseyJuraschka we are targeting 2.3 release https://github.com/orgs/opensearch-project/projects/1#card-81105162

@ngadkari
Copy link

ngadkari commented Sep 7, 2022

For my understanding this to add pre-filtering support for KNN indices with Lucene 'engine' support. Are there similar work to support this for nmslib and fais engine

@ymartin-mw
Copy link

@martin-gaievski Hey
Does the feature for pre-filtering on lucene hnsw ANN k-NN released in Opensearch 2.4?
Any estimation or knowledge how to upgrade AWS managed Opensearch from the maximum available 2.3 to 2.4?

Thanks

@navneet1v
Copy link
Collaborator

Yes this feature is released in OpenSearch 2.4.

Any estimation or knowledge how to upgrade AWS managed OpenSearch from the maximum available 2.3 to 2.4?

On this it will better if you can directly ask support team of AWS managed OpenSearch. As per my knowledge AWS managed OpenSearch will not support 2.4 version and they will directly launch 2.5. Again it will be better if you can contact AWS support team directly.

@martin-gaievski
Copy link
Member

@ymartin-mw 2.5+ is better option for upgrade, in 2.4 lucene version 9.4 bring certain performance problems related to new way of doing segment merge in background. They are fixed in 2.5 (check #637 and #721 for details)

@ymartin-mw
Copy link

Just got a message from AWS that they released the OpenSearch 2.5 version 🎉

@ymartin-mw
Copy link

Any reference on how to build such query that does pre-filtering before approximate k-NN (lucene, hnsw)?

@navneet1v
Copy link
Collaborator

@ymartin-mw Please look into this documentation: https://opensearch.org/docs/latest/search-plugins/knn/filter-search-knn/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Features Introduces a new unit of functionality that satisfies a requirement v2.4.0 'Issues and PRs related to version v2.4.0'
Projects
None yet
Development

No branches or pull requests

7 participants