The upgrade made it so that RestClient
isn't automatically on the classpath. However ElasticsearchClientAutoConfiguration
is guarded by the fact that such a bean has been configured. We'd need to see if there is an alternative option that doesn't need the extra library.
Removing org.elasticsearch.client:elasticsearch-rest-client
from spring-boot-testcontainers
can reproduce that issue.
We also moved our test altogether to ES9 server. Perhaps we still want to test against ES8, although it needs additional settings to work, see https://github.com/elastic/elasticsearch-ruby/issues/2665
Comment From: wilkinsona
Rest5Client
appears to be the replacement. It's part of elasticsearch-java
so we already have it on the classpath. We should remove org.elasticsearch.client:elasticsearch-rest-client
from spring-boot-starter-data-elasticsearch
as part of switching to the new client.
Comment From: wilkinsona
We also moved our test altogether to ES9 server
Tests that use TestImage.container(ElasticsearchContainer.class)
are still using Elasticsearch 7.
Comment From: wilkinsona
I have something for this, but I'd like to wait and see if there are any improvements to the configurability of the new client before proceeding.
Comment From: wilkinsona
Thanks to @l-trotta, the client is now more configurable and it should be easier for us to preserve its defaults while also offering the customisation that we had before.
Comment From: wilkinsona
I've updated my branch to use the new callbacks and it's significantly simpler. We now need to wait for Spring Data Elasticsearch to upgrade to the latest patch release of the client where the new callbacks have been added.