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 for Filters in K-NN Query #584

Closed
navneet1v opened this issue Jul 22, 2023 · 5 comments
Closed

[FEATURE] Support for Filters in K-NN Query #584

navneet1v opened this issue Jul 22, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@navneet1v
Copy link

Is your feature request related to a problem?

OpenSearch k-NN field support filters and the current k-NN query class(#539) in the client doesn't support the filters.

Documentation for filters: https://opensearch.org/docs/latest/search-plugins/knn/filter-search-knn/

What solution would you like?

Add the support to build the k-NN query clause with filters in the client.

What alternatives have you considered?

Alternative is to build a query json and use that to do the k-NN query with filters.

Do you have any additional context?

Please enable the support of k-NN query with filters in all the other clients.

@navneet1v navneet1v added enhancement New feature or request untriaged labels Jul 22, 2023
@Xtansia Xtansia removed the untriaged label Jul 23, 2023
@Xtansia
Copy link
Collaborator

Xtansia commented Jul 23, 2023

Hi @navneet1v,
Are you specifically referring to the script scoring method on the docs page you reference? As both the bool filtering and Lucene filtering methods should already be supported by the client.

@wbeckler
Copy link

wbeckler commented Jul 24, 2023

I think this PR into the docs isn't showing up in the 2.8 docs because it's unreleased:
https://github.com/opensearch-project/documentation-website/pull/4476/files

@Xtansia
Copy link
Collaborator

Xtansia commented Jul 26, 2023

@navneet1v I believe the samples I'm adding in https://github.com/opensearch-project/opensearch-java/pull/586/files show that all the filtering methods are supported by the client? Please clarify if there's something else I'm missing

@navneet1v
Copy link
Author

Thanks @Xtansia. The example looks good.

@Xtansia
Copy link
Collaborator

Xtansia commented Jul 26, 2023

Closing this issue as the filters are supported by the client and now have documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants