Open wilkinsona opened 2 years ago
The new ReativeElasticsearchTemplate
does not have configurable indices options so this issue's now scoped to only the refresh policy.
Hi, Is there any news regarding this? We recently migrated to Spring Boot 3 & Elastic 8 and so far have been unable to find a way to set the index options to "Lenient Expand Open" like we used to do with the old Template.
@maroov Any news would be reflected in comments on this issue or changes in tags applied to it. Unfortunately this issue just hasn't risen to the top of our priority list.
When the refresh policy is changed to null, it failed my tests in Data Elasticsearch example projects, the data saved in the before setup method is not found in the tests at all.
When the refresh policy is changed to null
What is changing it to null
? AFAIK, Spring Boot does not do that.
@maroov I don't think this issue is going to provide what you want. There's no setter for the index options on org.springframework.data.elasticsearch.client.elc.ReactiveElasticsearchTemplate
so, as far as we know, Spring Boot will not be able to configure it. Looking at https://github.com/spring-projects/spring-data-elasticsearch/issues/2639, I think the intention is that the options are configured when your application creates its queries. You may want to follow up with the Spring Data Elasticsearch team. This is out of Spring Boot's control.
+1, for this issue
See #30096 and #30378 for background. To make it easier for users to configure the refresh policy and indices options of the auto-configured
ReactiveElasticsearchTemplate
, it would be good to provide configuration properties for those two settings.There's no existing
@ConfigurationProperties
class to which these new properties could be added so we'll need to consider where we want the properties to go. The only Data Elasticsearch property that we have at the moment isspring.data.elasticsearch.repositories.enabled
. The new properties should probably go beneathspring.data.elasticsearch.template.reactive
orspring.data.elasticsearch.reactive.template
.