Skip to content

revert breaking changes #2052

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
Jan 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/asciidoc/preface.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ The following table shows the Elasticsearch versions that are used by Spring Dat
[cols="^,^,^,^,^",options="header"]
|===
| Spring Data Release Train | Spring Data Elasticsearch | Elasticsearch | Spring Framework | Spring Boot
| 2022.0 (Raj) | 4.4.x | 7.16.2 | 5.3.x |
| 2022.0 (Raj) | 4.4.x | 7.16.2 | 5.3.x | 2.7.x
| 2021.1 (Q) | 4.3.x | 7.15.2 | 5.3.x | 2.6.x
| 2021.0 (Pascal) | 4.2.x | 7.12.0 | 5.3.x | 2.5.x
| 2020.0 (Ockham)footnote:oom[Out of maintenance] | 4.1.xfootnote:oom[] | 7.9.3 | 5.3.2 | 2.4.x
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ This section describes breaking changes from version 4.3.x to 4.4.x and how remo
[[elasticsearch-migration-guide-4.3-4.4.breaking-changes]]
== Breaking Changes

=== Package changes

* The package `org.springframework.data.elasticsearch.core.clients.elasticsearch7` has been renamed to `org.springframework.data.elasticsearch.core.backend.elasticsearch7`.

=== Removal of deprecated classes

==== `ElasticsearchTemplate` has been removed
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import javax.net.ssl.SSLContext;

import org.elasticsearch.client.RestClientBuilder.HttpClientConfigCallback;
import org.springframework.data.elasticsearch.backend.elasticsearch7.client.RestClients;
import org.springframework.data.elasticsearch.client.reactive.ReactiveRestClients;
import org.springframework.http.HttpHeaders;
import org.springframework.lang.Nullable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import javax.net.ssl.SSLContext;

import org.elasticsearch.client.RestClientBuilder.HttpClientConfigCallback;
import org.springframework.data.elasticsearch.backend.elasticsearch7.client.RestClients;
import org.springframework.data.elasticsearch.client.ClientConfiguration.ClientConfigurationBuilderWithRequiredEndpoint;
import org.springframework.data.elasticsearch.client.ClientConfiguration.MaybeSecureClientConfigurationBuilder;
import org.springframework.data.elasticsearch.client.ClientConfiguration.TerminalClientConfigurationBuilder;
Expand All @@ -48,7 +47,7 @@
* @author Henrique Amaral
* @since 3.2
*/
public class ClientConfigurationBuilder
class ClientConfigurationBuilder
implements ClientConfigurationBuilderWithRequiredEndpoint, MaybeSecureClientConfigurationBuilder {

private final List<InetSocketAddress> hosts = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.data.elasticsearch.backend.elasticsearch7.client;
package org.springframework.data.elasticsearch.client;

import java.net.URL;
import java.util.ArrayList;
Expand All @@ -35,7 +35,6 @@
*
* @author Don Wellington
* @author Peter-Josef Meisch
* @since 4.4
*/
public class RestClientFactoryBean implements FactoryBean<RestHighLevelClient>, InitializingBean, DisposableBean {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.data.elasticsearch.backend.elasticsearch7.client;
package org.springframework.data.elasticsearch.client;

import java.io.ByteArrayOutputStream;
import java.io.Closeable;
Expand Down Expand Up @@ -43,8 +43,6 @@
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestClientBuilder;
import org.elasticsearch.client.RestHighLevelClient;
import org.springframework.data.elasticsearch.client.ClientConfiguration;
import org.springframework.data.elasticsearch.client.ClientLogger;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.util.Assert;
Expand All @@ -59,7 +57,7 @@
* @author Henrique Amaral
* @author Peter-Josef Meisch
* @author Nic Hines
* @since 4.4
* @since 3.2
*/
public final class RestClients {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.data.elasticsearch.backend.elasticsearch7.client.reactive;
package org.springframework.data.elasticsearch.client.reactive;

import io.netty.channel.ChannelOption;
import io.netty.handler.ssl.ApplicationProtocolConfig;
Expand Down Expand Up @@ -103,19 +103,15 @@
import org.reactivestreams.Publisher;
import org.springframework.data.elasticsearch.RestStatusException;
import org.springframework.data.elasticsearch.UncategorizedElasticsearchException;
import org.springframework.data.elasticsearch.backend.elasticsearch7.ResponseConverter;
import org.springframework.data.elasticsearch.backend.elasticsearch7.client.reactive.ReactiveElasticsearchClient.Cluster;
import org.springframework.data.elasticsearch.backend.elasticsearch7.client.reactive.ReactiveElasticsearchClient.Indices;
import org.springframework.data.elasticsearch.backend.elasticsearch7.client.util.NamedXContents;
import org.springframework.data.elasticsearch.core.ResponseConverter;
import org.springframework.data.elasticsearch.client.ClientConfiguration;
import org.springframework.data.elasticsearch.client.ClientLogger;
import org.springframework.data.elasticsearch.client.ElasticsearchHost;
import org.springframework.data.elasticsearch.client.NoReachableHostException;
import org.springframework.data.elasticsearch.client.reactive.HostProvider;
import org.springframework.data.elasticsearch.client.reactive.HostProvider.Verification;
import org.springframework.data.elasticsearch.client.reactive.ReactiveRestClients;
import org.springframework.data.elasticsearch.client.reactive.RequestBodyEncodingException;
import org.springframework.data.elasticsearch.client.reactive.WebClientProvider;
import org.springframework.data.elasticsearch.client.reactive.ReactiveElasticsearchClient.Cluster;
import org.springframework.data.elasticsearch.client.reactive.ReactiveElasticsearchClient.Indices;
import org.springframework.data.elasticsearch.client.util.NamedXContents;
import org.springframework.data.elasticsearch.client.util.ScrollState;
import org.springframework.data.elasticsearch.core.query.ByQueryResponse;
import org.springframework.data.util.Lazy;
Expand Down Expand Up @@ -147,7 +143,7 @@
* @author Brian Clozel
* @author Farid Faoudi
* @author George Popides
* @since 4.4
* @since 3.2
* @see ClientConfiguration
* @see ReactiveRestClients
*/
Expand Down Expand Up @@ -976,7 +972,7 @@ static class ClientStatus implements Status {

/*
* (non-Javadoc)
* @see org.springframework.data.elasticsearch.backend.elasticsearch7.client.reactive.ReactiveElasticsearchClient.Status#hosts()
* @see org.springframework.data.elasticsearch.client.reactive.ReactiveElasticsearchClient.Status#hosts()
*/
@Override
public Collection<ElasticsearchHost> hosts() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.data.elasticsearch.backend.elasticsearch7.client.reactive;
package org.springframework.data.elasticsearch.client.reactive;

/**
* @author Roman Puchkovskiy
* @since 4.4
* @since 4.0
*/
class DefaultRequestCreator implements RequestCreator {}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.data.elasticsearch.backend.elasticsearch7.client.reactive;
package org.springframework.data.elasticsearch.client.reactive;

import reactor.core.publisher.Mono;

Expand All @@ -32,18 +32,17 @@
* @author Christoph Strobl
* @author Peter-Josef Meisch
* @author Mark Paluch
* @since 4.4
* @since 3.2
*/
// todo make package private again after refactoring?
public class RawActionResponse extends ActionResponse {
class RawActionResponse extends ActionResponse {

private final ClientResponse delegate;

private RawActionResponse(ClientResponse delegate) {
this.delegate = delegate;
}

public static RawActionResponse create(ClientResponse response) {
static RawActionResponse create(ClientResponse response) {
return new RawActionResponse(response);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.data.elasticsearch.backend.elasticsearch7.client.reactive;
package org.springframework.data.elasticsearch.client.reactive;

import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
Expand Down Expand Up @@ -60,7 +60,6 @@
import org.elasticsearch.search.suggest.Suggest;
import org.springframework.data.elasticsearch.client.ClientConfiguration;
import org.springframework.data.elasticsearch.client.ElasticsearchHost;
import org.springframework.data.elasticsearch.client.reactive.ReactiveRestClients;
import org.springframework.data.elasticsearch.core.query.ByQueryResponse;
import org.springframework.http.HttpHeaders;
import org.springframework.util.Assert;
Expand All @@ -77,7 +76,7 @@
* @author Henrique Amaral
* @author Thomas Geese
* @author Farid Faoudi
* @since 4.4
* @since 3.2
* @see ClientConfiguration
* @see ReactiveRestClients
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@

import java.util.function.Function;

import org.springframework.data.elasticsearch.backend.elasticsearch7.client.reactive.DefaultReactiveElasticsearchClient;
import org.springframework.data.elasticsearch.backend.elasticsearch7.client.reactive.ReactiveElasticsearchClient;
import org.springframework.data.elasticsearch.backend.elasticsearch7.client.reactive.RequestCreator;
import org.springframework.data.elasticsearch.client.ClientConfiguration;
import org.springframework.util.Assert;
import org.springframework.web.reactive.function.client.WebClient;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.data.elasticsearch.backend.elasticsearch7.client.reactive;
package org.springframework.data.elasticsearch.client.reactive;

import java.io.IOException;
import java.util.function.Function;
Expand Down Expand Up @@ -52,13 +52,13 @@
import org.elasticsearch.index.reindex.UpdateByQueryRequest;
import org.elasticsearch.script.mustache.SearchTemplateRequest;
import org.springframework.data.elasticsearch.UncategorizedElasticsearchException;
import org.springframework.data.elasticsearch.backend.elasticsearch7.client.util.RequestConverters;
import org.springframework.data.elasticsearch.client.util.RequestConverters;

/**
* @author Roman Puchkovskiy
* @author Farid Faoudi
* @author George Popides
* @since 4.4
* @since 4.0
*/
public interface RequestCreator {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.data.elasticsearch.backend.elasticsearch7.client.util;
package org.springframework.data.elasticsearch.client.util;

import java.util.HashMap;
import java.util.List;
Expand Down Expand Up @@ -78,7 +78,7 @@
import org.elasticsearch.xcontent.ContextParser;
import org.elasticsearch.xcontent.NamedXContentRegistry;
import org.elasticsearch.xcontent.ParseField;
import org.springframework.data.elasticsearch.backend.elasticsearch7.client.reactive.ReactiveElasticsearchClient;
import org.springframework.data.elasticsearch.client.reactive.ReactiveElasticsearchClient;

/**
* <p>
Expand All @@ -91,7 +91,7 @@
* Only intended for internal use.
*
* @author Russell Parry
* @since 4.4
* @since 4.0
*/
public class NamedXContents {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.data.elasticsearch.backend.elasticsearch7.client.util;
package org.springframework.data.elasticsearch.client.util;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
Expand Down Expand Up @@ -101,7 +101,7 @@
import org.elasticsearch.xcontent.XContentBuilder;
import org.elasticsearch.xcontent.XContentParser;
import org.elasticsearch.xcontent.XContentType;
import org.springframework.data.elasticsearch.backend.elasticsearch7.client.reactive.ReactiveElasticsearchClient;
import org.springframework.data.elasticsearch.client.reactive.ReactiveElasticsearchClient;
import org.springframework.http.HttpMethod;
import org.springframework.lang.Nullable;

Expand All @@ -119,7 +119,7 @@
* @author Christoph Strobl
* @author Peter-Josef Meisch
* @author Farid Faoudi
* @since 4.4
* @since 3.2
*/
@SuppressWarnings("JavadocReference")
public class RequestConverters {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,18 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.data.elasticsearch.backend.elasticsearch7.config;
package org.springframework.data.elasticsearch.config;

import org.elasticsearch.client.RestHighLevelClient;
import org.springframework.context.annotation.Bean;
import org.springframework.data.elasticsearch.backend.elasticsearch7.ElasticsearchRestTemplate;
import org.springframework.data.elasticsearch.config.ElasticsearchConfigurationSupport;
import org.springframework.data.elasticsearch.core.ElasticsearchOperations;
import org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate;
import org.springframework.data.elasticsearch.core.convert.ElasticsearchConverter;

/**
* @author Christoph Strobl
* @author Peter-Josef Meisch
* @since 4.4
* @since 3.2
* @see ElasticsearchConfigurationSupport
*/
public abstract class AbstractElasticsearchConfiguration extends ElasticsearchConfigurationSupport {
Expand Down
Loading