I want to use aggregations over the search result of the knn_search
api in elasticsearch
(because I need facet search on the user interface), but I cannot pass the agg
parameter as in the search
api. Any suggestions?
CodePudding user response:
Tldr;
As per the documentation of this endpoint GET /<index>/_knn_search
.
You just can not give the parameter agg
.
In 8.4
Although in the latest version of elasticsearch, you can use the knn search
in the standard search
queries.