Skip to content

Enhance refresh policy handling #2725

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

Merged
merged 1 commit into from
Oct 11, 2023

Conversation

sothawo
Copy link
Collaborator

@sothawo sothawo commented Oct 11, 2023

Besides defining the global value for the refresh policy in the client configuration it was already possible to change the refresh policy by calling setRefreshPolicy(RefreshPolicy) on the provided implementations of the ElasticsearchOperations and ReactiveElasticsearchOperations interfaces.

For easier handling when using these interfaces they both now offer a withRefreshPolicy(RefreshPolicy) method which will return a copy of the operations instance that uses the same client, converter, mapper etc, but has a different refresh policy set.

For users of the repository interfaces ElasticsearchRepository and ReactiveElasticsearchRepository there are new overloads of the methods that might need a refresh policy (save and delete) having an additional parameter of the RefreshPolicy type.

Closes #2722

@sothawo sothawo merged commit 9f42ec9 into spring-projects:main Oct 11, 2023
@sothawo sothawo deleted the enhance-refresh-policy branch October 13, 2023 10:55
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

Successfully merging this pull request may close these issues.

Add a hard way to refresh data
1 participant