I am trying to execute a KnnQuery (https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-knn-query.html) in my java application
(So not the knn search: https://www.elastic.co/guide/en/elasticsearch/reference/current/knn-search.html#knn-similarity-search).
When you use knn in a query, you can't set parameter k
since the size
parameter is used
But, the Java client with version 8.13 requires the k
parameter:
(co.elastic.clients.util.MissingRequiredPropertyException: Missing required property 'KnnQuery.k'
):
So my problem is kind of a deadlock. ElasticSearch doesn't support the k
parameter when knn is used in a query, but the java client requires the k
parameter.
So anyone else having this issue?
I've posted the same question on the elastic forum and I was told that it is a bug. Created an issue on Github.