Skip to content
This repository has been archived by the owner on Aug 16, 2022. It is now read-only.

Issue with using k-NN’s Painless Scripting functions for AWS Elasticsearch (7.10) #476

Open
Incrementing-coder opened this issue Apr 25, 2021 · 0 comments

Comments

@Incrementing-coder
Copy link

"script": {
                "lang": "painless",
                "source": "1.0 + cosineSimilarity(params.query_value, params._source.use)",
                "params": {
                    "query_value": [...]
                }
            }
        }

Here is the script which I am using to do a cosine similarity between two vector fields having dimension of 512. The setting index.knn is set to false. I am getting this error which is basically not being able to cast the array list to KNN vector.

"root_cause": [ { "type": "class_cast_exception", "reason": "class_cast_exception: Cannot cast java.util.ArrayList to com.amazon.opendistroforelasticsearch.knn.index.KNNVectorScriptDocValues" } ]

Can someone help with this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant