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
dot_product not work! #107780
Comments
@longday1102 this is likely due to your vector values not being normalized (magnitude of length 1). The bulk response should have some details contained in the response indicating the failure. |
Pinging @elastic/es-search (Team:Search) |
@longday1102 if you have issues getting the bulk response to print out the issue, you can also make a manual request with one of your documents in the kibana console (if you have kibana). Or via curl, and the response body will contain the reason for the failure. |
@benwtrent I normalized the length of the dense_vector to 1 but that didn't solve the error. |
@longday1102 to solve the issue, we will need to know what the bulk error failure details are. Could you provide those? An option is as well to attempt to index the same documents (or just one of the failing ones) manually via the Kibana Console or CURL. |
Elasticsearch Version
8.13.0
Below is the code where I define my data fields, in which the
content_vector
field with similarity isdot_product
. In the process of getting the embedding vectors from my model, I normalized the values in each vector to a length of 1. Theactions
variable is the setting for me to push my data to elasticsearch.However, this code encounters the error
elasticsearch.helpers.BulkIndexError: 423 document(s) failed to index.
I found that if I replace
_source
inactions
withdoc
or change thesimilarity
of thecontent_vector
field tocosine
, no error will occur.Can someone explain to me why there is such an error?
The text was updated successfully, but these errors were encountered: