I am trying to execute KNN approximate search using the OpenSearch Java client. I cant find any example nor documentation about it (both high-level and low-level clients).
I am able to execute the command from the OpenSearch dashboard. For example:
GET contentml-images-clip-batch1/_search
{
"size": 2,
"query": {
"knn": {
"embedding": {
"vector": [1,2,3],
"k": 2
}
}
}
}
Any good reference for how to achieve the sam call using one of the Java clients?