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

(api): Support k-nearest neighbor (kNN) search #385

Merged
merged 9 commits into from
Jan 23, 2024
Merged

Conversation

drmarjanovic
Copy link
Member

Resolves #381

@drmarjanovic drmarjanovic marked this pull request as ready for review January 21, 2024 21:06
* @return
* an instance of [[zio.elasticsearch.query.KNNQuery]] that represents the kNN query to be performed.
*/
final def kNN[S](field: Field[S, _], k: Int, numCandidates: Int, queryVector: Chunk[Double]): KNNQuery[S] =
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe we could rename k to something more meaningful.

Copy link
Member Author

Choose a reason for hiding this comment

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

I guess k makes more sense to users using it. Additionally, it's a kNN search.

@drmarjanovic drmarjanovic merged commit 05160bd into main Jan 23, 2024
13 checks passed
@drmarjanovic drmarjanovic deleted the support-knn-search branch January 23, 2024 17:14
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.

Add support for knn
4 participants