You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.
@nhatnambui
I believe that you would like to know how to retrieve knn_vector value. I hope the following example will help in your use case. You can update query to filter the document based on your scenario.
I created an index with a knn_vector field using the mapping below
I wanted to use
my_vector
value of another doc asquery_value
in the below knn search queryAccording to the issue #341, I guess currently it's impossible to achieve that in just one request.
So in the first request, I have to retrieve
my_vector
for a specific doc then use it asquery_value
in the second request.The problem is when retrieving
my_vector
usingdocvalue_fields
I got the errorI also tried "stored_fields" but it didn't work.
How can I retrieve value of a
knn_vector
field?A workaround is to create and use a duplicate field with
float
type like below, but I think it's not optimal.The text was updated successfully, but these errors were encountered: