Skip to content

Align indices options of auto-configured ReactiveElasticsearchTemplate with Spring Data Elasticsearch's default #30378

Closed
@wilkinsona

Description

@wilkinsona

See #30096 for background.

Our auto-configured ReactiveElasticsearchTemplate configures indices options to strictExpandOpenAndForbidClosed but Spring Data Elasticsearch uses strictExpandOpenAndForbidClosedIgnoreThrottled by default. We should remove our configuration of the indices options so that we align with Spring Data Elasticsearch. As this is potentially a breaking change, we'll do it in 2.7.x and mention it in the release notes.

Until we tackle #30379, users that want to keep the current behaviour can define their own bean:

@Bean
ReactiveElasticsearchTemplate reactiveElasticsearchTemplate(ReactiveElasticsearchClient client, ElasticsearchConverter converter) {
    ReactiveElasticsearchTemplate template = new ReactiveElasticsearchTemplate(client, converter);
    template.setIndicesOptions(IndicesOptions.strictExpandOpenAndForbidClosed());
    return template;
}

Metadata

Metadata

Assignees

Labels

status: noteworthyA noteworthy issue to call out in the release notestype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions