-
Notifications
You must be signed in to change notification settings - Fork 41
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] knn_vector field type is not supported #124
Comments
How would you suggest this get addressed? Do we need to go up to the spring library to request a change to the options? |
One more vote for that. |
@noam-shoef Want to give this implementation a shot? |
What we came up with is something like this: Annotation class for knn vector:
A mapping from the annotation:
An override of the mapping function to include handing of the extra annotation:
This enable us to annotate our field with knn annotation and then we create our mapping using the createCustomMapping extension method instead of the usual createMapping and this knows how to handle the annotation. |
Will let @reta comment on the implementation as I don't understand the codebase well enough, but I encourage you to submit a PR with tests & al. |
Thanks @noam-shoef , the implementation is tricky to do:
|
The org.springframework.data.elasticsearch.annotations.Field has only dense_vector but not knn_vector. It looks we cannot annotate a field as knn_vector on the model through spring-data-opensearch libs.
The text was updated successfully, but these errors were encountered: