DATAES-711 - Update to Elasticsearch 7.5.1.

Original PR: #370
This commit is contained in:
Peter-Josef Meisch 2019-12-31 19:39:20 +01:00 committed by GitHub
parent 5c862e80bf
commit bd047776e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
32 changed files with 39 additions and 32 deletions

View File

@ -19,7 +19,7 @@
<properties>
<commonslang>2.6</commonslang>
<elasticsearch>7.4.1</elasticsearch>
<elasticsearch>7.5.1</elasticsearch>
<log4j>2.9.1</log4j>
<springdata.commons>2.3.0.BUILD-SNAPSHOT</springdata.commons>
<netty>4.1.39.Final</netty>

View File

@ -35,7 +35,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 Boot
| Neumannfootnote:cdv[Currently in development] |4.0.xfootnote:cdv[]|7.4.1 |2.3.xfootnote:cdv[]
| Neumannfootnote:cdv[Currently in development] |4.0.xfootnote:cdv[]|7.5.1 |2.3.xfootnote:cdv[]
| Moore | 3.2.x |6.8.4 | 2.2.x
| Lovelace | 3.1.x | 6.2.2 |2.1.x
| Kayfootnote:oom[Out of maintenance] | 3.0.xfootnote:oom[] | 5.5.0 | 2.0.xfootnote:oom[]

View File

@ -5,7 +5,7 @@
== New in Spring Data Elasticsearch 4.0
* Uses Spring 5.2.
* Upgrade to Elasticsearch 7.4.1.
* Upgrade to Elasticsearch 7.5.1.
* Deprecation of `TransportClient` usage.
* Implements most of the mapping-types available for the index mappings.
* Removal of the Jackson `ObjectMapper`, now using the <<elasticsearch.mapping.meta-model,MappingElasticsearchConverter>>

View File

@ -77,6 +77,7 @@ import org.elasticsearch.common.xcontent.XContentHelper;
import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.common.xcontent.XContentType;
import org.elasticsearch.index.VersionType;
import org.elasticsearch.index.mapper.MapperService;
import org.elasticsearch.index.rankeval.RankEvalRequest;
import org.elasticsearch.index.reindex.AbstractBulkByScrollRequest;
import org.elasticsearch.index.reindex.DeleteByQueryRequest;
@ -183,7 +184,9 @@ public class RequestConverters {
metadata.field("_index", action.index());
}
if (Strings.hasLength(action.type())) {
metadata.field("_type", action.type());
if (MapperService.SINGLE_MAPPING_NAME.equals(action.type()) == false) {
metadata.field("_type", action.type());
}
}
if (Strings.hasLength(action.id())) {
metadata.field("_id", action.id());
@ -201,11 +204,14 @@ public class RequestConverters {
metadata.field("version_type", "external");
} else if (versionType == VersionType.EXTERNAL_GTE) {
metadata.field("version_type", "external_gte");
} else if (versionType == VersionType.FORCE) {
metadata.field("version_type", "force");
}
}
if (action.ifSeqNo() != SequenceNumbers.UNASSIGNED_SEQ_NO) {
metadata.field("if_seq_no", action.ifSeqNo());
metadata.field("if_primary_term", action.ifPrimaryTerm());
}
if (opType == DocWriteRequest.OpType.INDEX || opType == DocWriteRequest.OpType.CREATE) {
IndexRequest indexRequest = (IndexRequest) action;
if (Strings.hasLength(indexRequest.getPipeline())) {

View File

@ -99,6 +99,6 @@ public class CriteriaQueryMappingTests {
@Field(name = "first-name") String firstName;
@Field(name = "last-name") String lastName;
@Field(name = "birth-date", type = FieldType.Date, format = DateFormat.custom,
pattern = "dd.MM.yyyy") LocalDate birthDate;
pattern = "dd.MM.uuuu") LocalDate birthDate;
}
}

View File

@ -21,7 +21,7 @@ class ElasticsearchDateConverterTests {
if (dateFormat == DateFormat.none) {
return;
}
String pattern = (dateFormat != DateFormat.custom) ? dateFormat.name() : "dd.MM.yyyy";
String pattern = (dateFormat != DateFormat.custom) ? dateFormat.name() : "dd.MM.uuuu";
ElasticsearchDateConverter converter = ElasticsearchDateConverter.of(pattern);

View File

@ -643,7 +643,7 @@ public class MappingElasticsearchConverterUnitTests {
@Field(name = "first-name") String firstName;
@Field(name = "last-name") String lastName;
@Field(name = "birth-date", type = FieldType.Date, format = DateFormat.custom,
pattern = "dd.MM.yyyy") LocalDate birthDate;
pattern = "dd.MM.uuuu") LocalDate birthDate;
Gender gender;
Address address;

View File

@ -21,6 +21,7 @@ import static org.springframework.data.elasticsearch.annotations.FieldType.*;
import lombok.Data;
import java.io.IOException;
import java.time.LocalDateTime;
import java.util.Date;
import org.junit.jupiter.api.Test;
@ -39,7 +40,7 @@ import org.springframework.data.elasticsearch.annotations.FieldType;
public class SimpleElasticsearchDateMappingTests extends MappingContextBaseTests {
private static final String EXPECTED_MAPPING = "{\"properties\":{\"message\":{\"store\":true,"
+ "\"type\":\"text\",\"index\":false,\"analyzer\":\"standard\"},\"customFormatDate\":{\"type\":\"date\",\"format\":\"dd.MM.yyyy hh:mm\"},"
+ "\"type\":\"text\",\"index\":false,\"analyzer\":\"standard\"},\"customFormatDate\":{\"type\":\"date\",\"format\":\"dd.MM.uuuu hh:mm\"},"
+ "\"defaultFormatDate\":{\"type\":\"date\"},\"basicFormatDate\":{\""
+ "type\":\"date\",\"format\":\"basic_date\"}}}";
@ -64,10 +65,10 @@ public class SimpleElasticsearchDateMappingTests extends MappingContextBaseTests
@Field(type = Text, index = false, store = true, analyzer = "standard") private String message;
@Field(type = Date, format = DateFormat.custom,
pattern = "dd.MM.yyyy hh:mm") private java.util.Date customFormatDate;
pattern = "dd.MM.uuuu hh:mm") private LocalDateTime customFormatDate;
@Field(type = FieldType.Date) private Date defaultFormatDate;
@Field(type = FieldType.Date) private LocalDateTime defaultFormatDate;
@Field(type = FieldType.Date, format = DateFormat.basic_date) private Date basicFormatDate;
@Field(type = FieldType.Date, format = DateFormat.basic_date) private LocalDateTime basicFormatDate;
}
}

View File

@ -123,7 +123,7 @@ public class SimpleElasticsearchPersistentPropertyUnitTests {
static class DatesProperty {
@Field(type = FieldType.Date, format = DateFormat.basic_date) Date date;
@Field(type = FieldType.Date, format = DateFormat.custom, pattern = "dd.MM.yyyy") LocalDate localDate;
@Field(type = FieldType.Date, format = DateFormat.custom, pattern = "dd.MM.uuuu") LocalDate localDate;
@Field(type = FieldType.Date, format = DateFormat.basic_date_time) LocalDateTime localDateTime;
}
}

View File

@ -20,7 +20,7 @@
description=Adds "built in" analyzers to Elasticsearch.
#
# 'version': plugin's version
version=7.4.1
version=7.5.1
#
# 'name': the plugin name
name=analysis-common
@ -35,7 +35,7 @@ classname=org.elasticsearch.analysis.common.CommonAnalysisPlugin
java.version=1.8
#
# 'elasticsearch.version': version of elasticsearch compiled against
elasticsearch.version=7.4.1
elasticsearch.version=7.5.1
### optional elements for plugins:
#
# '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
#
# 'version': plugin's version
version=7.4.1
version=7.5.1
#
# 'name': the plugin name
name=ingest-common
@ -35,7 +35,7 @@ classname=org.elasticsearch.ingest.common.IngestCommonPlugin
java.version=1.8
#
# 'elasticsearch.version': version of elasticsearch compiled against
elasticsearch.version=7.4.1
elasticsearch.version=7.5.1
### optional elements for plugins:
#
# 'extended.plugins': other plugins this plugin extends through SPI

View File

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

View File

@ -7,7 +7,7 @@
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an

View File

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

View File

@ -7,7 +7,7 @@
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an

View File

@ -20,7 +20,7 @@
description=Adds advanced field mappers
#
# 'version': plugin's version
version=7.4.1
version=7.5.1
#
# 'name': the plugin name
name=mapper-extras
@ -35,7 +35,7 @@ classname=org.elasticsearch.index.mapper.MapperExtrasPlugin
java.version=1.8
#
# 'elasticsearch.version': version of elasticsearch compiled against
elasticsearch.version=7.4.1
elasticsearch.version=7.5.1
### optional elements for plugins:
#
# '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.
#
# 'version': plugin's version
version=7.4.1
version=7.5.1
#
# 'name': the plugin name
name=reindex
@ -35,7 +35,7 @@ classname=org.elasticsearch.index.reindex.ReindexPlugin
java.version=1.8
#
# 'elasticsearch.version': version of elasticsearch compiled against
elasticsearch.version=7.4.1
elasticsearch.version=7.5.1
### optional elements for plugins:
#
# 'extended.plugins': other plugins this plugin extends through SPI

View File

@ -7,7 +7,7 @@
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an

View File

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

View File

@ -7,7 +7,7 @@
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an