mirror of
https://github.com/spring-projects/spring-data-elasticsearch.git
synced 2025-06-30 15:52:12 +00:00
parent
5c862e80bf
commit
bd047776e2
2
pom.xml
2
pom.xml
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<commonslang>2.6</commonslang>
|
<commonslang>2.6</commonslang>
|
||||||
<elasticsearch>7.4.1</elasticsearch>
|
<elasticsearch>7.5.1</elasticsearch>
|
||||||
<log4j>2.9.1</log4j>
|
<log4j>2.9.1</log4j>
|
||||||
<springdata.commons>2.3.0.BUILD-SNAPSHOT</springdata.commons>
|
<springdata.commons>2.3.0.BUILD-SNAPSHOT</springdata.commons>
|
||||||
<netty>4.1.39.Final</netty>
|
<netty>4.1.39.Final</netty>
|
||||||
|
@ -35,7 +35,7 @@ The following table shows the Elasticsearch versions that are used by Spring Dat
|
|||||||
[cols="^,^,^,^",options="header"]
|
[cols="^,^,^,^",options="header"]
|
||||||
|===
|
|===
|
||||||
| Spring Data Release Train |Spring Data Elasticsearch |Elasticsearch | Spring Boot
|
| 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
|
| Moore | 3.2.x |6.8.4 | 2.2.x
|
||||||
| Lovelace | 3.1.x | 6.2.2 |2.1.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[]
|
| Kayfootnote:oom[Out of maintenance] | 3.0.xfootnote:oom[] | 5.5.0 | 2.0.xfootnote:oom[]
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
== New in Spring Data Elasticsearch 4.0
|
== New in Spring Data Elasticsearch 4.0
|
||||||
|
|
||||||
* Uses Spring 5.2.
|
* Uses Spring 5.2.
|
||||||
* Upgrade to Elasticsearch 7.4.1.
|
* Upgrade to Elasticsearch 7.5.1.
|
||||||
* Deprecation of `TransportClient` usage.
|
* Deprecation of `TransportClient` usage.
|
||||||
* Implements most of the mapping-types available for the index mappings.
|
* Implements most of the mapping-types available for the index mappings.
|
||||||
* Removal of the Jackson `ObjectMapper`, now using the <<elasticsearch.mapping.meta-model,MappingElasticsearchConverter>>
|
* Removal of the Jackson `ObjectMapper`, now using the <<elasticsearch.mapping.meta-model,MappingElasticsearchConverter>>
|
||||||
|
@ -77,6 +77,7 @@ import org.elasticsearch.common.xcontent.XContentHelper;
|
|||||||
import org.elasticsearch.common.xcontent.XContentParser;
|
import org.elasticsearch.common.xcontent.XContentParser;
|
||||||
import org.elasticsearch.common.xcontent.XContentType;
|
import org.elasticsearch.common.xcontent.XContentType;
|
||||||
import org.elasticsearch.index.VersionType;
|
import org.elasticsearch.index.VersionType;
|
||||||
|
import org.elasticsearch.index.mapper.MapperService;
|
||||||
import org.elasticsearch.index.rankeval.RankEvalRequest;
|
import org.elasticsearch.index.rankeval.RankEvalRequest;
|
||||||
import org.elasticsearch.index.reindex.AbstractBulkByScrollRequest;
|
import org.elasticsearch.index.reindex.AbstractBulkByScrollRequest;
|
||||||
import org.elasticsearch.index.reindex.DeleteByQueryRequest;
|
import org.elasticsearch.index.reindex.DeleteByQueryRequest;
|
||||||
@ -183,8 +184,10 @@ public class RequestConverters {
|
|||||||
metadata.field("_index", action.index());
|
metadata.field("_index", action.index());
|
||||||
}
|
}
|
||||||
if (Strings.hasLength(action.type())) {
|
if (Strings.hasLength(action.type())) {
|
||||||
|
if (MapperService.SINGLE_MAPPING_NAME.equals(action.type()) == false) {
|
||||||
metadata.field("_type", action.type());
|
metadata.field("_type", action.type());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (Strings.hasLength(action.id())) {
|
if (Strings.hasLength(action.id())) {
|
||||||
metadata.field("_id", action.id());
|
metadata.field("_id", action.id());
|
||||||
}
|
}
|
||||||
@ -201,11 +204,14 @@ public class RequestConverters {
|
|||||||
metadata.field("version_type", "external");
|
metadata.field("version_type", "external");
|
||||||
} else if (versionType == VersionType.EXTERNAL_GTE) {
|
} else if (versionType == VersionType.EXTERNAL_GTE) {
|
||||||
metadata.field("version_type", "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) {
|
if (opType == DocWriteRequest.OpType.INDEX || opType == DocWriteRequest.OpType.CREATE) {
|
||||||
IndexRequest indexRequest = (IndexRequest) action;
|
IndexRequest indexRequest = (IndexRequest) action;
|
||||||
if (Strings.hasLength(indexRequest.getPipeline())) {
|
if (Strings.hasLength(indexRequest.getPipeline())) {
|
||||||
|
@ -99,6 +99,6 @@ public class CriteriaQueryMappingTests {
|
|||||||
@Field(name = "first-name") String firstName;
|
@Field(name = "first-name") String firstName;
|
||||||
@Field(name = "last-name") String lastName;
|
@Field(name = "last-name") String lastName;
|
||||||
@Field(name = "birth-date", type = FieldType.Date, format = DateFormat.custom,
|
@Field(name = "birth-date", type = FieldType.Date, format = DateFormat.custom,
|
||||||
pattern = "dd.MM.yyyy") LocalDate birthDate;
|
pattern = "dd.MM.uuuu") LocalDate birthDate;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ class ElasticsearchDateConverterTests {
|
|||||||
if (dateFormat == DateFormat.none) {
|
if (dateFormat == DateFormat.none) {
|
||||||
return;
|
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);
|
ElasticsearchDateConverter converter = ElasticsearchDateConverter.of(pattern);
|
||||||
|
|
||||||
|
@ -643,7 +643,7 @@ public class MappingElasticsearchConverterUnitTests {
|
|||||||
@Field(name = "first-name") String firstName;
|
@Field(name = "first-name") String firstName;
|
||||||
@Field(name = "last-name") String lastName;
|
@Field(name = "last-name") String lastName;
|
||||||
@Field(name = "birth-date", type = FieldType.Date, format = DateFormat.custom,
|
@Field(name = "birth-date", type = FieldType.Date, format = DateFormat.custom,
|
||||||
pattern = "dd.MM.yyyy") LocalDate birthDate;
|
pattern = "dd.MM.uuuu") LocalDate birthDate;
|
||||||
Gender gender;
|
Gender gender;
|
||||||
Address address;
|
Address address;
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@ import static org.springframework.data.elasticsearch.annotations.FieldType.*;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
@ -39,7 +40,7 @@ import org.springframework.data.elasticsearch.annotations.FieldType;
|
|||||||
public class SimpleElasticsearchDateMappingTests extends MappingContextBaseTests {
|
public class SimpleElasticsearchDateMappingTests extends MappingContextBaseTests {
|
||||||
|
|
||||||
private static final String EXPECTED_MAPPING = "{\"properties\":{\"message\":{\"store\":true,"
|
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\":{\""
|
+ "\"defaultFormatDate\":{\"type\":\"date\"},\"basicFormatDate\":{\""
|
||||||
+ "type\":\"date\",\"format\":\"basic_date\"}}}";
|
+ "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 = Text, index = false, store = true, analyzer = "standard") private String message;
|
||||||
|
|
||||||
@Field(type = Date, format = DateFormat.custom,
|
@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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -123,7 +123,7 @@ public class SimpleElasticsearchPersistentPropertyUnitTests {
|
|||||||
|
|
||||||
static class DatesProperty {
|
static class DatesProperty {
|
||||||
@Field(type = FieldType.Date, format = DateFormat.basic_date) Date date;
|
@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;
|
@Field(type = FieldType.Date, format = DateFormat.basic_date_time) LocalDateTime localDateTime;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
@ -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=7.4.1
|
version=7.5.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=7.4.1
|
elasticsearch.version=7.5.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
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -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=7.4.1
|
version=7.5.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=7.4.1
|
elasticsearch.version=7.5.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
|
||||||
|
Binary file not shown.
Binary file not shown.
@ -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=7.4.1
|
version=7.5.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=7.4.1
|
elasticsearch.version=7.5.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
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* 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,
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* software distributed under the License is distributed on an
|
* software distributed under the License is distributed on an
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -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=7.4.1
|
version=7.5.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=7.4.1
|
elasticsearch.version=7.5.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
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* 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,
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* software distributed under the License is distributed on an
|
* software distributed under the License is distributed on an
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
description=Adds advanced field mappers
|
description=Adds advanced field mappers
|
||||||
#
|
#
|
||||||
# 'version': plugin's version
|
# 'version': plugin's version
|
||||||
version=7.4.1
|
version=7.5.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=7.4.1
|
elasticsearch.version=7.5.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
|
||||||
|
@ -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=7.4.1
|
version=7.5.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=7.4.1
|
elasticsearch.version=7.5.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
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* 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,
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* software distributed under the License is distributed on an
|
* software distributed under the License is distributed on an
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
description=Module for URL repository
|
description=Module for URL repository
|
||||||
#
|
#
|
||||||
# 'version': plugin's version
|
# 'version': plugin's version
|
||||||
version=7.4.1
|
version=7.5.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=7.4.1
|
elasticsearch.version=7.5.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
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* 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,
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* software distributed under the License is distributed on an
|
* software distributed under the License is distributed on an
|
||||||
|
Loading…
x
Reference in New Issue
Block a user