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

Optimize the check when to do exact search vs ANN for filtered Search #929

Closed
navneet1v opened this issue Jun 6, 2023 · 1 comment
Closed
Assignees

Comments

@navneet1v
Copy link
Collaborator

Description

As part of implementing the Filters for Native Engine(Faiss), currently we are checking if filterIds < k we switch to exact search. The ask here is to improve this check to come up with a better check when we should do exact search vs ANN Search.

PR: #928

Code Ref: https://github.com/opensearch-project/k-NN/pull/928/files/b2bd95dbf92115a43f24773c39af42cade6083f6#diff-b0eb527e944c912b803db37ed9dd3dfa7689864b77d7146a0d45d7b73138d7b8R114

Solution

As per my understanding we should look at the ratio of total documents in the segment, filterids and K. We can add ef_search parameter here also.

Expectation

Come up with a way to improve this logic.

@navneet1v
Copy link
Collaborator Author

Closing this issue, as I have published more detailed feature request here: #1049

@navneet1v navneet1v self-assigned this Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant