-
Notifications
You must be signed in to change notification settings - Fork 191
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
Add support for approximate k-NN queries #548
Conversation
Signed-off-by: Thomas Farr <tsfarr@amazon.com>
Signed-off-by: Thomas Farr <tsfarr@amazon.com>
Signed-off-by: Thomas Farr <tsfarr@amazon.com>
Signed-off-by: Thomas Farr <tsfarr@amazon.com>
Signed-off-by: Thomas Farr <tsfarr@amazon.com>
Signed-off-by: Thomas Farr <tsfarr@amazon.com>
@@ -1066,7 +1066,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { | |||
|
|||
} | |||
if (this.knnAlgoParamEfSearch != null) { | |||
generator.writeKey("knn.algo_param_ef_search"); | |||
generator.writeKey("knn.algo_param.ef_search"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@@ -1066,7 +1066,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { | |||
|
|||
} | |||
if (this.knnAlgoParamEfSearch != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not related to this change, but it seems like a bunch of KNN index settings are missed:
"settings" : {
"index": {
"knn": true,
"knn.algo_param.m":90,
"knn.algo_param.ef_construction":200,
"knn.algo_param.ef_search":300
}
},
https://github.com/opensearch-project/k-NN/blob/main/RFC.md?plain=1
@@ -28,8 +28,9 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) | |||
## [Unreleased 2.x] | |||
|
|||
### Added | |||
- Add support for knn_vector field type ([#529](https://github.com/opensearch-project/opensearch-java/pull/524)) | |||
- Add support for knn_vector field type ([#524](https://github.com/opensearch-project/opensearch-java/pull/524)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Signed-off-by: Thomas Farr <xtansia@xtansia.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need changes to USER_GUIDE? Can be followed up later.
* Add Knn query type Signed-off-by: Thomas Farr <tsfarr@amazon.com> * Integration test Signed-off-by: Thomas Farr <tsfarr@amazon.com> * Checkstyle fix Signed-off-by: Thomas Farr <tsfarr@amazon.com> * Run unreleased test Signed-off-by: Thomas Farr <tsfarr@amazon.com> * Fixes Signed-off-by: Thomas Farr <tsfarr@amazon.com> * Assume knn plugin installed Signed-off-by: Thomas Farr <tsfarr@amazon.com> * Changelog Signed-off-by: Thomas Farr <tsfarr@amazon.com> * Add to QueryBuilders Signed-off-by: Thomas Farr <tsfarr@amazon.com> --------- Signed-off-by: Thomas Farr <tsfarr@amazon.com> Signed-off-by: Thomas Farr <xtansia@xtansia.com> (cherry picked from commit f427f27) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Add support for approximate k-NN queries (#548) * Add Knn query type Signed-off-by: Thomas Farr <tsfarr@amazon.com> * Integration test Signed-off-by: Thomas Farr <tsfarr@amazon.com> * Checkstyle fix Signed-off-by: Thomas Farr <tsfarr@amazon.com> * Run unreleased test Signed-off-by: Thomas Farr <tsfarr@amazon.com> * Fixes Signed-off-by: Thomas Farr <tsfarr@amazon.com> * Assume knn plugin installed Signed-off-by: Thomas Farr <tsfarr@amazon.com> * Changelog Signed-off-by: Thomas Farr <tsfarr@amazon.com> * Add to QueryBuilders Signed-off-by: Thomas Farr <tsfarr@amazon.com> --------- Signed-off-by: Thomas Farr <tsfarr@amazon.com> Signed-off-by: Thomas Farr <xtansia@xtansia.com> (cherry picked from commit f427f27) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * Fixing compile errors Signed-off-by: Vacha Shah <vachshah@amazon.com> --------- Signed-off-by: Thomas Farr <tsfarr@amazon.com> Signed-off-by: Thomas Farr <xtansia@xtansia.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Signed-off-by: Vacha Shah <vachshah@amazon.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Vacha Shah <vachshah@amazon.com>
Description
Adds support for the approximate k-NN query type to pair with the support for the
knn_vector
type added in #524. Along with a couple bug fixes for that support.Issues Resolved
#539
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.