DATAES-537 - Upgrade to Elasticsearch 6.6.1.

Adapt tests to use new IndicesOptions defaults.

Original Pull Request: #243
This commit is contained in:
Mark Paluch 2019-03-05 16:47:02 +01:00 committed by Christoph Strobl
parent e81e38dbb1
commit 1dc113d57b
23 changed files with 22 additions and 19 deletions

View File

@ -19,7 +19,7 @@
<properties> <properties>
<commonslang>2.6</commonslang> <commonslang>2.6</commonslang>
<elasticsearch>6.5.0</elasticsearch> <elasticsearch>6.6.1</elasticsearch>
<log4j>2.9.1</log4j> <log4j>2.9.1</log4j>
<springdata.commons>2.2.0.BUILD-SNAPSHOT</springdata.commons> <springdata.commons>2.2.0.BUILD-SNAPSHOT</springdata.commons>
<java-module-name>spring.data.elasticsearch</java-module-name> <java-module-name>spring.data.elasticsearch</java-module-name>

View File

@ -80,6 +80,7 @@ import org.elasticsearch.search.Scroll;
import org.elasticsearch.search.SearchHit; import org.elasticsearch.search.SearchHit;
import org.elasticsearch.search.SearchHits; import org.elasticsearch.search.SearchHits;
import org.reactivestreams.Publisher; import org.reactivestreams.Publisher;
import org.springframework.data.elasticsearch.ElasticsearchException; import org.springframework.data.elasticsearch.ElasticsearchException;
import org.springframework.data.elasticsearch.client.ClientConfiguration; import org.springframework.data.elasticsearch.client.ClientConfiguration;
import org.springframework.data.elasticsearch.client.ClientLogger; import org.springframework.data.elasticsearch.client.ClientLogger;
@ -434,8 +435,9 @@ public class DefaultReactiveElasticsearchClient implements ReactiveElasticsearch
private static GetResult getResponseToGetResult(GetResponse response) { private static GetResult getResponseToGetResult(GetResponse response) {
return new GetResult(response.getIndex(), response.getType(), response.getId(), response.getVersion(), return new GetResult(response.getIndex(), response.getType(), response.getId(), response.getSeqNo(),
response.isExists(), response.getSourceAsBytesRef(), response.getFields()); response.getPrimaryTerm(), response.getVersion(), response.isExists(), response.getSourceAsBytesRef(),
response.getFields());
} }
// --> // -->

View File

@ -50,6 +50,7 @@ import org.elasticsearch.search.sort.SortOrder;
import org.reactivestreams.Publisher; import org.reactivestreams.Publisher;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort; import org.springframework.data.domain.Sort;
import org.springframework.data.elasticsearch.NoSuchIndexException; import org.springframework.data.elasticsearch.NoSuchIndexException;
@ -90,7 +91,7 @@ public class ReactiveElasticsearchTemplate implements ReactiveElasticsearchOpera
private final EntityOperations operations; private final EntityOperations operations;
private @Nullable RefreshPolicy refreshPolicy = RefreshPolicy.IMMEDIATE; private @Nullable RefreshPolicy refreshPolicy = RefreshPolicy.IMMEDIATE;
private @Nullable IndicesOptions indicesOptions = IndicesOptions.strictExpandOpenAndForbidClosed(); private @Nullable IndicesOptions indicesOptions = IndicesOptions.strictExpandOpenAndForbidClosedIgnoreThrottled();
public ReactiveElasticsearchTemplate(ReactiveElasticsearchClient client) { public ReactiveElasticsearchTemplate(ReactiveElasticsearchClient client) {
this(client, new MappingElasticsearchConverter(new SimpleElasticsearchMappingContext())); this(client, new MappingElasticsearchConverter(new SimpleElasticsearchMappingContext()));

View File

@ -277,7 +277,7 @@ public class SimpleElasticsearchRepositoryTests {
@Test // DATAES-363 @Test // DATAES-363
public void shouldReturnFalseGivenDocumentWithIdDoesNotExist() { public void shouldReturnFalseGivenDocumentWithIdDoesNotExist() {
// given // given
String documentId = randomNumeric(5); String documentId = randomNumeric(5);

View File

@ -20,7 +20,7 @@
description=Adds "built in" analyzers to Elasticsearch. description=Adds "built in" analyzers to Elasticsearch.
# #
# 'version': plugin's version # 'version': plugin's version
version=6.5.0 version=6.6.1
# #
# 'name': the plugin name # 'name': the plugin name
name=analysis-common name=analysis-common
@ -35,7 +35,7 @@ classname=org.elasticsearch.analysis.common.CommonAnalysisPlugin
java.version=1.8 java.version=1.8
# #
# 'elasticsearch.version': version of elasticsearch compiled against # 'elasticsearch.version': version of elasticsearch compiled against
elasticsearch.version=6.5.0 elasticsearch.version=6.6.1
### optional elements for plugins: ### optional elements for plugins:
# #
# 'extended.plugins': other plugins this plugin extends through SPI # 'extended.plugins': other plugins this plugin extends through SPI

View File

@ -20,7 +20,7 @@
description=Module for ingest processors that do not require additional security permissions or have large dependencies and resources description=Module for ingest processors that do not require additional security permissions or have large dependencies and resources
# #
# 'version': plugin's version # 'version': plugin's version
version=6.5.0 version=6.6.1
# #
# 'name': the plugin name # 'name': the plugin name
name=ingest-common name=ingest-common
@ -35,7 +35,7 @@ classname=org.elasticsearch.ingest.common.IngestCommonPlugin
java.version=1.8 java.version=1.8
# #
# 'elasticsearch.version': version of elasticsearch compiled against # 'elasticsearch.version': version of elasticsearch compiled against
elasticsearch.version=6.5.0 elasticsearch.version=6.6.1
### optional elements for plugins: ### optional elements for plugins:
# #
# 'extended.plugins': other plugins this plugin extends through SPI # 'extended.plugins': other plugins this plugin extends through SPI

View File

@ -20,7 +20,7 @@
description=Lucene expressions integration for Elasticsearch description=Lucene expressions integration for Elasticsearch
# #
# 'version': plugin's version # 'version': plugin's version
version=6.5.0 version=6.6.1
# #
# 'name': the plugin name # 'name': the plugin name
name=lang-expression name=lang-expression
@ -35,7 +35,7 @@ classname=org.elasticsearch.script.expression.ExpressionPlugin
java.version=1.8 java.version=1.8
# #
# 'elasticsearch.version': version of elasticsearch compiled against # 'elasticsearch.version': version of elasticsearch compiled against
elasticsearch.version=6.5.0 elasticsearch.version=6.6.1
### optional elements for plugins: ### optional elements for plugins:
# #
# 'extended.plugins': other plugins this plugin extends through SPI # 'extended.plugins': other plugins this plugin extends through SPI

View File

@ -20,7 +20,7 @@
description=An easy, safe and fast scripting language for Elasticsearch description=An easy, safe and fast scripting language for Elasticsearch
# #
# 'version': plugin's version # 'version': plugin's version
version=6.5.0 version=6.6.1
# #
# 'name': the plugin name # 'name': the plugin name
name=lang-painless name=lang-painless
@ -35,7 +35,7 @@ classname=org.elasticsearch.painless.PainlessPlugin
java.version=1.8 java.version=1.8
# #
# 'elasticsearch.version': version of elasticsearch compiled against # 'elasticsearch.version': version of elasticsearch compiled against
elasticsearch.version=6.5.0 elasticsearch.version=6.6.1
### optional elements for plugins: ### optional elements for plugins:
# #
# 'extended.plugins': other plugins this plugin extends through SPI # 'extended.plugins': other plugins this plugin extends through SPI

View File

@ -20,7 +20,7 @@
description=Adds advanced field mappers description=Adds advanced field mappers
# #
# 'version': plugin's version # 'version': plugin's version
version=6.5.0 version=6.6.1
# #
# 'name': the plugin name # 'name': the plugin name
name=mapper-extras name=mapper-extras
@ -35,7 +35,7 @@ classname=org.elasticsearch.index.mapper.MapperExtrasPlugin
java.version=1.8 java.version=1.8
# #
# 'elasticsearch.version': version of elasticsearch compiled against # 'elasticsearch.version': version of elasticsearch compiled against
elasticsearch.version=6.5.0 elasticsearch.version=6.6.1
### optional elements for plugins: ### optional elements for plugins:
# #
# 'extended.plugins': other plugins this plugin extends through SPI # 'extended.plugins': other plugins this plugin extends through SPI

View File

@ -20,7 +20,7 @@
description=The Reindex module adds APIs to reindex from one index to another or update documents in place. description=The Reindex module adds APIs to reindex from one index to another or update documents in place.
# #
# 'version': plugin's version # 'version': plugin's version
version=6.5.0 version=6.6.1
# #
# 'name': the plugin name # 'name': the plugin name
name=reindex name=reindex
@ -35,7 +35,7 @@ classname=org.elasticsearch.index.reindex.ReindexPlugin
java.version=1.8 java.version=1.8
# #
# 'elasticsearch.version': version of elasticsearch compiled against # 'elasticsearch.version': version of elasticsearch compiled against
elasticsearch.version=6.5.0 elasticsearch.version=6.6.1
### optional elements for plugins: ### optional elements for plugins:
# #
# 'extended.plugins': other plugins this plugin extends through SPI # 'extended.plugins': other plugins this plugin extends through SPI

View File

@ -20,7 +20,7 @@
description=Module for URL repository description=Module for URL repository
# #
# 'version': plugin's version # 'version': plugin's version
version=6.5.0 version=6.6.1
# #
# 'name': the plugin name # 'name': the plugin name
name=repository-url name=repository-url
@ -35,7 +35,7 @@ classname=org.elasticsearch.plugin.repository.url.URLRepositoryPlugin
java.version=1.8 java.version=1.8
# #
# 'elasticsearch.version': version of elasticsearch compiled against # 'elasticsearch.version': version of elasticsearch compiled against
elasticsearch.version=6.5.0 elasticsearch.version=6.6.1
### optional elements for plugins: ### optional elements for plugins:
# #
# 'extended.plugins': other plugins this plugin extends through SPI # 'extended.plugins': other plugins this plugin extends through SPI