Skip to content

Commit 1dc113d

Browse files
mp911dechristophstrobl
authored andcommitted
DATAES-537 - Upgrade to Elasticsearch 6.6.1.
Adapt tests to use new IndicesOptions defaults. Original Pull Request: spring-projects#243
1 parent e81e38d commit 1dc113d

23 files changed

+22
-19
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
<properties>
2121
<commonslang>2.6</commonslang>
22-
<elasticsearch>6.5.0</elasticsearch>
22+
<elasticsearch>6.6.1</elasticsearch>
2323
<log4j>2.9.1</log4j>
2424
<springdata.commons>2.2.0.BUILD-SNAPSHOT</springdata.commons>
2525
<java-module-name>spring.data.elasticsearch</java-module-name>

src/main/java/org/springframework/data/elasticsearch/client/reactive/DefaultReactiveElasticsearchClient.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
import org.elasticsearch.search.SearchHit;
8181
import org.elasticsearch.search.SearchHits;
8282
import org.reactivestreams.Publisher;
83+
8384
import org.springframework.data.elasticsearch.ElasticsearchException;
8485
import org.springframework.data.elasticsearch.client.ClientConfiguration;
8586
import org.springframework.data.elasticsearch.client.ClientLogger;
@@ -434,8 +435,9 @@ public Mono<Status> status() {
434435

435436
private static GetResult getResponseToGetResult(GetResponse response) {
436437

437-
return new GetResult(response.getIndex(), response.getType(), response.getId(), response.getVersion(),
438-
response.isExists(), response.getSourceAsBytesRef(), response.getFields());
438+
return new GetResult(response.getIndex(), response.getType(), response.getId(), response.getSeqNo(),
439+
response.getPrimaryTerm(), response.getVersion(), response.isExists(), response.getSourceAsBytesRef(),
440+
response.getFields());
439441
}
440442

441443
// -->

src/main/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchTemplate.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
import org.reactivestreams.Publisher;
5151
import org.slf4j.Logger;
5252
import org.slf4j.LoggerFactory;
53+
5354
import org.springframework.data.domain.Pageable;
5455
import org.springframework.data.domain.Sort;
5556
import org.springframework.data.elasticsearch.NoSuchIndexException;
@@ -90,7 +91,7 @@ public class ReactiveElasticsearchTemplate implements ReactiveElasticsearchOpera
9091
private final EntityOperations operations;
9192

9293
private @Nullable RefreshPolicy refreshPolicy = RefreshPolicy.IMMEDIATE;
93-
private @Nullable IndicesOptions indicesOptions = IndicesOptions.strictExpandOpenAndForbidClosed();
94+
private @Nullable IndicesOptions indicesOptions = IndicesOptions.strictExpandOpenAndForbidClosedIgnoreThrottled();
9495

9596
public ReactiveElasticsearchTemplate(ReactiveElasticsearchClient client) {
9697
this(client, new MappingElasticsearchConverter(new SimpleElasticsearchMappingContext()));

src/test/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepositoryTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ public void shouldReturnTrueGivenDocumentWithIdExists() {
277277

278278
@Test // DATAES-363
279279
public void shouldReturnFalseGivenDocumentWithIdDoesNotExist() {
280-
280+
281281
// given
282282
String documentId = randomNumeric(5);
283283

src/test/resources/test-home-dir/modules/analysis-common/plugin-descriptor.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
description=Adds "built in" analyzers to Elasticsearch.
2121
#
2222
# 'version': plugin's version
23-
version=6.5.0
23+
version=6.6.1
2424
#
2525
# 'name': the plugin name
2626
name=analysis-common
@@ -35,7 +35,7 @@ classname=org.elasticsearch.analysis.common.CommonAnalysisPlugin
3535
java.version=1.8
3636
#
3737
# 'elasticsearch.version': version of elasticsearch compiled against
38-
elasticsearch.version=6.5.0
38+
elasticsearch.version=6.6.1
3939
### optional elements for plugins:
4040
#
4141
# 'extended.plugins': other plugins this plugin extends through SPI

src/test/resources/test-home-dir/modules/ingest-common/plugin-descriptor.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
description=Module for ingest processors that do not require additional security permissions or have large dependencies and resources
2121
#
2222
# 'version': plugin's version
23-
version=6.5.0
23+
version=6.6.1
2424
#
2525
# 'name': the plugin name
2626
name=ingest-common
@@ -35,7 +35,7 @@ classname=org.elasticsearch.ingest.common.IngestCommonPlugin
3535
java.version=1.8
3636
#
3737
# 'elasticsearch.version': version of elasticsearch compiled against
38-
elasticsearch.version=6.5.0
38+
elasticsearch.version=6.6.1
3939
### optional elements for plugins:
4040
#
4141
# 'extended.plugins': other plugins this plugin extends through SPI

src/test/resources/test-home-dir/modules/lang-expression/plugin-descriptor.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
description=Lucene expressions integration for Elasticsearch
2121
#
2222
# 'version': plugin's version
23-
version=6.5.0
23+
version=6.6.1
2424
#
2525
# 'name': the plugin name
2626
name=lang-expression
@@ -35,7 +35,7 @@ classname=org.elasticsearch.script.expression.ExpressionPlugin
3535
java.version=1.8
3636
#
3737
# 'elasticsearch.version': version of elasticsearch compiled against
38-
elasticsearch.version=6.5.0
38+
elasticsearch.version=6.6.1
3939
### optional elements for plugins:
4040
#
4141
# 'extended.plugins': other plugins this plugin extends through SPI

src/test/resources/test-home-dir/modules/lang-painless/plugin-descriptor.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
description=An easy, safe and fast scripting language for Elasticsearch
2121
#
2222
# 'version': plugin's version
23-
version=6.5.0
23+
version=6.6.1
2424
#
2525
# 'name': the plugin name
2626
name=lang-painless
@@ -35,7 +35,7 @@ classname=org.elasticsearch.painless.PainlessPlugin
3535
java.version=1.8
3636
#
3737
# 'elasticsearch.version': version of elasticsearch compiled against
38-
elasticsearch.version=6.5.0
38+
elasticsearch.version=6.6.1
3939
### optional elements for plugins:
4040
#
4141
# 'extended.plugins': other plugins this plugin extends through SPI

src/test/resources/test-home-dir/modules/mapper-extras/plugin-descriptor.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
description=Adds advanced field mappers
2121
#
2222
# 'version': plugin's version
23-
version=6.5.0
23+
version=6.6.1
2424
#
2525
# 'name': the plugin name
2626
name=mapper-extras
@@ -35,7 +35,7 @@ classname=org.elasticsearch.index.mapper.MapperExtrasPlugin
3535
java.version=1.8
3636
#
3737
# 'elasticsearch.version': version of elasticsearch compiled against
38-
elasticsearch.version=6.5.0
38+
elasticsearch.version=6.6.1
3939
### optional elements for plugins:
4040
#
4141
# 'extended.plugins': other plugins this plugin extends through SPI

src/test/resources/test-home-dir/modules/reindex/plugin-descriptor.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
description=The Reindex module adds APIs to reindex from one index to another or update documents in place.
2121
#
2222
# 'version': plugin's version
23-
version=6.5.0
23+
version=6.6.1
2424
#
2525
# 'name': the plugin name
2626
name=reindex
@@ -35,7 +35,7 @@ classname=org.elasticsearch.index.reindex.ReindexPlugin
3535
java.version=1.8
3636
#
3737
# 'elasticsearch.version': version of elasticsearch compiled against
38-
elasticsearch.version=6.5.0
38+
elasticsearch.version=6.6.1
3939
### optional elements for plugins:
4040
#
4141
# 'extended.plugins': other plugins this plugin extends through SPI

src/test/resources/test-home-dir/modules/repository-url/plugin-descriptor.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
description=Module for URL repository
2121
#
2222
# 'version': plugin's version
23-
version=6.5.0
23+
version=6.6.1
2424
#
2525
# 'name': the plugin name
2626
name=repository-url
@@ -35,7 +35,7 @@ classname=org.elasticsearch.plugin.repository.url.URLRepositoryPlugin
3535
java.version=1.8
3636
#
3737
# 'elasticsearch.version': version of elasticsearch compiled against
38-
elasticsearch.version=6.5.0
38+
elasticsearch.version=6.6.1
3939
### optional elements for plugins:
4040
#
4141
# 'extended.plugins': other plugins this plugin extends through SPI
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)