Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for include_named_queries_score param in _search endpoint #2443

Open
styrmis opened this issue Feb 15, 2024 · 0 comments
Open

Add support for include_named_queries_score param in _search endpoint #2443

styrmis opened this issue Feb 15, 2024 · 0 comments

Comments

@styrmis
Copy link

styrmis commented Feb 15, 2024

Elasticsearch version (bin/elasticsearch --version): 8.8.2

elasticsearch-py version (elasticsearch.__versionstr__): 8.12.0

Description of the problem including expected versus actual behavior:

The include_named_queries_score is present in the REST API spec but it does not appear to have been picked up in the generation process for this library.

There is a generated example which uses the param, but this fails for me as the param is not defined, which matches the docs for the search method.

To work around this we are currently experimenting with making a lower-level request, e.g.

resp = es.transport.perform_request(
    'GET',
    f'/{index}/_search?include_named_queries_score=true',
    headers={'Content-type': 'application/json'},
    body=body
)

The expected behaviour is that it be possible to specify the include_named_queries_score parameter (as per the example) and that the response would have the matched_queries key set, with calculated scores, if the submitted query body contains named queries.

Steps to reproduce:

Run the generated example which sets include_named_queries_score.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant