-
Notifications
You must be signed in to change notification settings - Fork 126
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] k-NN Array support for Vector Field type #675
Comments
@mausch Can you please provide details about your use-case? |
A schema where every document has 1..N vectors, plus several other regular OpenSearch fields. At the moment I'm working around things by representing every entity as 1..N documents, but this means I have to duplicate all the other regular fields, and also I have to overspecify the result size. |
@mausch For now, we are not able to add Array support for k-NN Vector Field Type due to the underlying limitation with lucene. By default, knn_vector field supports Binary Doc Values. But, lucene is not supporting Multi BinaryDocValues where the BinaryDocValuesWriter in lucene doesn’t support adding binary values(bytes) of multiple vectors into the same document which throws IllegalArgumentException. For your use case, we recommend using Nested Field Type as it is supported for ANN Search. For Example :
Please let us know if you have any other questions. |
Ah, forgot about nested fields! That's a great workaround, thanks 👍 |
For the reference, query will look like
|
In OpenSearch it's expected since forever to be able to pass an array of values to any field.
In fact the documentation says "you can pass an array of values into any field."
However when you try to do that for fields of type
knn_vector
you get amapper_parsing_exception
The text was updated successfully, but these errors were encountered: