Skip to content

Support include_named_queries_score in search requests #634

Closed
@EgbertW

Description

@EgbertW

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: SpecificationRelated to the API spec used to generate client code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions