Skip to content

(Reactive)ElasticsearchOperations does not have option to include request_cache path param in search request [DATAES-992] #1564

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

Closed
spring-projects-issues opened this issue Dec 4, 2020 · 2 comments · Fixed by #1799
Assignees
Labels
in: core Issues in core support type: enhancement A general enhancement

Comments

@spring-projects-issues
Copy link

Oindrila Barik opened DATAES-992 and commented

Elastic search provides an option to add a path param to any search queries  called _request_cache=true which enables it to cache any incoming queries and its results.

The SearchRequest class provides a way to add this param using the .requestCache(Boolean.TRUE) method. But the RequestFactory.java present in Spring DATA that converts a NativeSearchQuery into SearchRequest doesn't support this argument.

 

Thus this parameter cannot be added to any request for search using ReactiveElasticSearchOperations


No further details from DATAES-992

@spring-projects-issues spring-projects-issues added type: enhancement A general enhancement in: core Issues in core support labels Dec 31, 2020
@sothawo sothawo self-assigned this May 1, 2021
@sothawo
Copy link
Collaborator

sothawo commented May 1, 2021

The reactive implementation of search request under the hood uses Elasticsearch's scroll API to retrieve the documents. request_cachecannot be used in a scroll context.

For the imperative, non-reactive code this is done in #1797

@sothawo sothawo closed this as completed May 1, 2021
@sothawo
Copy link
Collaborator

sothawo commented May 1, 2021

not all reactive calls use the scroll interface, paged queries and count do not. So this needs to be added to these calls. Doing imperative with this ticket as well.

@sothawo sothawo reopened this May 1, 2021
@sothawo sothawo changed the title ReactiveElasticsearchOperations does not have option to include request_cache path param in search request [DATAES-992] (Reactive)ElasticsearchOperations does not have option to include request_cache path param in search request [DATAES-992] May 1, 2021
sothawo added a commit that referenced this issue May 1, 2021
@sothawo sothawo added this to the 4.3 M1 (2021.1.0) milestone May 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core support type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants