1
0
mirror of synced 2026-05-27 14:43:37 +00:00

Compare commits

...

11 Commits

Author SHA1 Message Date
Mark Paluch ede29781da Release version 5.0.9 (2022.0.9).
See #2629
2023-08-18 10:43:13 +02:00
Mark Paluch 53a7af879a Prepare 5.0.9 (2022.0.9).
See #2629
2023-08-18 10:42:57 +02:00
Julia Lee c7512fb325 Update CI properties.
See #2629
2023-08-14 10:19:15 -04:00
Julia Lee b4fde9d48b Upgrade to Maven Wrapper 3.9.4.
See #2668
2023-08-14 07:45:53 -04:00
Peter-Josef Meisch 8e56ef77b8 Polishing 2023-08-14 08:15:58 +02:00
Peter-Josef Meisch a2a4114d9c Fix cherrypicked code merge. 2023-08-14 00:01:24 +02:00
Peter-Josef Meisch ec8401a2fb Fix similarity field mapping.
Original Pull Request #2666
Closes #2659

(cherry picked from commit 8c5ff92cd2)
(cherry picked from commit 9b9136d852)

# Conflicts:
#	src/main/java/org/springframework/data/elasticsearch/core/index/MappingParameters.java
#	src/test/java/org/springframework/data/elasticsearch/core/index/MappingBuilderIntegrationTests.java
2023-08-13 21:43:38 +02:00
Peter-Josef Meisch 19ec05dae3 Upgrade deprecated dependency to Elasticsearch 7.17.12.
Original Pull Request #2654
Closes #2652
2023-07-30 19:24:34 +02:00
Peter-Josef Meisch 70d2de7eec Fix MappingElasticsearchConverter.
Original Pull Request #2637
Closes #2627

(cherry picked from commit d9bb9911f9)
(cherry picked from commit c045a8ae29)
2023-07-18 22:54:56 +02:00
Mark Paluch 1666fcee02 After release cleanups.
See #2594
2023-07-14 11:25:33 +02:00
Mark Paluch c513a0c03e Prepare next development iteration.
See #2594
2023-07-14 11:25:31 +02:00
9 changed files with 69 additions and 25 deletions
+2 -2
View File
@@ -1,3 +1,3 @@
#Mon Jul 03 09:46:39 CEST 2023
#Mon Aug 14 07:45:53 EDT 2023
wrapperUrl=https\://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar
distributionUrl=https\://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.3/apache-maven-3.9.3-bin.zip
distributionUrl=https\://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.4/apache-maven-3.9.4-bin.zip
+5 -5
View File
@@ -1,5 +1,5 @@
# Java versions
java.main.tag=17.0.7_7-jdk-focal
java.main.tag=17.0.8_7-jdk-focal
java.next.tag=20-jdk-jammy
# Docker container images - standard
@@ -7,12 +7,12 @@ docker.java.main.image=harbor-repo.vmware.com/dockerhub-proxy-cache/library/ecli
docker.java.next.image=harbor-repo.vmware.com/dockerhub-proxy-cache/library/eclipse-temurin:${java.next.tag}
# Supported versions of MongoDB
docker.mongodb.4.4.version=4.4.22
docker.mongodb.5.0.version=5.0.18
docker.mongodb.6.0.version=6.0.7
docker.mongodb.4.4.version=4.4.23
docker.mongodb.5.0.version=5.0.19
docker.mongodb.6.0.version=6.0.8
# Supported versions of Redis
docker.redis.6.version=6.2.12
docker.redis.6.version=6.2.13
# Supported versions of Cassandra
docker.cassandra.3.version=3.11.15
+4 -4
View File
@@ -5,12 +5,12 @@
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-elasticsearch</artifactId>
<version>5.0.8</version>
<version>5.0.9</version>
<parent>
<groupId>org.springframework.data.build</groupId>
<artifactId>spring-data-parent</artifactId>
<version>3.0.8</version>
<version>3.0.9</version>
</parent>
<name>Spring Data Elasticsearch</name>
@@ -18,10 +18,10 @@
<url>https://github.com/spring-projects/spring-data-elasticsearch</url>
<properties>
<springdata.commons>3.0.8</springdata.commons>
<springdata.commons>3.0.9</springdata.commons>
<!-- version of the RestHighLevelClient -->
<elasticsearch-rhlc>7.17.11</elasticsearch-rhlc>
<elasticsearch-rhlc>7.17.12</elasticsearch-rhlc>
<!-- version of the new ElasticsearchClient -->
<elasticsearch-java>8.5.3</elasticsearch-java>
@@ -154,7 +154,7 @@ The old deprecated `RestHighLevelClient` can still be used, but you will need to
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>elasticsearch-rest-high-level-client</artifactId>
<version>7.17.11</version>
<version>7.17.12</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
@@ -165,4 +165,4 @@ The old deprecated `RestHighLevelClient` can still be used, but you will need to
----
====
Make sure to specify the version 7.17.11 explicitly, otherwise maven will resolve to 8.5.3, and this does not exist.
Make sure to specify the version 7.17.12 explicitly, otherwise maven will resolve to 8.5.3, and this does not exist.
@@ -919,7 +919,7 @@ public class MappingElasticsearchConverter
Class<?> elementType = element == null ? null : element.getClass();
if (elementType == null || conversions.isSimpleType(elementType)) {
if (elementType == null || isSimpleType(elementType)) {
collection.add(getPotentiallyConvertedSimpleWrite(element,
componentType != null ? componentType.getType() : Object.class));
} else if (element instanceof Collection || elementType.isArray()) {
@@ -332,6 +332,8 @@ public final class MappingParameters {
if (similarity != Similarity.Default) {
objectNode.put(FIELD_PARAM_SIMILARITY, similarity.toString());
// similarity must have index explicitly set, otherwise Elasticsearch returns an error
objectNode.put(FIELD_PARAM_INDEX, index);
}
if (termVector != TermVector.none) {
+2 -1
View File
@@ -1,4 +1,4 @@
Spring Data Elasticsearch 5.0.8 (2022.0.8)
Spring Data Elasticsearch 5.0.9 (2022.0.9)
Copyright (c) [2013-2021] Pivotal Software, Inc.
This product is licensed to you under the Apache License, Version 2.0 (the "License").
@@ -24,3 +24,4 @@ conditions of the subcomponent's license, as noted in the LICENSE file.
@@ -908,6 +908,55 @@ public class MappingElasticsearchConverterUnitTests {
assertEquals(expected, document.toJson(), false);
}
@Test // #2627
@DisplayName("should write Map containing collection containing map")
void shouldWriteMapContainingCollectionContainingMap() throws JSONException {
class EntityWithMapCollectionMap {
Map<String, Object> map;
}
class InnerEntity {
String prop1;
String prop2;
public InnerEntity() {}
public InnerEntity(String prop1, String prop2) {
this.prop1 = prop1;
this.prop2 = prop2;
}
}
var entity = new EntityWithMapCollectionMap();
entity.map = Collections.singletonMap("collection",
Collections.singletonList(Collections.singletonMap("destination", new InnerEntity("prop1", "prop2"))));
var expected = """
{
"_class": "org.springframework.data.elasticsearch.core.convert.MappingElasticsearchConverterUnitTests$1EntityWithMapCollectionMap",
"map": {
"collection": [
{
"destination": {
"_class": "org.springframework.data.elasticsearch.core.convert.MappingElasticsearchConverterUnitTests$1InnerEntity",
"prop1": "prop1",
"prop2": "prop2"
}
}
]
}
}
""";
Document document = Document.create();
mappingElasticsearchConverter.write(entity, document);
assertEquals(expected, document.toJson(), false);
}
@Nested
class RangeTests {
@@ -37,22 +37,14 @@ import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Order;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledIf;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.NewElasticsearchClientDevelopment;
import org.springframework.data.elasticsearch.annotations.DateFormat;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Dynamic;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;
import org.springframework.data.elasticsearch.annotations.InnerField;
import org.springframework.data.elasticsearch.annotations.Mapping;
import org.springframework.data.elasticsearch.annotations.MultiField;
import org.springframework.data.elasticsearch.annotations.Setting;
import org.springframework.data.elasticsearch.annotations.TermVector;
import org.springframework.data.elasticsearch.annotations.*;
import org.springframework.data.elasticsearch.core.ElasticsearchOperations;
import org.springframework.data.elasticsearch.core.IndexOperations;
import org.springframework.data.elasticsearch.core.MappingContextBaseTests;