- Notifications
You must be signed in to change notification settings - Fork 278
Description
Description
Elasticsearch 8.8.0 added the feature to return scores for named queries.
Earlier versions can have a _name field for queries that will result in a property matched_queries to be added to the JSON response. Setting the new flag include_named_queries_score changes matched_queries from a list List<String> to Map<String, Double>.
The Java Elasticsearch client currently does not support setting this parameter on the request (although it can be made to by using TransportOptions and the response does not support it because it returns List<String> for matchedQueries() on a Hit object.
It would be nice if the Elasticsearch Java client supports it.
References:
elastic/elasticsearch#94564
https://www.elastic.co/guide/en/elasticsearch/reference/8.8/query-dsl-bool-query.html#named-queries