Skip to content

Commit 94c95ee

Browse files
authored
Move classes using Elasticsearch code to separate package.
Original Pull Request #1991 Closes #1947
1 parent 3eff80e commit 94c95ee

File tree

121 files changed

+1034
-804
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+1034
-804
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[[elasticsearch-migration-guide-4.3-4.4]]
2+
= Upgrading from 4.3.x to 4.4.x
3+
4+
This section describes breaking changes from version 4.3.x to 4.4.x and how removed features can be replaced by new introduced features.
5+
6+
[[elasticsearch-migration-guide-4.3-4.4.deprecations]]
7+
== Deprecations
8+
9+
[[elasticsearch-migration-guide-4.3-4.4.breaking-changes]]
10+
== Breaking Changes
11+
12+
=== Package changes
13+
14+
* The package `org.springframework.data.elasticsearch.core.clients.elasticsearch7` has been renamed to `org.springframework.data.elasticsearch.core.backend.elasticsearch7`.

src/main/java/org/springframework/data/elasticsearch/core/AbstractElasticsearchRestTransportTemplate.java renamed to src/main/java/org/springframework/data/elasticsearch/backend/elasticsearch7/AbstractElasticsearchRestTransportTemplate.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package org.springframework.data.elasticsearch.core;
16+
package org.springframework.data.elasticsearch.backend.elasticsearch7;
1717

1818
import java.util.ArrayList;
1919
import java.util.HashMap;
@@ -34,10 +34,13 @@
3434
import org.elasticsearch.index.query.QueryBuilders;
3535
import org.elasticsearch.search.suggest.SuggestBuilder;
3636
import org.springframework.data.elasticsearch.BulkFailureException;
37-
import org.springframework.data.elasticsearch.core.document.SearchDocumentResponse;
37+
import org.springframework.data.elasticsearch.backend.elasticsearch7.document.SearchDocumentResponse;
38+
import org.springframework.data.elasticsearch.backend.elasticsearch7.query.NativeSearchQueryBuilder;
39+
import org.springframework.data.elasticsearch.core.AbstractElasticsearchTemplate;
40+
import org.springframework.data.elasticsearch.core.IndexedObjectInformation;
41+
import org.springframework.data.elasticsearch.core.SearchHits;
3842
import org.springframework.data.elasticsearch.core.mapping.IndexCoordinates;
3943
import org.springframework.data.elasticsearch.core.query.MoreLikeThisQuery;
40-
import org.springframework.data.elasticsearch.core.query.NativeSearchQueryBuilder;
4144
import org.springframework.data.elasticsearch.core.query.Query;
4245
import org.springframework.util.Assert;
4346

src/main/java/org/springframework/data/elasticsearch/core/CriteriaFilterProcessor.java renamed to src/main/java/org/springframework/data/elasticsearch/backend/elasticsearch7/CriteriaFilterProcessor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
* you may not use this file except in compliance with the License.
66
* You may obtain a copy of the License at
77
*
8-
* https://www.apache.org/licenses/LICENSE-2.0
8+
* https://www.apache.org/licenses/LICENSE-2.0
99
*
1010
* Unless required by applicable law or agreed to in writing, software
1111
* distributed under the License is distributed on an "AS IS" BASIS,
1212
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package org.springframework.data.elasticsearch.core;
16+
package org.springframework.data.elasticsearch.clients.elasticsearch7;
1717

1818
import static org.springframework.data.elasticsearch.core.query.Criteria.*;
1919

src/main/java/org/springframework/data/elasticsearch/core/CriteriaQueryProcessor.java renamed to src/main/java/org/springframework/data/elasticsearch/backend/elasticsearch7/CriteriaQueryProcessor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package org.springframework.data.elasticsearch.core;
16+
package org.springframework.data.elasticsearch.clients.elasticsearch7;
1717

1818
import static org.elasticsearch.index.query.Operator.*;
1919
import static org.elasticsearch.index.query.QueryBuilders.*;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package org.springframework.data.elasticsearch.core.clients.elasticsearch7;
16+
package org.springframework.data.elasticsearch.clients.elasticsearch7;
1717

1818
import org.elasticsearch.search.aggregations.Aggregation;
1919
import org.springframework.data.elasticsearch.core.AggregationContainer;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package org.springframework.data.elasticsearch.core.clients.elasticsearch7;
16+
package org.springframework.data.elasticsearch.clients.elasticsearch7;
1717

1818
import org.elasticsearch.search.aggregations.Aggregations;
1919
import org.springframework.data.elasticsearch.core.AggregationsContainer;

src/main/java/org/springframework/data/elasticsearch/core/ElasticsearchExceptionTranslator.java renamed to src/main/java/org/springframework/data/elasticsearch/backend/elasticsearch7/ElasticsearchExceptionTranslator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package org.springframework.data.elasticsearch.core;
16+
package org.springframework.data.elasticsearch.backend.elasticsearch7;
1717

1818
import java.io.IOException;
1919
import java.util.List;

src/main/java/org/springframework/data/elasticsearch/core/ElasticsearchRestTemplate.java renamed to src/main/java/org/springframework/data/elasticsearch/backend/elasticsearch7/ElasticsearchRestTemplate.java

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package org.springframework.data.elasticsearch.core;
16+
package org.springframework.data.elasticsearch.backend.elasticsearch7;
1717

1818
import java.io.IOException;
1919
import java.util.List;
@@ -45,18 +45,27 @@
4545
import org.elasticsearch.search.suggest.SuggestBuilder;
4646
import org.slf4j.Logger;
4747
import org.slf4j.LoggerFactory;
48+
import org.springframework.data.elasticsearch.backend.elasticsearch7.cluster.ElasticsearchClusterOperations;
49+
import org.springframework.data.elasticsearch.backend.elasticsearch7.document.DocumentAdapters;
50+
import org.springframework.data.elasticsearch.backend.elasticsearch7.document.SearchDocumentResponse;
51+
import org.springframework.data.elasticsearch.clients.elasticsearch7.RequestFactory;
52+
import org.springframework.data.elasticsearch.clients.elasticsearch7.ResponseConverter;
53+
import org.springframework.data.elasticsearch.core.AbstractElasticsearchTemplate;
54+
import org.springframework.data.elasticsearch.core.IndexOperations;
55+
import org.springframework.data.elasticsearch.core.IndexedObjectInformation;
56+
import org.springframework.data.elasticsearch.core.MultiGetItem;
57+
import org.springframework.data.elasticsearch.core.RefreshPolicy;
58+
import org.springframework.data.elasticsearch.core.SearchHits;
59+
import org.springframework.data.elasticsearch.core.SearchScrollHits;
4860
import org.springframework.data.elasticsearch.core.cluster.ClusterOperations;
4961
import org.springframework.data.elasticsearch.core.convert.ElasticsearchConverter;
50-
import org.springframework.data.elasticsearch.core.document.DocumentAdapters;
51-
import org.springframework.data.elasticsearch.core.document.SearchDocumentResponse;
5262
import org.springframework.data.elasticsearch.core.mapping.IndexCoordinates;
5363
import org.springframework.data.elasticsearch.core.query.BulkOptions;
5464
import org.springframework.data.elasticsearch.core.query.ByQueryResponse;
5565
import org.springframework.data.elasticsearch.core.query.IndexQuery;
5666
import org.springframework.data.elasticsearch.core.query.Query;
5767
import org.springframework.data.elasticsearch.core.query.UpdateQuery;
5868
import org.springframework.data.elasticsearch.core.query.UpdateResponse;
59-
import org.springframework.data.elasticsearch.support.SearchHitsUtil;
6069
import org.springframework.lang.Nullable;
6170
import org.springframework.util.Assert;
6271

@@ -147,7 +156,7 @@ public IndexOperations indexOps(IndexCoordinates index) {
147156
// region ClusterOperations
148157
@Override
149158
public ClusterOperations cluster() {
150-
return ClusterOperations.forTemplate(this);
159+
return ElasticsearchClusterOperations.forTemplate(this);
151160
}
152161
// endregion
153162

src/main/java/org/springframework/data/elasticsearch/core/ElasticsearchTemplate.java renamed to src/main/java/org/springframework/data/elasticsearch/backend/elasticsearch7/ElasticsearchTemplate.java

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package org.springframework.data.elasticsearch.core;
16+
package org.springframework.data.elasticsearch.backend.elasticsearch7;
1717

1818
import java.util.ArrayList;
1919
import java.util.Collection;
@@ -46,18 +46,27 @@
4646
import org.elasticsearch.search.suggest.SuggestBuilder;
4747
import org.slf4j.Logger;
4848
import org.slf4j.LoggerFactory;
49+
import org.springframework.data.elasticsearch.backend.elasticsearch7.cluster.ElasticsearchClusterOperations;
50+
import org.springframework.data.elasticsearch.backend.elasticsearch7.document.DocumentAdapters;
51+
import org.springframework.data.elasticsearch.backend.elasticsearch7.document.SearchDocumentResponse;
52+
import org.springframework.data.elasticsearch.clients.elasticsearch7.RequestFactory;
53+
import org.springframework.data.elasticsearch.clients.elasticsearch7.ResponseConverter;
54+
import org.springframework.data.elasticsearch.core.AbstractElasticsearchTemplate;
55+
import org.springframework.data.elasticsearch.core.IndexOperations;
56+
import org.springframework.data.elasticsearch.core.IndexedObjectInformation;
57+
import org.springframework.data.elasticsearch.core.MultiGetItem;
58+
import org.springframework.data.elasticsearch.core.RefreshPolicy;
59+
import org.springframework.data.elasticsearch.core.SearchHits;
60+
import org.springframework.data.elasticsearch.core.SearchScrollHits;
4961
import org.springframework.data.elasticsearch.core.cluster.ClusterOperations;
5062
import org.springframework.data.elasticsearch.core.convert.ElasticsearchConverter;
51-
import org.springframework.data.elasticsearch.core.document.DocumentAdapters;
52-
import org.springframework.data.elasticsearch.core.document.SearchDocumentResponse;
5363
import org.springframework.data.elasticsearch.core.mapping.IndexCoordinates;
5464
import org.springframework.data.elasticsearch.core.query.BulkOptions;
5565
import org.springframework.data.elasticsearch.core.query.ByQueryResponse;
5666
import org.springframework.data.elasticsearch.core.query.IndexQuery;
5767
import org.springframework.data.elasticsearch.core.query.Query;
5868
import org.springframework.data.elasticsearch.core.query.UpdateQuery;
5969
import org.springframework.data.elasticsearch.core.query.UpdateResponse;
60-
import org.springframework.data.elasticsearch.support.SearchHitsUtil;
6170
import org.springframework.lang.Nullable;
6271
import org.springframework.util.Assert;
6372

@@ -151,7 +160,7 @@ public IndexOperations indexOps(IndexCoordinates index) {
151160
// region ClusterOperations
152161
@Override
153162
public ClusterOperations cluster() {
154-
return ClusterOperations.forTemplate(this);
163+
return ElasticsearchClusterOperations.forTemplate(this);
155164
}
156165
// endregion
157166

src/main/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchTemplate.java renamed to src/main/java/org/springframework/data/elasticsearch/backend/elasticsearch7/ReactiveElasticsearchTemplate.java

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package org.springframework.data.elasticsearch.core;
16+
package org.springframework.data.elasticsearch.backend.elasticsearch7;
1717

1818
import reactor.core.publisher.Flux;
1919
import reactor.core.publisher.Mono;
@@ -56,17 +56,21 @@
5656
import org.springframework.data.elasticsearch.BulkFailureException;
5757
import org.springframework.data.elasticsearch.NoSuchIndexException;
5858
import org.springframework.data.elasticsearch.UncategorizedElasticsearchException;
59-
import org.springframework.data.elasticsearch.client.reactive.ReactiveElasticsearchClient;
59+
import org.springframework.data.elasticsearch.backend.elasticsearch7.client.reactive.ReactiveElasticsearchClient;
60+
import org.springframework.data.elasticsearch.backend.elasticsearch7.cluster.DefaultReactiveClusterOperations;
61+
import org.springframework.data.elasticsearch.backend.elasticsearch7.document.DocumentAdapters;
62+
import org.springframework.data.elasticsearch.backend.elasticsearch7.document.SearchDocumentResponse;
63+
import org.springframework.data.elasticsearch.backend.elasticsearch7.query.NativeSearchQueryBuilder;
64+
import org.springframework.data.elasticsearch.clients.elasticsearch7.ElasticsearchAggregation;
65+
import org.springframework.data.elasticsearch.clients.elasticsearch7.RequestFactory;
66+
import org.springframework.data.elasticsearch.clients.elasticsearch7.ResponseConverter;
67+
import org.springframework.data.elasticsearch.core.*;
6068
import org.springframework.data.elasticsearch.core.EntityOperations.AdaptibleEntity;
61-
import org.springframework.data.elasticsearch.core.clients.elasticsearch7.ElasticsearchAggregation;
62-
import org.springframework.data.elasticsearch.core.cluster.DefaultReactiveClusterOperations;
6369
import org.springframework.data.elasticsearch.core.cluster.ReactiveClusterOperations;
6470
import org.springframework.data.elasticsearch.core.convert.ElasticsearchConverter;
6571
import org.springframework.data.elasticsearch.core.convert.MappingElasticsearchConverter;
6672
import org.springframework.data.elasticsearch.core.document.Document;
67-
import org.springframework.data.elasticsearch.core.document.DocumentAdapters;
6873
import org.springframework.data.elasticsearch.core.document.SearchDocument;
69-
import org.springframework.data.elasticsearch.core.document.SearchDocumentResponse;
7074
import org.springframework.data.elasticsearch.core.event.ReactiveAfterConvertCallback;
7175
import org.springframework.data.elasticsearch.core.event.ReactiveAfterSaveCallback;
7276
import org.springframework.data.elasticsearch.core.event.ReactiveBeforeConvertCallback;
@@ -77,7 +81,6 @@
7781
import org.springframework.data.elasticsearch.core.query.BulkOptions;
7882
import org.springframework.data.elasticsearch.core.query.ByQueryResponse;
7983
import org.springframework.data.elasticsearch.core.query.IndexQuery;
80-
import org.springframework.data.elasticsearch.core.query.NativeSearchQueryBuilder;
8184
import org.springframework.data.elasticsearch.core.query.Query;
8285
import org.springframework.data.elasticsearch.core.query.SeqNoPrimaryTerm;
8386
import org.springframework.data.elasticsearch.core.query.UpdateQuery;

0 commit comments

Comments
 (0)