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

How can I pass request_cache while making a call with searchTemplate? #920

Open
rakesh-nayak opened this issue Dec 16, 2024 · 1 comment
Labels
Area: Specification Related to the API spec used to generate client code Category: Bug Something isn't working

Comments

@rakesh-nayak
Copy link

rakesh-nayak commented Dec 16, 2024

Description

How can I pass request_cache=true while making a call with searchTemplate?

version: elasticsearch-java:8.13.4

Sample code below

private final ElasticsearchAsyncClient elasticsearchAsyncClient;

 public SearchTemplateResponse<Object> getResponse(TemplateQuery templateQuery) {
       var results = elasticsearchAsyncClient.searchTemplate(templateQuery.getRequest(), Object.class)
                .exceptionally(e -> {
                    return null;
                });
        final var res = results.join();
        return res;
    }

Here templateQuery.getRequest() is typeof SearchTemplateRequest

@l-trotta
Copy link
Contributor

Hello, thanks for reporting this! It looks like SearchTemplateRequest is missing the request_cache parameter. This is an API specification issue, we'll update the request there and then we'll regenerate the client code to fix this issue.

@l-trotta l-trotta added Area: Specification Related to the API spec used to generate client code Category: Bug Something isn't working labels Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Specification Related to the API spec used to generate client code Category: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants