diff --git a/.gitignore b/.gitignore
index ea0475e148..449f58ea44 100644
--- a/.gitignore
+++ b/.gitignore
@@ -30,7 +30,7 @@ target
build/
node_modules
node
-package.json
package-lock.json
-.mvn/.gradle-enterprise
+.mvn/.develocity
+/src/test/resources/testcontainers-local.properties
diff --git a/.mvn/extensions.xml b/.mvn/extensions.xml
index ebd7610255..e0857eaa25 100644
--- a/.mvn/extensions.xml
+++ b/.mvn/extensions.xml
@@ -1,13 +1,8 @@
- com.gradle
- gradle-enterprise-maven-extension
- 1.19.2
-
-
- com.gradle
- common-custom-user-data-maven-extension
- 1.12.4
+ io.spring.develocity.conventions
+ develocity-conventions-maven-extension
+ 0.0.22
diff --git a/.mvn/gradle-enterprise.xml b/.mvn/gradle-enterprise.xml
deleted file mode 100644
index f88a885d06..0000000000
--- a/.mvn/gradle-enterprise.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
- https://ge.spring.io
-
-
- false
- true
- true
-
- #{{'0.0.0.0'}}
-
-
-
-
- true
-
-
-
-
- ${env.GRADLE_ENTERPRISE_CACHE_USERNAME}
- ${env.GRADLE_ENTERPRISE_CACHE_PASSWORD}
-
-
- true
- #{env['GRADLE_ENTERPRISE_CACHE_USERNAME'] != null and env['GRADLE_ENTERPRISE_CACHE_PASSWORD'] != null}
-
-
-
diff --git a/.mvn/jvm.config b/.mvn/jvm.config
new file mode 100644
index 0000000000..e27f6e8f5e
--- /dev/null
+++ b/.mvn/jvm.config
@@ -0,0 +1,14 @@
+--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED
+--add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED
+--add-exports jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED
+--add-exports jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED
+--add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED
+--add-exports jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED
+--add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED
+--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
+--add-opens jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED
+--add-opens jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED
+--add-opens=java.base/java.util=ALL-UNNAMED
+--add-opens=java.base/java.lang.reflect=ALL-UNNAMED
+--add-opens=java.base/java.text=ALL-UNNAMED
+--add-opens=java.desktop/java.awt.font=ALL-UNNAMED
diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties
index e6686c6c0c..f57fa8f6fa 100644
--- a/.mvn/wrapper/maven-wrapper.properties
+++ b/.mvn/wrapper/maven-wrapper.properties
@@ -1,3 +1,3 @@
-#Thu Dec 14 08:40:44 CET 2023
+#Thu Nov 07 09:49:32 CET 2024
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.6/apache-maven-3.9.6-bin.zip
+distributionUrl=https\://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip
diff --git a/Jenkinsfile b/Jenkinsfile
index ade2e5a109..30465d186f 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -9,7 +9,7 @@ pipeline {
triggers {
pollSCM 'H/10 * * * *'
- upstream(upstreamProjects: "spring-data-commons/main", threshold: hudson.model.Result.SUCCESS)
+ upstream(upstreamProjects: "spring-data-commons/3.3.x", threshold: hudson.model.Result.SUCCESS)
}
options {
@@ -33,15 +33,16 @@ pipeline {
environment {
ARTIFACTORY = credentials("${p['artifactory.credentials']}")
- DEVELOCITY_CACHE = credentials("${p['develocity.cache.credentials']}")
DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}")
}
steps {
script {
- docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.docker']) {
- sh "PROFILE=none JENKINS_USER_NAME=${p['jenkins.user.name']} ci/verify.sh"
- sh "JENKINS_USER_NAME=${p['jenkins.user.name']} ci/clean.sh"
+ docker.withRegistry(p['docker.proxy.registry'], p['docker.proxy.credentials']) {
+ docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.docker']) {
+ sh "PROFILE=none JENKINS_USER_NAME=${p['jenkins.user.name']} ci/verify.sh"
+ sh "JENKINS_USER_NAME=${p['jenkins.user.name']} ci/clean.sh"
+ }
}
}
}
@@ -63,14 +64,15 @@ pipeline {
options { timeout(time: 30, unit: 'MINUTES') }
environment {
ARTIFACTORY = credentials("${p['artifactory.credentials']}")
- DEVELOCITY_CACHE = credentials("${p['develocity.cache.credentials']}")
DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}")
}
steps {
script {
- docker.image(p['docker.java.next.image']).inside(p['docker.java.inside.docker']) {
- sh "PROFILE=none JENKINS_USER_NAME=${p['jenkins.user.name']} ci/verify.sh"
- sh "JENKINS_USER_NAME=${p['jenkins.user.name']} ci/clean.sh"
+ docker.withRegistry(p['docker.proxy.registry'], p['docker.proxy.credentials']) {
+ docker.image(p['docker.java.next.image']).inside(p['docker.java.inside.docker']) {
+ sh "PROFILE=none JENKINS_USER_NAME=${p['jenkins.user.name']} ci/verify.sh"
+ sh "JENKINS_USER_NAME=${p['jenkins.user.name']} ci/clean.sh"
+ }
}
}
}
@@ -92,24 +94,24 @@ pipeline {
options { timeout(time: 20, unit: 'MINUTES') }
environment {
ARTIFACTORY = credentials("${p['artifactory.credentials']}")
- DEVELOCITY_CACHE = credentials("${p['develocity.cache.credentials']}")
DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}")
}
steps {
script {
- docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.basic']) {
- sh 'MAVEN_OPTS="-Duser.name=' + "${p['jenkins.user.name']}" + ' -Duser.home=/tmp/jenkins-home" ' +
- "DEVELOCITY_CACHE_USERNAME=${DEVELOCITY_CACHE_USR} " +
- "DEVELOCITY_CACHE_PASSWORD=${DEVELOCITY_CACHE_PSW} " +
- "GRADLE_ENTERPRISE_ACCESS_KEY=${DEVELOCITY_ACCESS_KEY} " +
- "./mvnw -s settings.xml -Pci,artifactory -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-elasticsearch-non-root " +
- "-Dartifactory.server=${p['artifactory.url']} " +
- "-Dartifactory.username=${ARTIFACTORY_USR} " +
- "-Dartifactory.password=${ARTIFACTORY_PSW} " +
- "-Dartifactory.staging-repository=${p['artifactory.repository.snapshot']} " +
- "-Dartifactory.build-name=spring-data-elasticsearch " +
- "-Dartifactory.build-number=spring-data-elasticsearch-${BRANCH_NAME}-build-${BUILD_NUMBER} " +
- "-Dmaven.test.skip=true clean deploy -U -B"
+ docker.withRegistry(p['docker.proxy.registry'], p['docker.proxy.credentials']) {
+ docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.docker']) {
+ sh 'MAVEN_OPTS="-Duser.name=' + "${p['jenkins.user.name']}" + ' -Duser.home=/tmp/jenkins-home" ' +
+ "./mvnw -s settings.xml -Pci,artifactory " +
+ "-Ddevelocity.storage.directory=/tmp/jenkins-home/.develocity-root " +
+ "-Dartifactory.server=${p['artifactory.url']} " +
+ "-Dartifactory.username=${ARTIFACTORY_USR} " +
+ "-Dartifactory.password=${ARTIFACTORY_PSW} " +
+ "-Dartifactory.staging-repository=${p['artifactory.repository.snapshot']} " +
+ "-Dartifactory.build-name=spring-data-elasticsearch " +
+ "-Dartifactory.build-number=spring-data-elasticsearch-${BRANCH_NAME}-build-${BUILD_NUMBER} " +
+ "-Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-elasticsearch " +
+ "-Dmaven.test.skip=true clean deploy -U -B"
+ }
}
}
}
diff --git a/ci/clean.sh b/ci/clean.sh
index 34ba4ffcc1..ca174330ee 100755
--- a/ci/clean.sh
+++ b/ci/clean.sh
@@ -2,12 +2,7 @@
set -euo pipefail
-export DEVELOCITY_CACHE_USERNAME=${DEVELOCITY_CACHE_USR}
-export DEVELOCITY_CACHE_PASSWORD=${DEVELOCITY_CACHE_PSW}
export JENKINS_USER=${JENKINS_USER_NAME}
-# The environment variable to configure access key is still GRADLE_ENTERPRISE_ACCESS_KEY
-export GRADLE_ENTERPRISE_ACCESS_KEY=${DEVELOCITY_ACCESS_KEY}
-
MAVEN_OPTS="-Duser.name=${JENKINS_USER} -Duser.home=/tmp/jenkins-home" \
- ./mvnw -s settings.xml clean -Dscan=false -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-elasticsearch
+ ./mvnw -s settings.xml clean -Dscan=false -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-elasticsearch -Ddevelocity.storage.directory=/tmp/jenkins-home/.develocity-root
diff --git a/ci/pipeline.properties b/ci/pipeline.properties
index 60057f2659..81d1e2904b 100644
--- a/ci/pipeline.properties
+++ b/ci/pipeline.properties
@@ -1,10 +1,10 @@
# Java versions
-java.main.tag=17.0.9_9-jdk-focal
-java.next.tag=21.0.1_12-jdk-jammy
+java.main.tag=17.0.15_6-jdk-focal
+java.next.tag=22.0.2_9-jdk-jammy
# Docker container images - standard
-docker.java.main.image=harbor-repo.vmware.com/dockerhub-proxy-cache/library/eclipse-temurin:${java.main.tag}
-docker.java.next.image=harbor-repo.vmware.com/dockerhub-proxy-cache/library/eclipse-temurin:${java.next.tag}
+docker.java.main.image=library/eclipse-temurin:${java.main.tag}
+docker.java.next.image=library/eclipse-temurin:${java.next.tag}
# Supported versions of MongoDB
docker.mongodb.4.4.version=4.4.25
@@ -14,6 +14,7 @@ docker.mongodb.7.0.version=7.0.2
# Supported versions of Redis
docker.redis.6.version=6.2.13
+docker.redis.7.version=7.2.4
# Supported versions of Cassandra
docker.cassandra.3.version=3.11.16
@@ -25,9 +26,10 @@ docker.java.inside.docker=-u root -v /var/run/docker.sock:/var/run/docker.sock -
# Credentials
docker.registry=
docker.credentials=hub.docker.com-springbuildmaster
+docker.proxy.registry=https://docker-hub.usw1.packages.broadcom.com
+docker.proxy.credentials=usw1_packages_broadcom_com-jenkins-token
artifactory.credentials=02bd1690-b54f-4c9f-819d-a77cb7a9822c
artifactory.url=https://repo.spring.io
artifactory.repository.snapshot=libs-snapshot-local
-develocity.cache.credentials=gradle_enterprise_cache_user
develocity.access-key=gradle_enterprise_secret_access_key
jenkins.user.name=spring-builds+jenkins
diff --git a/ci/verify.sh b/ci/verify.sh
index 98b9c79cc6..46afc80280 100755
--- a/ci/verify.sh
+++ b/ci/verify.sh
@@ -3,15 +3,8 @@
set -euo pipefail
mkdir -p /tmp/jenkins-home/.m2/spring-data-elasticsearch
-chown -R 1001:1001 .
-
-export DEVELOCITY_CACHE_USERNAME=${DEVELOCITY_CACHE_USR}
-export DEVELOCITY_CACHE_PASSWORD=${DEVELOCITY_CACHE_PSW}
export JENKINS_USER=${JENKINS_USER_NAME}
-# The environment variable to configure access key is still GRADLE_ENTERPRISE_ACCESS_KEY
-export GRADLE_ENTERPRISE_ACCESS_KEY=${DEVELOCITY_ACCESS_KEY}
-
MAVEN_OPTS="-Duser.name=${JENKINS_USER} -Duser.home=/tmp/jenkins-home" \
./mvnw -s settings.xml \
- -P${PROFILE} clean dependency:list verify -Dsort -U -B -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-elasticsearch
+ -P${PROFILE} clean dependency:list verify -Dsort -U -B -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-elasticsearch -Ddevelocity.storage.directory=/tmp/jenkins-home/.develocity-root
diff --git a/package.json b/package.json
new file mode 100644
index 0000000000..4689506b3f
--- /dev/null
+++ b/package.json
@@ -0,0 +1,10 @@
+{
+ "dependencies": {
+ "antora": "3.2.0-alpha.6",
+ "@antora/atlas-extension": "1.0.0-alpha.2",
+ "@antora/collector-extension": "1.0.0-alpha.7",
+ "@asciidoctor/tabs": "1.0.0-beta.6",
+ "@springio/antora-extensions": "1.13.0",
+ "@springio/asciidoctor-extensions": "1.0.0-alpha.11"
+ }
+}
diff --git a/pom.xml b/pom.xml
index cd745fe21f..5442456837 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,12 +5,12 @@
org.springframework.dataspring-data-elasticsearch
- 5.3.0
+ 5.3.13-SNAPSHOTorg.springframework.data.buildspring-data-parent
- 3.3.0
+ 3.3.13-SNAPSHOTSpring Data Elasticsearch
@@ -18,12 +18,11 @@
https://github.com/spring-projects/spring-data-elasticsearch
- 3.3.0
+ 3.3.13-SNAPSHOT
- 8.13.2
+ 8.13.4
- 1.0.8.RELEASE0.14.42.18.01.5.1
@@ -248,13 +247,6 @@
test
-
- io.projectreactor.tools
- blockhound-junit-platform
- ${blockhound-junit}
- test
-
-
org.skyscreamerjsonassert
@@ -443,25 +435,6 @@
-
- jdk13+
-
-
- [13,)
-
-
-
-
- org.apache.maven.plugins
- maven-surefire-plugin
-
- -XX:+AllowRedefinitionToAddDeleteMethods
-
-
-
-
-
-
antora-process-resources
@@ -479,7 +452,7 @@
- io.spring.maven.antora
+ org.antoraantora-maven-plugin
@@ -488,8 +461,20 @@
-
-
+
+ spring-snapshot
+ https://repo.spring.io/snapshot
+
+ true
+
+
+ false
+
+
+
+ spring-milestone
+ https://repo.spring.io/milestone
+
diff --git a/src/main/antora/antora-playbook.yml b/src/main/antora/antora-playbook.yml
index 27404c0c14..5f4f76e060 100644
--- a/src/main/antora/antora-playbook.yml
+++ b/src/main/antora/antora-playbook.yml
@@ -3,8 +3,7 @@
# The purpose of this Antora playbook is to build the docs in the current branch.
antora:
extensions:
- - '@antora/collector-extension'
- - require: '@springio/antora-extensions/root-component-extension'
+ - require: '@springio/antora-extensions'
root_component_name: 'data-elasticsearch'
site:
title: Spring Data Elasticsearch
@@ -22,13 +21,12 @@ content:
start_path: src/main/antora
asciidoc:
attributes:
- page-pagination: ''
hide-uri-scheme: '@'
tabs-sync-option: '@'
- chomp: 'all'
extensions:
- '@asciidoctor/tabs'
- '@springio/asciidoctor-extensions'
+ - '@springio/asciidoctor-extensions/javadoc-extension'
sourcemap: true
urls:
latest_version_segment: ''
@@ -38,5 +36,5 @@ runtime:
format: pretty
ui:
bundle:
- url: https://github.com/spring-io/antora-ui-spring/releases/download/v0.3.5/ui-bundle.zip
+ url: https://github.com/spring-io/antora-ui-spring/releases/download/v0.4.16/ui-bundle.zip
snapshot: true
diff --git a/src/main/antora/antora.yml b/src/main/antora/antora.yml
index 70364a772e..2348fca613 100644
--- a/src/main/antora/antora.yml
+++ b/src/main/antora/antora.yml
@@ -10,3 +10,8 @@ ext:
local: true
scan:
dir: target/classes/
+ - run:
+ command: ./mvnw package -Pdistribute
+ local: true
+ scan:
+ dir: target/antora
diff --git a/src/main/antora/modules/ROOT/nav.adoc b/src/main/antora/modules/ROOT/nav.adoc
index db6e1ca61b..4d42b54636 100644
--- a/src/main/antora/modules/ROOT/nav.adoc
+++ b/src/main/antora/modules/ROOT/nav.adoc
@@ -9,7 +9,7 @@
*** xref:migration-guides/migration-guide-4.4-5.0.adoc[]
*** xref:migration-guides/migration-guide-5.0-5.1.adoc[]
*** xref:migration-guides/migration-guide-5.1-5.2.adoc[]
-
+*** xref:migration-guides/migration-guide-5.2-5.3.adoc[]
* xref:elasticsearch.adoc[]
** xref:elasticsearch/clients.adoc[]
@@ -39,4 +39,5 @@
** xref:repositories/query-keywords-reference.adoc[]
** xref:repositories/query-return-types-reference.adoc[]
-* https://github.com/spring-projects/spring-data-commons/wiki[Wiki]
+* xref:attachment$api/java/index.html[Javadoc,role=link-external,window=_blank]
+* https://github.com/spring-projects/spring-data-commons/wiki[Wiki,role=link-external,window=_blank]
diff --git a/src/main/antora/modules/ROOT/pages/elasticsearch/clients.adoc b/src/main/antora/modules/ROOT/pages/elasticsearch/clients.adoc
index 0f8d8c1027..0cf7d5ea3c 100644
--- a/src/main/antora/modules/ROOT/pages/elasticsearch/clients.adoc
+++ b/src/main/antora/modules/ROOT/pages/elasticsearch/clients.adoc
@@ -31,7 +31,7 @@ public class MyClientConfig extends ElasticsearchConfiguration {
<.> for a detailed description of the builder methods see xref:elasticsearch/clients.adoc#elasticsearch.clients.configuration[Client Configuration]
====
-The `ElasticsearchConfiguration` class allows further configuration by overriding for example the `jsonpMapper()` or `transportOptions()` methods.
+The javadoc:org.springframework.data.elasticsearch.client.elc.ElasticsearchConfiguration[]] class allows further configuration by overriding for example the `jsonpMapper()` or `transportOptions()` methods.
The following beans can then be injected in other Spring components:
@@ -52,13 +52,13 @@ RestClient restClient; <.>
JsonpMapper jsonpMapper; <.>
----
-<.> an implementation of `ElasticsearchOperations`
+<.> an implementation of javadoc:org.springframework.data.elasticsearch.core.ElasticsearchOperations[]
<.> the `co.elastic.clients.elasticsearch.ElasticsearchClient` that is used.
<.> the low level `RestClient` from the Elasticsearch libraries
<.> the `JsonpMapper` user by the Elasticsearch `Transport`
====
-Basically one should just use the `ElasticsearchOperations` to interact with the Elasticsearch cluster.
+Basically one should just use the javadoc:org.springframework.data.elasticsearch.core.ElasticsearchOperations[] to interact with the Elasticsearch cluster.
When using repositories, this instance is used under the hood as well.
[[elasticsearch.clients.reactiverestclient]]
@@ -86,7 +86,7 @@ public class MyClientConfig extends ReactiveElasticsearchConfiguration {
<.> for a detailed description of the builder methods see xref:elasticsearch/clients.adoc#elasticsearch.clients.configuration[Client Configuration]
====
-The `ReactiveElasticsearchConfiguration` class allows further configuration by overriding for example the `jsonpMapper()` or `transportOptions()` methods.
+The javadoc:org.springframework.data.elasticsearch.client.elc.ReactiveElasticsearchConfiguration[] class allows further configuration by overriding for example the `jsonpMapper()` or `transportOptions()` methods.
The following beans can then be injected in other Spring components:
@@ -108,20 +108,20 @@ JsonpMapper jsonpMapper; <.>
the following can be injected:
-<.> an implementation of `ReactiveElasticsearchOperations`
+<.> an implementation of javadoc:org.springframework.data.elasticsearch.core.ReactiveElasticsearchOperations[]
<.> the `org.springframework.data.elasticsearch.client.elc.ReactiveElasticsearchClient` that is used.
This is a reactive implementation based on the Elasticsearch client implementation.
<.> the low level `RestClient` from the Elasticsearch libraries
<.> the `JsonpMapper` user by the Elasticsearch `Transport`
====
-Basically one should just use the `ReactiveElasticsearchOperations` to interact with the Elasticsearch cluster.
+Basically one should just use the javadoc:org.springframework.data.elasticsearch.core.ReactiveElasticsearchOperations[] to interact with the Elasticsearch cluster.
When using repositories, this instance is used under the hood as well.
[[elasticsearch.clients.configuration]]
== Client Configuration
-Client behaviour can be changed via the `ClientConfiguration` that allows to set options for SSL, connect and socket timeouts, headers and other parameters.
+Client behaviour can be changed via the javadoc:org.springframework.data.elasticsearch.client.ClientConfiguration[] that allows to set options for SSL, connect and socket timeouts, headers and other parameters.
.Client Configuration
====
@@ -178,7 +178,7 @@ If this is used in the reactive setup, the supplier function *must not* block!
[[elasticsearch.clients.configuration.callbacks]]
=== Client configuration callbacks
-The `ClientConfiguration` class offers the most common parameters to configure the client.
+The javadoc:org.springframework.data.elasticsearch.client.ClientConfiguration[] class offers the most common parameters to configure the client.
In the case this is not enough, the user can add callback functions by using the `withClientConfigurer(ClientConfigurationCallback>)` method.
The following callbacks are provided:
diff --git a/src/main/antora/modules/ROOT/pages/elasticsearch/elasticsearch-new.adoc b/src/main/antora/modules/ROOT/pages/elasticsearch/elasticsearch-new.adoc
index e9705e4db7..8ef868fab5 100644
--- a/src/main/antora/modules/ROOT/pages/elasticsearch/elasticsearch-new.adoc
+++ b/src/main/antora/modules/ROOT/pages/elasticsearch/elasticsearch-new.adoc
@@ -1,6 +1,11 @@
[[new-features]]
= What's new
+[[new-features.5-3-1]]
+== New in Spring Data Elasticsearch 5.3.1
+
+* Upgrade to Elasticsearch 8.13.4.
+
[[new-features.5-3-0]]
== New in Spring Data Elasticsearch 5.3
diff --git a/src/main/antora/modules/ROOT/pages/elasticsearch/template.adoc b/src/main/antora/modules/ROOT/pages/elasticsearch/template.adoc
index b893bb1a19..cf458c3b89 100644
--- a/src/main/antora/modules/ROOT/pages/elasticsearch/template.adoc
+++ b/src/main/antora/modules/ROOT/pages/elasticsearch/template.adoc
@@ -3,10 +3,10 @@
Spring Data Elasticsearch uses several interfaces to define the operations that can be called against an Elasticsearch index (for a description of the reactive interfaces see xref:elasticsearch/reactive-template.adoc[]).
-* `IndexOperations` defines actions on index level like creating or deleting an index.
-* `DocumentOperations` defines actions to store, update and retrieve entities based on their id.
-* `SearchOperations` define the actions to search for multiple entities using queries
-* `ElasticsearchOperations` combines the `DocumentOperations` and `SearchOperations` interfaces.
+* javadoc:org.springframework.data.elasticsearch.core.IndexOperations[] defines actions on index level like creating or deleting an index.
+* javadoc:org.springframework.data.elasticsearch.core.DocumentOperations[] defines actions to store, update and retrieve entities based on their id.
+* javadoc:org.springframework.data.elasticsearch.core.SearchOperations[] define the actions to search for multiple entities using queries
+* javadoc:org.springframework.data.elasticsearch.core.ElasticsearchOperations[] combines the `DocumentOperations` and `SearchOperations` interfaces.
These interfaces correspond to the structuring of the https://www.elastic.co/guide/en/elasticsearch/reference/current/rest-apis.html[Elasticsearch API].
diff --git a/src/main/antora/modules/ROOT/pages/elasticsearch/versions.adoc b/src/main/antora/modules/ROOT/pages/elasticsearch/versions.adoc
index 8fe2fc70ee..0e94270a67 100644
--- a/src/main/antora/modules/ROOT/pages/elasticsearch/versions.adoc
+++ b/src/main/antora/modules/ROOT/pages/elasticsearch/versions.adoc
@@ -6,10 +6,10 @@ The following table shows the Elasticsearch and Spring versions that are used by
[cols="^,^,^,^",options="header"]
|===
| Spring Data Release Train | Spring Data Elasticsearch | Elasticsearch | Spring Framework
-| 2024.0 (?) | 5.3.x | 8.13.2 | ?
+| 2024.0 | 5.3.3 | 8.13.4 | 6.1.x
| 2023.1 (Vaughan) | 5.2.x | 8.11.1 | 6.1.x
-| 2023.0 (Ullmann) | 5.1.x | 8.7.1 | 6.0.x
-| 2022.0 (Turing) | 5.0.xfootnote:oom[Out of maintenance] | 8.5.3 | 6.0.x
+| 2023.0 (Ullmann) | 5.1.xfootnote:oom[Out of maintenance] | 8.7.1 | 6.0.x
+| 2022.0 (Turing) | 5.0.xfootnote:oom[] | 8.5.3 | 6.0.x
| 2021.2 (Raj) | 4.4.xfootnote:oom[] | 7.17.3 | 5.3.x
| 2021.1 (Q) | 4.3.xfootnote:oom[] | 7.15.2 | 5.3.x
| 2021.0 (Pascal) | 4.2.xfootnote:oom[] | 7.12.0 | 5.3.x
diff --git a/src/main/antora/modules/ROOT/pages/migration-guides/migration-guide-5.2-5.3.adoc b/src/main/antora/modules/ROOT/pages/migration-guides/migration-guide-5.2-5.3.adoc
index 17ab9063c5..6c35d1c9c3 100644
--- a/src/main/antora/modules/ROOT/pages/migration-guides/migration-guide-5.2-5.3.adoc
+++ b/src/main/antora/modules/ROOT/pages/migration-guides/migration-guide-5.2-5.3.adoc
@@ -5,7 +5,10 @@ This section describes breaking changes from version 5.2.x to 5.3.x and how remo
[[elasticsearch-migration-guide-5.2-5.3.breaking-changes]]
== Breaking Changes
-
+During the parameter replacement in `@Query` annotated repository methods previous versions wrote the String _"null"_ into the query that was sent to Elasticsearch
+when the actual parameter value was `null`. As Elasticsearch does not store `null` values, this behaviour could lead to problems, for example whent the fields to be
+searched contains the string `"null"`. In Version 5.3 a `null` value in a parameter will cause a `ConversionException` to be thrown. If you are using `"null"` as the
+`null_value` defined in a field mapping, then pass that string into the query instead of a Java `null`.
[[elasticsearch-migration-guide-5.2-5.3.deprecations]]
== Deprecations
diff --git a/src/main/java/org/springframework/data/elasticsearch/BulkFailureException.java b/src/main/java/org/springframework/data/elasticsearch/BulkFailureException.java
index 9308caa924..6d40bca631 100644
--- a/src/main/java/org/springframework/data/elasticsearch/BulkFailureException.java
+++ b/src/main/java/org/springframework/data/elasticsearch/BulkFailureException.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2024 the original author or authors.
+ * Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/ElasticsearchErrorCause.java b/src/main/java/org/springframework/data/elasticsearch/ElasticsearchErrorCause.java
index 130f218f8f..d0622bfa5c 100644
--- a/src/main/java/org/springframework/data/elasticsearch/ElasticsearchErrorCause.java
+++ b/src/main/java/org/springframework/data/elasticsearch/ElasticsearchErrorCause.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2022-2024 the original author or authors.
+ * Copyright 2022-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/NoSuchIndexException.java b/src/main/java/org/springframework/data/elasticsearch/NoSuchIndexException.java
index a431801aa4..c1eab9bcf7 100644
--- a/src/main/java/org/springframework/data/elasticsearch/NoSuchIndexException.java
+++ b/src/main/java/org/springframework/data/elasticsearch/NoSuchIndexException.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2019-2024 the original author or authors.
+ * Copyright 2019-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/ResourceFailureException.java b/src/main/java/org/springframework/data/elasticsearch/ResourceFailureException.java
index 8dac09e1dc..493d3b4b7b 100644
--- a/src/main/java/org/springframework/data/elasticsearch/ResourceFailureException.java
+++ b/src/main/java/org/springframework/data/elasticsearch/ResourceFailureException.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/ResourceNotFoundException.java b/src/main/java/org/springframework/data/elasticsearch/ResourceNotFoundException.java
index 5ba76a6b29..5e97b4e00b 100644
--- a/src/main/java/org/springframework/data/elasticsearch/ResourceNotFoundException.java
+++ b/src/main/java/org/springframework/data/elasticsearch/ResourceNotFoundException.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2022-2024 the original author or authors.
+ * Copyright 2022-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/RestStatusException.java b/src/main/java/org/springframework/data/elasticsearch/RestStatusException.java
index b743cc794f..c707686098 100644
--- a/src/main/java/org/springframework/data/elasticsearch/RestStatusException.java
+++ b/src/main/java/org/springframework/data/elasticsearch/RestStatusException.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/UncategorizedElasticsearchException.java b/src/main/java/org/springframework/data/elasticsearch/UncategorizedElasticsearchException.java
index c04de263ee..ca70b022b5 100644
--- a/src/main/java/org/springframework/data/elasticsearch/UncategorizedElasticsearchException.java
+++ b/src/main/java/org/springframework/data/elasticsearch/UncategorizedElasticsearchException.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2024 the original author or authors.
+ * Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/VersionConflictException.java b/src/main/java/org/springframework/data/elasticsearch/VersionConflictException.java
index ea02677529..b3f31d3550 100644
--- a/src/main/java/org/springframework/data/elasticsearch/VersionConflictException.java
+++ b/src/main/java/org/springframework/data/elasticsearch/VersionConflictException.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2023-2024 the original author or authors.
+ * Copyright 2023-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/annotations/CompletionContext.java b/src/main/java/org/springframework/data/elasticsearch/annotations/CompletionContext.java
index 3d93be01ec..da27c1245b 100644
--- a/src/main/java/org/springframework/data/elasticsearch/annotations/CompletionContext.java
+++ b/src/main/java/org/springframework/data/elasticsearch/annotations/CompletionContext.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2019-2024 the original author or authors.
+ * Copyright 2019-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/annotations/CompletionField.java b/src/main/java/org/springframework/data/elasticsearch/annotations/CompletionField.java
index 04401340d8..94ca1ea724 100644
--- a/src/main/java/org/springframework/data/elasticsearch/annotations/CompletionField.java
+++ b/src/main/java/org/springframework/data/elasticsearch/annotations/CompletionField.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2013-2024 the original author or authors.
+ * Copyright 2013-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/annotations/CountQuery.java b/src/main/java/org/springframework/data/elasticsearch/annotations/CountQuery.java
index 0a0e80752b..80bb7c15f9 100644
--- a/src/main/java/org/springframework/data/elasticsearch/annotations/CountQuery.java
+++ b/src/main/java/org/springframework/data/elasticsearch/annotations/CountQuery.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/annotations/DateFormat.java b/src/main/java/org/springframework/data/elasticsearch/annotations/DateFormat.java
index 4e48e567a1..9f3b7f9d78 100644
--- a/src/main/java/org/springframework/data/elasticsearch/annotations/DateFormat.java
+++ b/src/main/java/org/springframework/data/elasticsearch/annotations/DateFormat.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2014-2024 the original author or authors.
+ * Copyright 2014-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/annotations/Document.java b/src/main/java/org/springframework/data/elasticsearch/annotations/Document.java
index 391e303e06..f10d96acfc 100644
--- a/src/main/java/org/springframework/data/elasticsearch/annotations/Document.java
+++ b/src/main/java/org/springframework/data/elasticsearch/annotations/Document.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2013-2024 the original author or authors.
+ * Copyright 2013-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/annotations/Dynamic.java b/src/main/java/org/springframework/data/elasticsearch/annotations/Dynamic.java
index 23a82f384b..9868c6e3c6 100644
--- a/src/main/java/org/springframework/data/elasticsearch/annotations/Dynamic.java
+++ b/src/main/java/org/springframework/data/elasticsearch/annotations/Dynamic.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/annotations/Field.java b/src/main/java/org/springframework/data/elasticsearch/annotations/Field.java
index dd299a4930..19ea6ff61c 100644
--- a/src/main/java/org/springframework/data/elasticsearch/annotations/Field.java
+++ b/src/main/java/org/springframework/data/elasticsearch/annotations/Field.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2013-2024 the original author or authors.
+ * Copyright 2013-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/annotations/FieldType.java b/src/main/java/org/springframework/data/elasticsearch/annotations/FieldType.java
index f148efb638..f701948d6d 100644
--- a/src/main/java/org/springframework/data/elasticsearch/annotations/FieldType.java
+++ b/src/main/java/org/springframework/data/elasticsearch/annotations/FieldType.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2013-2024 the original author or authors.
+ * Copyright 2013-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/annotations/GeoPointField.java b/src/main/java/org/springframework/data/elasticsearch/annotations/GeoPointField.java
index 7feda38237..05695abc98 100644
--- a/src/main/java/org/springframework/data/elasticsearch/annotations/GeoPointField.java
+++ b/src/main/java/org/springframework/data/elasticsearch/annotations/GeoPointField.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2013-2024 the original author or authors.
+ * Copyright 2013-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/annotations/GeoShapeField.java b/src/main/java/org/springframework/data/elasticsearch/annotations/GeoShapeField.java
index 0a3be4d2d6..0121b07ee1 100644
--- a/src/main/java/org/springframework/data/elasticsearch/annotations/GeoShapeField.java
+++ b/src/main/java/org/springframework/data/elasticsearch/annotations/GeoShapeField.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017-2024 the original author or authors.
+ * Copyright 2017-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/annotations/Highlight.java b/src/main/java/org/springframework/data/elasticsearch/annotations/Highlight.java
index 3b93f232d6..30312ab434 100644
--- a/src/main/java/org/springframework/data/elasticsearch/annotations/Highlight.java
+++ b/src/main/java/org/springframework/data/elasticsearch/annotations/Highlight.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2024 the original author or authors.
+ * Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/annotations/HighlightField.java b/src/main/java/org/springframework/data/elasticsearch/annotations/HighlightField.java
index 73063b3451..f6318be98a 100644
--- a/src/main/java/org/springframework/data/elasticsearch/annotations/HighlightField.java
+++ b/src/main/java/org/springframework/data/elasticsearch/annotations/HighlightField.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2024 the original author or authors.
+ * Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/annotations/HighlightParameters.java b/src/main/java/org/springframework/data/elasticsearch/annotations/HighlightParameters.java
index 530c813ca5..d4e8bbfd2b 100644
--- a/src/main/java/org/springframework/data/elasticsearch/annotations/HighlightParameters.java
+++ b/src/main/java/org/springframework/data/elasticsearch/annotations/HighlightParameters.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2024 the original author or authors.
+ * Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/annotations/IndexOptions.java b/src/main/java/org/springframework/data/elasticsearch/annotations/IndexOptions.java
index 89637309a9..2de226c7b1 100644
--- a/src/main/java/org/springframework/data/elasticsearch/annotations/IndexOptions.java
+++ b/src/main/java/org/springframework/data/elasticsearch/annotations/IndexOptions.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2019-2024 the original author or authors.
+ * Copyright 2019-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/annotations/IndexPrefixes.java b/src/main/java/org/springframework/data/elasticsearch/annotations/IndexPrefixes.java
index 76a481f735..01adc8fbb4 100644
--- a/src/main/java/org/springframework/data/elasticsearch/annotations/IndexPrefixes.java
+++ b/src/main/java/org/springframework/data/elasticsearch/annotations/IndexPrefixes.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2019-2024 the original author or authors.
+ * Copyright 2019-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/annotations/IndexedIndexName.java b/src/main/java/org/springframework/data/elasticsearch/annotations/IndexedIndexName.java
index 6fcb10213e..4d76b97492 100644
--- a/src/main/java/org/springframework/data/elasticsearch/annotations/IndexedIndexName.java
+++ b/src/main/java/org/springframework/data/elasticsearch/annotations/IndexedIndexName.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2023-2024 the original author or authors.
+ * Copyright 2023-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/annotations/InnerField.java b/src/main/java/org/springframework/data/elasticsearch/annotations/InnerField.java
index ceb6054119..1f5c8ee23d 100644
--- a/src/main/java/org/springframework/data/elasticsearch/annotations/InnerField.java
+++ b/src/main/java/org/springframework/data/elasticsearch/annotations/InnerField.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2014-2024 the original author or authors.
+ * Copyright 2014-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/annotations/JoinTypeRelation.java b/src/main/java/org/springframework/data/elasticsearch/annotations/JoinTypeRelation.java
index 4e544bd4c4..eb2e1e4623 100644
--- a/src/main/java/org/springframework/data/elasticsearch/annotations/JoinTypeRelation.java
+++ b/src/main/java/org/springframework/data/elasticsearch/annotations/JoinTypeRelation.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2024 the original author or authors.
+ * Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/annotations/JoinTypeRelations.java b/src/main/java/org/springframework/data/elasticsearch/annotations/JoinTypeRelations.java
index fb1be2b68c..2004200cf2 100644
--- a/src/main/java/org/springframework/data/elasticsearch/annotations/JoinTypeRelations.java
+++ b/src/main/java/org/springframework/data/elasticsearch/annotations/JoinTypeRelations.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2024 the original author or authors.
+ * Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/annotations/Mapping.java b/src/main/java/org/springframework/data/elasticsearch/annotations/Mapping.java
index 4146824cf0..c2d48c3884 100644
--- a/src/main/java/org/springframework/data/elasticsearch/annotations/Mapping.java
+++ b/src/main/java/org/springframework/data/elasticsearch/annotations/Mapping.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2014-2024 the original author or authors.
+ * Copyright 2014-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/annotations/MappingAlias.java b/src/main/java/org/springframework/data/elasticsearch/annotations/MappingAlias.java
index f71e664ee2..791659e9d5 100644
--- a/src/main/java/org/springframework/data/elasticsearch/annotations/MappingAlias.java
+++ b/src/main/java/org/springframework/data/elasticsearch/annotations/MappingAlias.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2024 the original author or authors.
+ * Copyright 2024-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/annotations/MultiField.java b/src/main/java/org/springframework/data/elasticsearch/annotations/MultiField.java
index 1523cd88ba..9dff38c1f1 100644
--- a/src/main/java/org/springframework/data/elasticsearch/annotations/MultiField.java
+++ b/src/main/java/org/springframework/data/elasticsearch/annotations/MultiField.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2014-2024 the original author or authors.
+ * Copyright 2014-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/annotations/NullValueType.java b/src/main/java/org/springframework/data/elasticsearch/annotations/NullValueType.java
index 8707def774..a131b12a8e 100644
--- a/src/main/java/org/springframework/data/elasticsearch/annotations/NullValueType.java
+++ b/src/main/java/org/springframework/data/elasticsearch/annotations/NullValueType.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2024 the original author or authors.
+ * Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/annotations/Query.java b/src/main/java/org/springframework/data/elasticsearch/annotations/Query.java
index f5746a3551..9f1b755c35 100644
--- a/src/main/java/org/springframework/data/elasticsearch/annotations/Query.java
+++ b/src/main/java/org/springframework/data/elasticsearch/annotations/Query.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2013-2024 the original author or authors.
+ * Copyright 2013-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/annotations/Setting.java b/src/main/java/org/springframework/data/elasticsearch/annotations/Setting.java
index 51f31b3b25..926154f1f2 100644
--- a/src/main/java/org/springframework/data/elasticsearch/annotations/Setting.java
+++ b/src/main/java/org/springframework/data/elasticsearch/annotations/Setting.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2014-2024 the original author or authors.
+ * Copyright 2014-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/annotations/Similarity.java b/src/main/java/org/springframework/data/elasticsearch/annotations/Similarity.java
index 143996ea54..46cafd91a2 100644
--- a/src/main/java/org/springframework/data/elasticsearch/annotations/Similarity.java
+++ b/src/main/java/org/springframework/data/elasticsearch/annotations/Similarity.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2019-2024 the original author or authors.
+ * Copyright 2019-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/annotations/SourceFilters.java b/src/main/java/org/springframework/data/elasticsearch/annotations/SourceFilters.java
index 73f434999a..055ecc616f 100644
--- a/src/main/java/org/springframework/data/elasticsearch/annotations/SourceFilters.java
+++ b/src/main/java/org/springframework/data/elasticsearch/annotations/SourceFilters.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2022-2024 the original author or authors.
+ * Copyright 2022-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/annotations/TermVector.java b/src/main/java/org/springframework/data/elasticsearch/annotations/TermVector.java
index 377ed9063a..25de2cbcad 100644
--- a/src/main/java/org/springframework/data/elasticsearch/annotations/TermVector.java
+++ b/src/main/java/org/springframework/data/elasticsearch/annotations/TermVector.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2019-2024 the original author or authors.
+ * Copyright 2019-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/annotations/ValueConverter.java b/src/main/java/org/springframework/data/elasticsearch/annotations/ValueConverter.java
index 5e07262799..eb848bfed2 100644
--- a/src/main/java/org/springframework/data/elasticsearch/annotations/ValueConverter.java
+++ b/src/main/java/org/springframework/data/elasticsearch/annotations/ValueConverter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -41,7 +41,7 @@
* Defines the class implementing the {@link PropertyValueConverter} interface. If this is a normal class, it must
* provide a default constructor with no arguments. If this is an enum and thus implementing a singleton by enum it
* must only have one enum value.
- *
+ *
* @return the class to use for conversion
*/
Class extends PropertyValueConverter> value();
diff --git a/src/main/java/org/springframework/data/elasticsearch/annotations/WriteOnlyProperty.java b/src/main/java/org/springframework/data/elasticsearch/annotations/WriteOnlyProperty.java
index 12ca0e1d22..7704450e26 100644
--- a/src/main/java/org/springframework/data/elasticsearch/annotations/WriteOnlyProperty.java
+++ b/src/main/java/org/springframework/data/elasticsearch/annotations/WriteOnlyProperty.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2022-2024 the original author or authors.
+ * Copyright 2022-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/annotations/WriteTypeHint.java b/src/main/java/org/springframework/data/elasticsearch/annotations/WriteTypeHint.java
index d62a704b7c..86a844cc18 100644
--- a/src/main/java/org/springframework/data/elasticsearch/annotations/WriteTypeHint.java
+++ b/src/main/java/org/springframework/data/elasticsearch/annotations/WriteTypeHint.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/aot/ElasticsearchAotPredicates.java b/src/main/java/org/springframework/data/elasticsearch/aot/ElasticsearchAotPredicates.java
index 165c390b37..c3921b8940 100644
--- a/src/main/java/org/springframework/data/elasticsearch/aot/ElasticsearchAotPredicates.java
+++ b/src/main/java/org/springframework/data/elasticsearch/aot/ElasticsearchAotPredicates.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2023-2024 the original author or authors.
+ * Copyright 2023-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/aot/SpringDataElasticsearchRuntimeHints.java b/src/main/java/org/springframework/data/elasticsearch/aot/SpringDataElasticsearchRuntimeHints.java
index 0dfbb146fa..f135eadddf 100644
--- a/src/main/java/org/springframework/data/elasticsearch/aot/SpringDataElasticsearchRuntimeHints.java
+++ b/src/main/java/org/springframework/data/elasticsearch/aot/SpringDataElasticsearchRuntimeHints.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2023-2024 the original author or authors.
+ * Copyright 2023-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/client/ClientConfiguration.java b/src/main/java/org/springframework/data/elasticsearch/client/ClientConfiguration.java
index ddc0710263..bbd7e360b1 100644
--- a/src/main/java/org/springframework/data/elasticsearch/client/ClientConfiguration.java
+++ b/src/main/java/org/springframework/data/elasticsearch/client/ClientConfiguration.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018-2024 the original author or authors.
+ * Copyright 2018-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/client/ClientConfigurationBuilder.java b/src/main/java/org/springframework/data/elasticsearch/client/ClientConfigurationBuilder.java
index 2eb55b7702..247bc9be9e 100644
--- a/src/main/java/org/springframework/data/elasticsearch/client/ClientConfigurationBuilder.java
+++ b/src/main/java/org/springframework/data/elasticsearch/client/ClientConfigurationBuilder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018-2024 the original author or authors.
+ * Copyright 2018-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/client/DefaultClientConfiguration.java b/src/main/java/org/springframework/data/elasticsearch/client/DefaultClientConfiguration.java
index e5f50ed0e4..d13f556c70 100644
--- a/src/main/java/org/springframework/data/elasticsearch/client/DefaultClientConfiguration.java
+++ b/src/main/java/org/springframework/data/elasticsearch/client/DefaultClientConfiguration.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018-2024 the original author or authors.
+ * Copyright 2018-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/client/ElasticsearchHost.java b/src/main/java/org/springframework/data/elasticsearch/client/ElasticsearchHost.java
index f422ecded2..014acb6328 100644
--- a/src/main/java/org/springframework/data/elasticsearch/client/ElasticsearchHost.java
+++ b/src/main/java/org/springframework/data/elasticsearch/client/ElasticsearchHost.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018-2024 the original author or authors.
+ * Copyright 2018-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/client/InetSocketAddressParser.java b/src/main/java/org/springframework/data/elasticsearch/client/InetSocketAddressParser.java
index e5d9cd1f2d..33f71a49ed 100644
--- a/src/main/java/org/springframework/data/elasticsearch/client/InetSocketAddressParser.java
+++ b/src/main/java/org/springframework/data/elasticsearch/client/InetSocketAddressParser.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018-2024 the original author or authors.
+ * Copyright 2018-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/client/NoReachableHostException.java b/src/main/java/org/springframework/data/elasticsearch/client/NoReachableHostException.java
index 2487768785..b8a560db63 100644
--- a/src/main/java/org/springframework/data/elasticsearch/client/NoReachableHostException.java
+++ b/src/main/java/org/springframework/data/elasticsearch/client/NoReachableHostException.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018-2024 the original author or authors.
+ * Copyright 2018-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/client/UnsupportedBackendOperation.java b/src/main/java/org/springframework/data/elasticsearch/client/UnsupportedBackendOperation.java
index 1268ff3262..0264b95c00 100644
--- a/src/main/java/org/springframework/data/elasticsearch/client/UnsupportedBackendOperation.java
+++ b/src/main/java/org/springframework/data/elasticsearch/client/UnsupportedBackendOperation.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2022-2024 the original author or authors.
+ * Copyright 2022-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/client/UnsupportedClientOperationException.java b/src/main/java/org/springframework/data/elasticsearch/client/UnsupportedClientOperationException.java
index 112a03c783..322646bc66 100644
--- a/src/main/java/org/springframework/data/elasticsearch/client/UnsupportedClientOperationException.java
+++ b/src/main/java/org/springframework/data/elasticsearch/client/UnsupportedClientOperationException.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2022-2024 the original author or authors.
+ * Copyright 2022-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/client/elc/AbstractQueryProcessor.java b/src/main/java/org/springframework/data/elasticsearch/client/elc/AbstractQueryProcessor.java
index e8fc6f8b19..d882ddb1ff 100644
--- a/src/main/java/org/springframework/data/elasticsearch/client/elc/AbstractQueryProcessor.java
+++ b/src/main/java/org/springframework/data/elasticsearch/client/elc/AbstractQueryProcessor.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2024 the original author or authors.
+ * Copyright 2024-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/client/elc/Aggregation.java b/src/main/java/org/springframework/data/elasticsearch/client/elc/Aggregation.java
index ab46cad895..23e2b6ae47 100644
--- a/src/main/java/org/springframework/data/elasticsearch/client/elc/Aggregation.java
+++ b/src/main/java/org/springframework/data/elasticsearch/client/elc/Aggregation.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2022-2024 the original author or authors.
+ * Copyright 2022-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/client/elc/AutoCloseableElasticsearchClient.java b/src/main/java/org/springframework/data/elasticsearch/client/elc/AutoCloseableElasticsearchClient.java
index fe6afc148c..1969915c74 100644
--- a/src/main/java/org/springframework/data/elasticsearch/client/elc/AutoCloseableElasticsearchClient.java
+++ b/src/main/java/org/springframework/data/elasticsearch/client/elc/AutoCloseableElasticsearchClient.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/client/elc/ChildTemplate.java b/src/main/java/org/springframework/data/elasticsearch/client/elc/ChildTemplate.java
index 633c858d46..4d3ebf5bd7 100644
--- a/src/main/java/org/springframework/data/elasticsearch/client/elc/ChildTemplate.java
+++ b/src/main/java/org/springframework/data/elasticsearch/client/elc/ChildTemplate.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/client/elc/ClusterTemplate.java b/src/main/java/org/springframework/data/elasticsearch/client/elc/ClusterTemplate.java
index 44f3f7a51b..fcba35fa7d 100644
--- a/src/main/java/org/springframework/data/elasticsearch/client/elc/ClusterTemplate.java
+++ b/src/main/java/org/springframework/data/elasticsearch/client/elc/ClusterTemplate.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/client/elc/CriteriaFilterProcessor.java b/src/main/java/org/springframework/data/elasticsearch/client/elc/CriteriaFilterProcessor.java
index 140f87ac54..702d8501b3 100644
--- a/src/main/java/org/springframework/data/elasticsearch/client/elc/CriteriaFilterProcessor.java
+++ b/src/main/java/org/springframework/data/elasticsearch/client/elc/CriteriaFilterProcessor.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/client/elc/CriteriaQueryException.java b/src/main/java/org/springframework/data/elasticsearch/client/elc/CriteriaQueryException.java
index 2d43553d55..cb6cccf973 100644
--- a/src/main/java/org/springframework/data/elasticsearch/client/elc/CriteriaQueryException.java
+++ b/src/main/java/org/springframework/data/elasticsearch/client/elc/CriteriaQueryException.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/client/elc/CriteriaQueryProcessor.java b/src/main/java/org/springframework/data/elasticsearch/client/elc/CriteriaQueryProcessor.java
index 435ba9a701..9745dd86e7 100644
--- a/src/main/java/org/springframework/data/elasticsearch/client/elc/CriteriaQueryProcessor.java
+++ b/src/main/java/org/springframework/data/elasticsearch/client/elc/CriteriaQueryProcessor.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/client/elc/DocumentAdapters.java b/src/main/java/org/springframework/data/elasticsearch/client/elc/DocumentAdapters.java
index 1b2dfadbb5..857a169487 100644
--- a/src/main/java/org/springframework/data/elasticsearch/client/elc/DocumentAdapters.java
+++ b/src/main/java/org/springframework/data/elasticsearch/client/elc/DocumentAdapters.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/client/elc/ElasticsearchAggregation.java b/src/main/java/org/springframework/data/elasticsearch/client/elc/ElasticsearchAggregation.java
index 4a4b442b11..828e81bf4b 100644
--- a/src/main/java/org/springframework/data/elasticsearch/client/elc/ElasticsearchAggregation.java
+++ b/src/main/java/org/springframework/data/elasticsearch/client/elc/ElasticsearchAggregation.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2022-2024 the original author or authors.
+ * Copyright 2022-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/client/elc/ElasticsearchAggregations.java b/src/main/java/org/springframework/data/elasticsearch/client/elc/ElasticsearchAggregations.java
index 10633a0ece..4f257c3e30 100644
--- a/src/main/java/org/springframework/data/elasticsearch/client/elc/ElasticsearchAggregations.java
+++ b/src/main/java/org/springframework/data/elasticsearch/client/elc/ElasticsearchAggregations.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/client/elc/ElasticsearchClientBeanDefinitionParser.java b/src/main/java/org/springframework/data/elasticsearch/client/elc/ElasticsearchClientBeanDefinitionParser.java
index 9bde4ada1a..dc1e0701d3 100644
--- a/src/main/java/org/springframework/data/elasticsearch/client/elc/ElasticsearchClientBeanDefinitionParser.java
+++ b/src/main/java/org/springframework/data/elasticsearch/client/elc/ElasticsearchClientBeanDefinitionParser.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2022-2024 the original author or authors.
+ * Copyright 2022-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/client/elc/ElasticsearchClientFactoryBean.java b/src/main/java/org/springframework/data/elasticsearch/client/elc/ElasticsearchClientFactoryBean.java
index d7e2aa10dc..dcb92f5cf6 100644
--- a/src/main/java/org/springframework/data/elasticsearch/client/elc/ElasticsearchClientFactoryBean.java
+++ b/src/main/java/org/springframework/data/elasticsearch/client/elc/ElasticsearchClientFactoryBean.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2022-2024 the original author or authors.
+ * Copyright 2022-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/client/elc/ElasticsearchClients.java b/src/main/java/org/springframework/data/elasticsearch/client/elc/ElasticsearchClients.java
index 85620fe20e..7f0a637173 100644
--- a/src/main/java/org/springframework/data/elasticsearch/client/elc/ElasticsearchClients.java
+++ b/src/main/java/org/springframework/data/elasticsearch/client/elc/ElasticsearchClients.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/client/elc/ElasticsearchConfiguration.java b/src/main/java/org/springframework/data/elasticsearch/client/elc/ElasticsearchConfiguration.java
index a0632d557f..6e3f46c0dc 100644
--- a/src/main/java/org/springframework/data/elasticsearch/client/elc/ElasticsearchConfiguration.java
+++ b/src/main/java/org/springframework/data/elasticsearch/client/elc/ElasticsearchConfiguration.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/client/elc/ElasticsearchExceptionTranslator.java b/src/main/java/org/springframework/data/elasticsearch/client/elc/ElasticsearchExceptionTranslator.java
index 5cdd90d0b1..224e9c671f 100644
--- a/src/main/java/org/springframework/data/elasticsearch/client/elc/ElasticsearchExceptionTranslator.java
+++ b/src/main/java/org/springframework/data/elasticsearch/client/elc/ElasticsearchExceptionTranslator.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/client/elc/ElasticsearchTemplate.java b/src/main/java/org/springframework/data/elasticsearch/client/elc/ElasticsearchTemplate.java
index 444d744abd..0fbe08ae20 100644
--- a/src/main/java/org/springframework/data/elasticsearch/client/elc/ElasticsearchTemplate.java
+++ b/src/main/java/org/springframework/data/elasticsearch/client/elc/ElasticsearchTemplate.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/client/elc/EntityAsMap.java b/src/main/java/org/springframework/data/elasticsearch/client/elc/EntityAsMap.java
index b014f89ec3..e54d13ea74 100644
--- a/src/main/java/org/springframework/data/elasticsearch/client/elc/EntityAsMap.java
+++ b/src/main/java/org/springframework/data/elasticsearch/client/elc/EntityAsMap.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/client/elc/HighlightQueryBuilder.java b/src/main/java/org/springframework/data/elasticsearch/client/elc/HighlightQueryBuilder.java
index 183d622baa..6ef0ea5060 100644
--- a/src/main/java/org/springframework/data/elasticsearch/client/elc/HighlightQueryBuilder.java
+++ b/src/main/java/org/springframework/data/elasticsearch/client/elc/HighlightQueryBuilder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2022-2024 the original author or authors.
+ * Copyright 2022-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/client/elc/IndicesTemplate.java b/src/main/java/org/springframework/data/elasticsearch/client/elc/IndicesTemplate.java
index ec6ea3914b..9d3050e3bb 100644
--- a/src/main/java/org/springframework/data/elasticsearch/client/elc/IndicesTemplate.java
+++ b/src/main/java/org/springframework/data/elasticsearch/client/elc/IndicesTemplate.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/client/elc/JsonUtils.java b/src/main/java/org/springframework/data/elasticsearch/client/elc/JsonUtils.java
index 801e727d0d..3260b5a79a 100644
--- a/src/main/java/org/springframework/data/elasticsearch/client/elc/JsonUtils.java
+++ b/src/main/java/org/springframework/data/elasticsearch/client/elc/JsonUtils.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/client/elc/NativeQuery.java b/src/main/java/org/springframework/data/elasticsearch/client/elc/NativeQuery.java
index 880cb7ae08..4da4e4f042 100644
--- a/src/main/java/org/springframework/data/elasticsearch/client/elc/NativeQuery.java
+++ b/src/main/java/org/springframework/data/elasticsearch/client/elc/NativeQuery.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,6 +16,7 @@
package org.springframework.data.elasticsearch.client.elc;
import co.elastic.clients.elasticsearch._types.KnnQuery;
+import co.elastic.clients.elasticsearch._types.KnnSearch;
import co.elastic.clients.elasticsearch._types.SortOptions;
import co.elastic.clients.elasticsearch._types.aggregations.Aggregation;
import co.elastic.clients.elasticsearch._types.query_dsl.Query;
@@ -54,6 +55,7 @@ public class NativeQuery extends BaseQuery {
private Map searchExtensions = Collections.emptyMap();
@Nullable private KnnQuery knnQuery;
+ @Nullable private List knnSearches = Collections.emptyList();
public NativeQuery(NativeQueryBuilder builder) {
super(builder);
@@ -71,6 +73,7 @@ public NativeQuery(NativeQueryBuilder builder) {
}
this.springDataQuery = builder.getSpringDataQuery();
this.knnQuery = builder.getKnnQuery();
+ this.knnSearches = builder.getKnnSearches();
}
public NativeQuery(@Nullable Query query) {
@@ -129,6 +132,14 @@ public KnnQuery getKnnQuery() {
return knnQuery;
}
+ /**
+ * @since 5.3.1
+ */
+ @Nullable
+ public List getKnnSearches() {
+ return knnSearches;
+ }
+
@Nullable
public org.springframework.data.elasticsearch.core.query.Query getSpringDataQuery() {
return springDataQuery;
diff --git a/src/main/java/org/springframework/data/elasticsearch/client/elc/NativeQueryBuilder.java b/src/main/java/org/springframework/data/elasticsearch/client/elc/NativeQueryBuilder.java
index d290dd7826..eb25bb3919 100644
--- a/src/main/java/org/springframework/data/elasticsearch/client/elc/NativeQueryBuilder.java
+++ b/src/main/java/org/springframework/data/elasticsearch/client/elc/NativeQueryBuilder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2022-2024 the original author or authors.
+ * Copyright 2022-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,6 +16,7 @@
package org.springframework.data.elasticsearch.client.elc;
import co.elastic.clients.elasticsearch._types.KnnQuery;
+import co.elastic.clients.elasticsearch._types.KnnSearch;
import co.elastic.clients.elasticsearch._types.SortOptions;
import co.elastic.clients.elasticsearch._types.aggregations.Aggregation;
import co.elastic.clients.elasticsearch._types.query_dsl.Query;
@@ -26,6 +27,7 @@
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
@@ -52,6 +54,7 @@ public class NativeQueryBuilder extends BaseQueryBuilder knnSearches = Collections.emptyList();
public NativeQueryBuilder() {}
@@ -92,6 +95,14 @@ public KnnQuery getKnnQuery() {
return knnQuery;
}
+ /**
+ * @since 5.3.1
+ */
+ @Nullable
+ public List getKnnSearches() {
+ return knnSearches;
+ }
+
@Nullable
public org.springframework.data.elasticsearch.core.query.Query getSpringDataQuery() {
return springDataQuery;
diff --git a/src/main/java/org/springframework/data/elasticsearch/client/elc/Queries.java b/src/main/java/org/springframework/data/elasticsearch/client/elc/Queries.java
index a0062bb9df..1d254cb273 100644
--- a/src/main/java/org/springframework/data/elasticsearch/client/elc/Queries.java
+++ b/src/main/java/org/springframework/data/elasticsearch/client/elc/Queries.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2022-2024 the original author or authors.
+ * Copyright 2022-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/client/elc/ReactiveChildTemplate.java b/src/main/java/org/springframework/data/elasticsearch/client/elc/ReactiveChildTemplate.java
index 60e02c1ba7..8cdd00cb05 100644
--- a/src/main/java/org/springframework/data/elasticsearch/client/elc/ReactiveChildTemplate.java
+++ b/src/main/java/org/springframework/data/elasticsearch/client/elc/ReactiveChildTemplate.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/client/elc/ReactiveClusterTemplate.java b/src/main/java/org/springframework/data/elasticsearch/client/elc/ReactiveClusterTemplate.java
index b3b0acda05..3207fd5117 100644
--- a/src/main/java/org/springframework/data/elasticsearch/client/elc/ReactiveClusterTemplate.java
+++ b/src/main/java/org/springframework/data/elasticsearch/client/elc/ReactiveClusterTemplate.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/client/elc/ReactiveElasticsearchClient.java b/src/main/java/org/springframework/data/elasticsearch/client/elc/ReactiveElasticsearchClient.java
index e998faf4b5..4fdd1ae831 100644
--- a/src/main/java/org/springframework/data/elasticsearch/client/elc/ReactiveElasticsearchClient.java
+++ b/src/main/java/org/springframework/data/elasticsearch/client/elc/ReactiveElasticsearchClient.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/client/elc/ReactiveElasticsearchClusterClient.java b/src/main/java/org/springframework/data/elasticsearch/client/elc/ReactiveElasticsearchClusterClient.java
index bbe1177a9f..5d4fbcef10 100644
--- a/src/main/java/org/springframework/data/elasticsearch/client/elc/ReactiveElasticsearchClusterClient.java
+++ b/src/main/java/org/springframework/data/elasticsearch/client/elc/ReactiveElasticsearchClusterClient.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/client/elc/ReactiveElasticsearchConfiguration.java b/src/main/java/org/springframework/data/elasticsearch/client/elc/ReactiveElasticsearchConfiguration.java
index 6117f28305..670b83fa69 100644
--- a/src/main/java/org/springframework/data/elasticsearch/client/elc/ReactiveElasticsearchConfiguration.java
+++ b/src/main/java/org/springframework/data/elasticsearch/client/elc/ReactiveElasticsearchConfiguration.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/client/elc/ReactiveElasticsearchIndicesClient.java b/src/main/java/org/springframework/data/elasticsearch/client/elc/ReactiveElasticsearchIndicesClient.java
index f274f7c66b..50b8594237 100644
--- a/src/main/java/org/springframework/data/elasticsearch/client/elc/ReactiveElasticsearchIndicesClient.java
+++ b/src/main/java/org/springframework/data/elasticsearch/client/elc/ReactiveElasticsearchIndicesClient.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/client/elc/ReactiveElasticsearchTemplate.java b/src/main/java/org/springframework/data/elasticsearch/client/elc/ReactiveElasticsearchTemplate.java
index 12f1a59ee0..f20a513842 100644
--- a/src/main/java/org/springframework/data/elasticsearch/client/elc/ReactiveElasticsearchTemplate.java
+++ b/src/main/java/org/springframework/data/elasticsearch/client/elc/ReactiveElasticsearchTemplate.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -395,7 +395,28 @@ private Flux doFindUnbounded(Query query, Class> clazz, IndexC
Function>> resourceClosure = psa -> {
baseQuery.setPointInTime(new Query.PointInTime(psa.getPit(), pitKeepAlive));
- baseQuery.addSort(Sort.by("_shard_doc"));
+
+ // only add _shard_doc if there is not a field_collapse and a sort with the same name
+ boolean addShardDoc = true;
+
+ if (query instanceof NativeQuery nativeQuery && nativeQuery.getFieldCollapse() != null) {
+ var field = nativeQuery.getFieldCollapse().field();
+
+ if (nativeQuery.getSortOptions().stream()
+ .anyMatch(sortOptions -> sortOptions.isField() && sortOptions.field().field().equals(field))) {
+ addShardDoc = false;
+ }
+
+ if (query.getSort() != null
+ && query.getSort().stream().anyMatch(order -> order.getProperty().equals(field))) {
+ addShardDoc = false;
+ }
+ }
+
+ if (addShardDoc) {
+ baseQuery.addSort(Sort.by("_shard_doc"));
+ }
+
SearchRequest firstSearchRequest = requestConverter.searchRequest(baseQuery, routingResolver.getRouting(),
clazz, index, false, true);
diff --git a/src/main/java/org/springframework/data/elasticsearch/client/elc/ReactiveIndicesTemplate.java b/src/main/java/org/springframework/data/elasticsearch/client/elc/ReactiveIndicesTemplate.java
index 82f21f1072..f280077384 100644
--- a/src/main/java/org/springframework/data/elasticsearch/client/elc/ReactiveIndicesTemplate.java
+++ b/src/main/java/org/springframework/data/elasticsearch/client/elc/ReactiveIndicesTemplate.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/client/elc/RequestConverter.java b/src/main/java/org/springframework/data/elasticsearch/client/elc/RequestConverter.java
index c0fa6d9325..db13ee24bc 100644
--- a/src/main/java/org/springframework/data/elasticsearch/client/elc/RequestConverter.java
+++ b/src/main/java/org/springframework/data/elasticsearch/client/elc/RequestConverter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -1021,6 +1021,9 @@ public DeleteByQueryRequest documentDeleteByQueryRequest(DeleteQuery query, @Nul
.collect(Collectors.toList()));
}
}
+ if (query.getRefresh() != null) {
+ dqb.refresh(query.getRefresh());
+ }
dqb.allowNoIndices(query.getAllowNoIndices())
.conflicts(conflicts(query.getConflicts()))
.ignoreUnavailable(query.getIgnoreUnavailable())
@@ -1266,11 +1269,15 @@ public MsearchRequest searchMsearchRequest(
.timeout(timeStringMs(query.getTimeout())) //
;
- if (query.getPageable().isPaged()) {
- bb //
- .from((int) query.getPageable().getOffset()) //
- .size(query.getPageable().getPageSize());
- }
+ var offset = query.getPageable().isPaged() ? query.getPageable().getOffset() : 0;
+ var pageSize = query.getPageable().isPaged() ? query.getPageable().getPageSize()
+ : INDEX_MAX_RESULT_WINDOW;
+ // if we have both a page size and a max results, we take the min, this is necessary for
+ // searchForStream to work correctly (#3098) as there the page size defines what is
+ // returned in a single request, and the max result determines the total number of
+ // documents returned
+ var size = query.isLimiting() ? Math.min(pageSize, query.getMaxResults()) : pageSize;
+ bb.from((int) offset).size(size);
if (!isEmpty(query.getFields())) {
bb.fields(fb -> {
@@ -1283,10 +1290,6 @@ public MsearchRequest searchMsearchRequest(
bb.storedFields(query.getStoredFields());
}
- if (query.isLimiting()) {
- bb.size(query.getMaxResults());
- }
-
if (query.getMinScore() > 0) {
bb.minScore((double) query.getMinScore());
}
@@ -1440,13 +1443,14 @@ private void prepareSearchRequest(Query query, @Nullable String routing, @Nu
builder.seqNoPrimaryTerm(true);
}
- if (query.getPageable().isPaged()) {
- builder //
- .from((int) query.getPageable().getOffset()) //
- .size(query.getPageable().getPageSize());
- } else {
- builder.from(0).size(INDEX_MAX_RESULT_WINDOW);
- }
+ var offset = query.getPageable().isPaged() ? query.getPageable().getOffset() : 0;
+ var pageSize = query.getPageable().isPaged() ? query.getPageable().getPageSize() : INDEX_MAX_RESULT_WINDOW;
+ // if we have both a page size and a max results, we take the min, this is necessary for
+ // searchForStream to work correctly (#3098) as there the page size defines what is
+ // returned in a single request, and the max result determines the total number of
+ // documents returned
+ var size = query.isLimiting() ? Math.min(pageSize, query.getMaxResults()) : pageSize;
+ builder.from((int) offset).size(size);
if (!isEmpty(query.getFields())) {
var fieldAndFormats = query.getFields().stream().map(field -> FieldAndFormat.of(b -> b.field(field))).toList();
@@ -1461,10 +1465,6 @@ private void prepareSearchRequest(Query query, @Nullable String routing, @Nu
addIndicesOptions(builder, query.getIndicesOptions());
}
- if (query.isLimiting()) {
- builder.size(query.getMaxResults());
- }
-
if (query.getMinScore() > 0) {
builder.minScore((double) query.getMinScore());
}
@@ -1477,8 +1477,8 @@ private void prepareSearchRequest(Query query, @Nullable String routing, @Nu
if (query instanceof NativeQuery nativeQuery) {
prepareNativeSearch(nativeQuery, builder);
}
- // query.getSort() must be checked after prepareNativeSearch as this already might hav a sort set that must have
- // higher priority
+ // query.getSort() must be checked after prepareNativeSearch as this already might have a sort set
+ // that must have higher priority
if (query.getSort() != null) {
List sortOptions = getSortOptions(query.getSort(), persistentEntity);
@@ -1500,7 +1500,15 @@ private void prepareSearchRequest(Query query, @Nullable String routing, @Nu
}
if (!isEmpty(query.getSearchAfter())) {
- builder.searchAfter(query.getSearchAfter().stream().map(TypeUtils::toFieldValue).toList());
+ var fieldValues = query.getSearchAfter().stream().map(TypeUtils::toFieldValue).toList();
+
+ // when there is a field collapse on a native query, and we have a search_after, then the search_after
+ // must only have one entry
+ if (query instanceof NativeQuery nativeQuery && nativeQuery.getFieldCollapse() != null) {
+ builder.searchAfter(fieldValues.get(0));
+ } else {
+ builder.searchAfter(fieldValues);
+ }
}
query.getRescorerQueries().forEach(rescorerQuery -> builder.rescore(getRescore(rescorerQuery)));
@@ -1719,7 +1727,18 @@ private void prepareNativeSearch(NativeQuery query, SearchRequest.Builder builde
;
if (query.getKnnQuery() != null) {
- builder.knn(query.getKnnQuery());
+ var kq = query.getKnnQuery();
+ builder.knn(ksb -> ksb
+ .field(kq.field())
+ .queryVector(kq.queryVector())
+ .numCandidates(kq.numCandidates())
+ .filter(kq.filter())
+ .similarity(kq.similarity()));
+
+ }
+
+ if (!isEmpty(query.getKnnSearches())) {
+ builder.knn(query.getKnnSearches());
}
if (!isEmpty(query.getAggregations())) {
@@ -1740,7 +1759,18 @@ private void prepareNativeSearch(NativeQuery query, MultisearchBody.Builder buil
.sort(query.getSortOptions());
if (query.getKnnQuery() != null) {
- builder.knn(query.getKnnQuery());
+ var kq = query.getKnnQuery();
+ builder.knn(ksb -> ksb
+ .field(kq.field())
+ .queryVector(kq.queryVector())
+ .numCandidates(kq.numCandidates())
+ .filter(kq.filter())
+ .similarity(kq.similarity()));
+
+ }
+
+ if (!isEmpty(query.getKnnSearches())) {
+ builder.knn(query.getKnnSearches());
}
if (!isEmpty(query.getAggregations())) {
diff --git a/src/main/java/org/springframework/data/elasticsearch/client/elc/ResponseConverter.java b/src/main/java/org/springframework/data/elasticsearch/client/elc/ResponseConverter.java
index 1dada5d11f..1e9ce8da2a 100644
--- a/src/main/java/org/springframework/data/elasticsearch/client/elc/ResponseConverter.java
+++ b/src/main/java/org/springframework/data/elasticsearch/client/elc/ResponseConverter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -497,6 +497,10 @@ public ByQueryResponse byQueryResponse(UpdateByQueryResponse response) {
builder.withDeleted(response.deleted());
}
+ if(response.updated() != null) {
+ builder.withUpdated(response.updated());
+ }
+
if (response.batches() != null) {
builder.withBatches(Math.toIntExact(response.batches()));
}
diff --git a/src/main/java/org/springframework/data/elasticsearch/client/elc/SearchDocumentResponseBuilder.java b/src/main/java/org/springframework/data/elasticsearch/client/elc/SearchDocumentResponseBuilder.java
index 2ced82f2dd..ffffdbd2df 100644
--- a/src/main/java/org/springframework/data/elasticsearch/client/elc/SearchDocumentResponseBuilder.java
+++ b/src/main/java/org/springframework/data/elasticsearch/client/elc/SearchDocumentResponseBuilder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/client/elc/TypeUtils.java b/src/main/java/org/springframework/data/elasticsearch/client/elc/TypeUtils.java
index 62bb4eefde..43747f3a7a 100644
--- a/src/main/java/org/springframework/data/elasticsearch/client/elc/TypeUtils.java
+++ b/src/main/java/org/springframework/data/elasticsearch/client/elc/TypeUtils.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2022-2024 the original author or authors.
+ * Copyright 2022-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/client/elc/aot/ElasticsearchClientRuntimeHints.java b/src/main/java/org/springframework/data/elasticsearch/client/elc/aot/ElasticsearchClientRuntimeHints.java
index 41beee7048..47fb2a8e14 100644
--- a/src/main/java/org/springframework/data/elasticsearch/client/elc/aot/ElasticsearchClientRuntimeHints.java
+++ b/src/main/java/org/springframework/data/elasticsearch/client/elc/aot/ElasticsearchClientRuntimeHints.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2023-2024 the original author or authors.
+ * Copyright 2023-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/client/elc/package-info.java b/src/main/java/org/springframework/data/elasticsearch/client/elc/package-info.java
index 2b9dc4c08a..8dc2f99df0 100644
--- a/src/main/java/org/springframework/data/elasticsearch/client/elc/package-info.java
+++ b/src/main/java/org/springframework/data/elasticsearch/client/elc/package-info.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2022-2024 the original author or authors.
+ * Copyright 2022-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/client/util/ScrollState.java b/src/main/java/org/springframework/data/elasticsearch/client/util/ScrollState.java
index ddb7151ce0..f901706c19 100644
--- a/src/main/java/org/springframework/data/elasticsearch/client/util/ScrollState.java
+++ b/src/main/java/org/springframework/data/elasticsearch/client/util/ScrollState.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2024 the original author or authors.
+ * Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/config/ElasticsearchAuditingBeanDefinitionParser.java b/src/main/java/org/springframework/data/elasticsearch/config/ElasticsearchAuditingBeanDefinitionParser.java
index a730003aef..9152ed57bd 100644
--- a/src/main/java/org/springframework/data/elasticsearch/config/ElasticsearchAuditingBeanDefinitionParser.java
+++ b/src/main/java/org/springframework/data/elasticsearch/config/ElasticsearchAuditingBeanDefinitionParser.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2024 the original author or authors.
+ * Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/config/ElasticsearchAuditingRegistrar.java b/src/main/java/org/springframework/data/elasticsearch/config/ElasticsearchAuditingRegistrar.java
index 018079155c..c77af25f1d 100644
--- a/src/main/java/org/springframework/data/elasticsearch/config/ElasticsearchAuditingRegistrar.java
+++ b/src/main/java/org/springframework/data/elasticsearch/config/ElasticsearchAuditingRegistrar.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2024 the original author or authors.
+ * Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/config/ElasticsearchConfigurationSupport.java b/src/main/java/org/springframework/data/elasticsearch/config/ElasticsearchConfigurationSupport.java
index 1010ad4406..4a8d78b69b 100644
--- a/src/main/java/org/springframework/data/elasticsearch/config/ElasticsearchConfigurationSupport.java
+++ b/src/main/java/org/springframework/data/elasticsearch/config/ElasticsearchConfigurationSupport.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018-2024 the original author or authors.
+ * Copyright 2018-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/config/ElasticsearchNamespaceHandler.java b/src/main/java/org/springframework/data/elasticsearch/config/ElasticsearchNamespaceHandler.java
index 9cc4ea4618..f7304fb563 100644
--- a/src/main/java/org/springframework/data/elasticsearch/config/ElasticsearchNamespaceHandler.java
+++ b/src/main/java/org/springframework/data/elasticsearch/config/ElasticsearchNamespaceHandler.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2013-2024 the original author or authors.
+ * Copyright 2013-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/config/EnableElasticsearchAuditing.java b/src/main/java/org/springframework/data/elasticsearch/config/EnableElasticsearchAuditing.java
index 2b17fe53d3..7a416e548d 100644
--- a/src/main/java/org/springframework/data/elasticsearch/config/EnableElasticsearchAuditing.java
+++ b/src/main/java/org/springframework/data/elasticsearch/config/EnableElasticsearchAuditing.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2024 the original author or authors.
+ * Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/config/EnableReactiveElasticsearchAuditing.java b/src/main/java/org/springframework/data/elasticsearch/config/EnableReactiveElasticsearchAuditing.java
index 02df6aecf9..804dd09e32 100644
--- a/src/main/java/org/springframework/data/elasticsearch/config/EnableReactiveElasticsearchAuditing.java
+++ b/src/main/java/org/springframework/data/elasticsearch/config/EnableReactiveElasticsearchAuditing.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2024 the original author or authors.
+ * Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/config/PersistentEntitiesFactoryBean.java b/src/main/java/org/springframework/data/elasticsearch/config/PersistentEntitiesFactoryBean.java
index 5a87309869..6bc684111b 100644
--- a/src/main/java/org/springframework/data/elasticsearch/config/PersistentEntitiesFactoryBean.java
+++ b/src/main/java/org/springframework/data/elasticsearch/config/PersistentEntitiesFactoryBean.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2024 the original author or authors.
+ * Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/config/ReactiveElasticsearchAuditingRegistrar.java b/src/main/java/org/springframework/data/elasticsearch/config/ReactiveElasticsearchAuditingRegistrar.java
index cecb2fe742..a25b6ba1aa 100644
--- a/src/main/java/org/springframework/data/elasticsearch/config/ReactiveElasticsearchAuditingRegistrar.java
+++ b/src/main/java/org/springframework/data/elasticsearch/config/ReactiveElasticsearchAuditingRegistrar.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2024 the original author or authors.
+ * Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/AbstractElasticsearchTemplate.java b/src/main/java/org/springframework/data/elasticsearch/core/AbstractElasticsearchTemplate.java
index 4275e17f8b..387d26e6bb 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/AbstractElasticsearchTemplate.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/AbstractElasticsearchTemplate.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2019-2024 the original author or authors.
+ * Copyright 2019-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/AbstractReactiveElasticsearchTemplate.java b/src/main/java/org/springframework/data/elasticsearch/core/AbstractReactiveElasticsearchTemplate.java
index 96e9018c39..1639b2e5c6 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/AbstractReactiveElasticsearchTemplate.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/AbstractReactiveElasticsearchTemplate.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -233,6 +233,7 @@ public Flux save(Flux entities, IndexCoordinates index, int bulkSize)
.subscribe(new Subscriber<>() {
@Nullable private Subscription subscription = null;
private final AtomicBoolean upstreamComplete = new AtomicBoolean(false);
+ private final AtomicBoolean onNextHasBeenCalled = new AtomicBoolean(false);
@Override
public void onSubscribe(Subscription subscription) {
@@ -242,6 +243,7 @@ public void onSubscribe(Subscription subscription) {
@Override
public void onNext(List entityList) {
+ onNextHasBeenCalled.set(true);
saveAll(entityList, index)
.map(sink::tryEmitNext)
.doOnComplete(() -> {
@@ -267,6 +269,10 @@ public void onError(Throwable throwable) {
@Override
public void onComplete() {
upstreamComplete.set(true);
+ if (!onNextHasBeenCalled.get()) {
+ // this happens when an empty flux is saved
+ sink.tryEmitComplete();
+ }
}
});
return sink.asFlux();
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/ActiveShardCount.java b/src/main/java/org/springframework/data/elasticsearch/core/ActiveShardCount.java
index 4751c9322d..8b1a9c47df 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/ActiveShardCount.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/ActiveShardCount.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/AggregationContainer.java b/src/main/java/org/springframework/data/elasticsearch/core/AggregationContainer.java
index fa35a78d8b..2cf49b3f6f 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/AggregationContainer.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/AggregationContainer.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/AggregationsContainer.java b/src/main/java/org/springframework/data/elasticsearch/core/AggregationsContainer.java
index e6e3d0d731..d201d9ed81 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/AggregationsContainer.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/AggregationsContainer.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/DocumentOperations.java b/src/main/java/org/springframework/data/elasticsearch/core/DocumentOperations.java
index 1dd0005433..84f855ef57 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/DocumentOperations.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/DocumentOperations.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2019-2024 the original author or authors.
+ * Copyright 2019-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/ElasticsearchOperations.java b/src/main/java/org/springframework/data/elasticsearch/core/ElasticsearchOperations.java
index 3248868920..4f90760900 100755
--- a/src/main/java/org/springframework/data/elasticsearch/core/ElasticsearchOperations.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/ElasticsearchOperations.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2013-2024 the original author or authors.
+ * Copyright 2013-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/EntityOperations.java b/src/main/java/org/springframework/data/elasticsearch/core/EntityOperations.java
index afc048d3d2..07a7e61d10 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/EntityOperations.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/EntityOperations.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018-2024 the original author or authors.
+ * Copyright 2018-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/IndexInformation.java b/src/main/java/org/springframework/data/elasticsearch/core/IndexInformation.java
index f6ed2269a8..11b03cadfd 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/IndexInformation.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/IndexInformation.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/IndexOperations.java b/src/main/java/org/springframework/data/elasticsearch/core/IndexOperations.java
index d09fb3861f..d7e583a4dd 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/IndexOperations.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/IndexOperations.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2019-2024 the original author or authors.
+ * Copyright 2019-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/IndexOperationsAdapter.java b/src/main/java/org/springframework/data/elasticsearch/core/IndexOperationsAdapter.java
index 397f5146d5..b8c1d371a3 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/IndexOperationsAdapter.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/IndexOperationsAdapter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2023-2024 the original author or authors.
+ * Copyright 2023-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/IndexedObjectInformation.java b/src/main/java/org/springframework/data/elasticsearch/core/IndexedObjectInformation.java
index 1b4e34ad9e..6bd25bc88e 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/IndexedObjectInformation.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/IndexedObjectInformation.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2024 the original author or authors.
+ * Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/MultiGetItem.java b/src/main/java/org/springframework/data/elasticsearch/core/MultiGetItem.java
index 827ea83acf..ad7795e664 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/MultiGetItem.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/MultiGetItem.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/ReactiveDocumentOperations.java b/src/main/java/org/springframework/data/elasticsearch/core/ReactiveDocumentOperations.java
index f5b191501c..4614f6d25c 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/ReactiveDocumentOperations.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/ReactiveDocumentOperations.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2019-2024 the original author or authors.
+ * Copyright 2019-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchOperations.java b/src/main/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchOperations.java
index 7be0efe444..e4904e05ef 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchOperations.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchOperations.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018-2024 the original author or authors.
+ * Copyright 2018-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/ReactiveIndexOperations.java b/src/main/java/org/springframework/data/elasticsearch/core/ReactiveIndexOperations.java
index a4cc50c222..1c9a28c71c 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/ReactiveIndexOperations.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/ReactiveIndexOperations.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2024 the original author or authors.
+ * Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/ReactiveResourceUtil.java b/src/main/java/org/springframework/data/elasticsearch/core/ReactiveResourceUtil.java
index 56671cd059..ddbc0d61cc 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/ReactiveResourceUtil.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/ReactiveResourceUtil.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2024 the original author or authors.
+ * Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/ReactiveSearchHitSupport.java b/src/main/java/org/springframework/data/elasticsearch/core/ReactiveSearchHitSupport.java
index f8d84b7434..95a431e653 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/ReactiveSearchHitSupport.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/ReactiveSearchHitSupport.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/ReactiveSearchHits.java b/src/main/java/org/springframework/data/elasticsearch/core/ReactiveSearchHits.java
index d382cc0e77..c0d8ae197b 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/ReactiveSearchHits.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/ReactiveSearchHits.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/ReactiveSearchHitsImpl.java b/src/main/java/org/springframework/data/elasticsearch/core/ReactiveSearchHitsImpl.java
index 84c25d776e..05d13a781a 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/ReactiveSearchHitsImpl.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/ReactiveSearchHitsImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/ReactiveSearchOperations.java b/src/main/java/org/springframework/data/elasticsearch/core/ReactiveSearchOperations.java
index 1f533b60f1..b620f4c58c 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/ReactiveSearchOperations.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/ReactiveSearchOperations.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2019-2024 the original author or authors.
+ * Copyright 2019-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/RefreshPolicy.java b/src/main/java/org/springframework/data/elasticsearch/core/RefreshPolicy.java
index 356a67d8a5..44e237720b 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/RefreshPolicy.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/RefreshPolicy.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2024 the original author or authors.
+ * Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/ResourceUtil.java b/src/main/java/org/springframework/data/elasticsearch/core/ResourceUtil.java
index 83184645bd..93530c5339 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/ResourceUtil.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/ResourceUtil.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2019-2024 the original author or authors.
+ * Copyright 2019-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/SearchHit.java b/src/main/java/org/springframework/data/elasticsearch/core/SearchHit.java
index a811d6f093..238d90b213 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/SearchHit.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/SearchHit.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2019-2024 the original author or authors.
+ * Copyright 2019-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/SearchHitMapping.java b/src/main/java/org/springframework/data/elasticsearch/core/SearchHitMapping.java
index 42fa2da496..2cd4330df6 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/SearchHitMapping.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/SearchHitMapping.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2024 the original author or authors.
+ * Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/SearchHitSupport.java b/src/main/java/org/springframework/data/elasticsearch/core/SearchHitSupport.java
index 2be5af5665..d4e8b04413 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/SearchHitSupport.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/SearchHitSupport.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2019-2024 the original author or authors.
+ * Copyright 2019-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/SearchHits.java b/src/main/java/org/springframework/data/elasticsearch/core/SearchHits.java
index 023775af84..6e56d38e8e 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/SearchHits.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/SearchHits.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2024 the original author or authors.
+ * Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/SearchHitsImpl.java b/src/main/java/org/springframework/data/elasticsearch/core/SearchHitsImpl.java
index fda8e8a302..9cc24bc1e1 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/SearchHitsImpl.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/SearchHitsImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2019-2024 the original author or authors.
+ * Copyright 2019-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/SearchHitsIterator.java b/src/main/java/org/springframework/data/elasticsearch/core/SearchHitsIterator.java
index 5246903f4a..1a22c80972 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/SearchHitsIterator.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/SearchHitsIterator.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2024 the original author or authors.
+ * Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/SearchOperations.java b/src/main/java/org/springframework/data/elasticsearch/core/SearchOperations.java
index f92bcc19ca..934737dd5c 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/SearchOperations.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/SearchOperations.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2019-2024 the original author or authors.
+ * Copyright 2019-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/SearchPage.java b/src/main/java/org/springframework/data/elasticsearch/core/SearchPage.java
index fd07115aa0..54089e2a40 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/SearchPage.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/SearchPage.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2024 the original author or authors.
+ * Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/SearchScrollHits.java b/src/main/java/org/springframework/data/elasticsearch/core/SearchScrollHits.java
index 463ddf6b55..7a47e3e6c8 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/SearchScrollHits.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/SearchScrollHits.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2024 the original author or authors.
+ * Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,7 +21,7 @@
* This interface is used to expose the current {@code scrollId} from the underlying scroll context.
*
* Internal use only.
- *
+ *
* @author Sascha Woo
* @author Peter-Josef Meisch
* @param
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/SearchShardStatistics.java b/src/main/java/org/springframework/data/elasticsearch/core/SearchShardStatistics.java
index 10ddcdd94e..293d2e7a0b 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/SearchShardStatistics.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/SearchShardStatistics.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2023-2024 the original author or authors.
+ * Copyright 2023-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/StreamQueries.java b/src/main/java/org/springframework/data/elasticsearch/core/StreamQueries.java
index 5c9a04a566..5588489aa5 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/StreamQueries.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/StreamQueries.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2019-2024 the original author or authors.
+ * Copyright 2019-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/TotalHitsRelation.java b/src/main/java/org/springframework/data/elasticsearch/core/TotalHitsRelation.java
index c82520223b..33e2449b02 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/TotalHitsRelation.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/TotalHitsRelation.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2024 the original author or authors.
+ * Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/cluster/ClusterHealth.java b/src/main/java/org/springframework/data/elasticsearch/core/cluster/ClusterHealth.java
index 8d79e1df4b..70ab96571f 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/cluster/ClusterHealth.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/cluster/ClusterHealth.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/cluster/ClusterOperations.java b/src/main/java/org/springframework/data/elasticsearch/core/cluster/ClusterOperations.java
index aa535d76ad..c35c7c449b 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/cluster/ClusterOperations.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/cluster/ClusterOperations.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/cluster/ReactiveClusterOperations.java b/src/main/java/org/springframework/data/elasticsearch/core/cluster/ReactiveClusterOperations.java
index 279a4be763..ca0feddb11 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/cluster/ReactiveClusterOperations.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/cluster/ReactiveClusterOperations.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/convert/AbstractPropertyValueConverter.java b/src/main/java/org/springframework/data/elasticsearch/core/convert/AbstractPropertyValueConverter.java
index 08f8b52d8a..153a6feb16 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/convert/AbstractPropertyValueConverter.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/convert/AbstractPropertyValueConverter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/convert/AbstractRangePropertyValueConverter.java b/src/main/java/org/springframework/data/elasticsearch/core/convert/AbstractRangePropertyValueConverter.java
index fb05f4cb35..87606763bd 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/convert/AbstractRangePropertyValueConverter.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/convert/AbstractRangePropertyValueConverter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/convert/ConversionException.java b/src/main/java/org/springframework/data/elasticsearch/core/convert/ConversionException.java
index a626fbbe97..c5ad77bdde 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/convert/ConversionException.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/convert/ConversionException.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2019-2024 the original author or authors.
+ * Copyright 2019-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/convert/DateFormatter.java b/src/main/java/org/springframework/data/elasticsearch/core/convert/DateFormatter.java
index c163b31cd0..f208349613 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/convert/DateFormatter.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/convert/DateFormatter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,14 +19,14 @@
/**
* Interface to convert from and to {@link TemporalAccessor}s.
- *
+ *
* @author Peter-Josef Meisch
* @since 4.2
*/
public interface DateFormatter {
/**
* Formats a {@link TemporalAccessor} into a String.
- *
+ *
* @param accessor must not be {@literal null}
* @return the formatted String
*/
@@ -34,7 +34,7 @@ public interface DateFormatter {
/**
* Parses a String into a {@link TemporalAccessor}.
- *
+ *
* @param input the String to parse, must not be {@literal null}
* @param type the class of T
* @param the {@link TemporalAccessor} implementation
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/convert/DatePropertyValueConverter.java b/src/main/java/org/springframework/data/elasticsearch/core/convert/DatePropertyValueConverter.java
index 0af0cfa78f..2696633d14 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/convert/DatePropertyValueConverter.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/convert/DatePropertyValueConverter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/convert/DateRangePropertyValueConverter.java b/src/main/java/org/springframework/data/elasticsearch/core/convert/DateRangePropertyValueConverter.java
index 11c84f3ee0..2c87322878 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/convert/DateRangePropertyValueConverter.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/convert/DateRangePropertyValueConverter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/convert/DefaultElasticsearchTypeMapper.java b/src/main/java/org/springframework/data/elasticsearch/core/convert/DefaultElasticsearchTypeMapper.java
index a2ab473c25..9fc8532e87 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/convert/DefaultElasticsearchTypeMapper.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/convert/DefaultElasticsearchTypeMapper.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2019-2024 the original author or authors.
+ * Copyright 2019-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchConverter.java b/src/main/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchConverter.java
index 587540c6d7..8e13005478 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchConverter.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchConverter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2013-2024 the original author or authors.
+ * Copyright 2013-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchCustomConversions.java b/src/main/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchCustomConversions.java
index c79520c46a..a573523b26 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchCustomConversions.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchCustomConversions.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018-2024 the original author or authors.
+ * Copyright 2018-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverter.java b/src/main/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverter.java
index 5661f22245..9c5800b093 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverter.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2019-2024 the original author or authors.
+ * Copyright 2019-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchTypeMapper.java b/src/main/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchTypeMapper.java
index 331c6ac1c1..dc6a54f37a 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchTypeMapper.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchTypeMapper.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2019-2024 the original author or authors.
+ * Copyright 2019-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/convert/GeoConverters.java b/src/main/java/org/springframework/data/elasticsearch/core/convert/GeoConverters.java
index b48654d614..b6ad5b4ede 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/convert/GeoConverters.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/convert/GeoConverters.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2019-2024 the original author or authors.
+ * Copyright 2019-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/convert/MappingConversionException.java b/src/main/java/org/springframework/data/elasticsearch/core/convert/MappingConversionException.java
index 7f6cd7b59e..9b06cc3f64 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/convert/MappingConversionException.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/convert/MappingConversionException.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2024 the original author or authors.
+ * Copyright 2024-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/convert/MappingElasticsearchConverter.java b/src/main/java/org/springframework/data/elasticsearch/core/convert/MappingElasticsearchConverter.java
index ccac971fd1..c236a45861 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/convert/MappingElasticsearchConverter.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/convert/MappingElasticsearchConverter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2013-2024 the original author or authors.
+ * Copyright 2013-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -38,6 +38,7 @@
import org.springframework.core.env.EnvironmentCapable;
import org.springframework.core.env.StandardEnvironment;
import org.springframework.data.convert.CustomConversions;
+import org.springframework.data.domain.Sort;
import org.springframework.data.elasticsearch.annotations.FieldType;
import org.springframework.data.elasticsearch.annotations.ScriptedField;
import org.springframework.data.elasticsearch.core.document.Document;
@@ -50,6 +51,7 @@
import org.springframework.data.elasticsearch.core.query.CriteriaQuery;
import org.springframework.data.elasticsearch.core.query.FetchSourceFilter;
import org.springframework.data.elasticsearch.core.query.Field;
+import org.springframework.data.elasticsearch.core.query.Order;
import org.springframework.data.elasticsearch.core.query.Query;
import org.springframework.data.elasticsearch.core.query.SeqNoPrimaryTerm;
import org.springframework.data.elasticsearch.core.query.SourceFilter;
@@ -85,6 +87,7 @@
* @author Anton Naydenov
* @author vdisk
* @author Junghoon Ban
+ * @author llosimura
* @since 3.2
*/
public class MappingElasticsearchConverter
@@ -653,13 +656,14 @@ private void populateScriptFields(ElasticsearchPersistentEntity> entity, T
SearchDocument searchDocument) {
Map> fields = searchDocument.getFields();
entity.doWithProperties((SimplePropertyHandler) property -> {
- if (property.isAnnotationPresent(ScriptedField.class) && fields.containsKey(property.getName())) {
+ if (property.isAnnotationPresent(ScriptedField.class)) {
ScriptedField scriptedField = property.findAnnotation(ScriptedField.class);
// noinspection ConstantConditions
String name = scriptedField.name().isEmpty() ? property.getName() : scriptedField.name();
- Object value = searchDocument.getFieldValue(name);
-
- entity.getPropertyAccessor(result).setProperty(property, value);
+ if (fields.containsKey(name)) {
+ Object value = searchDocument.getFieldValue(name);
+ entity.getPropertyAccessor(result).setProperty(property, value);
+ }
}
});
}
@@ -1229,7 +1233,7 @@ public void updateQuery(Query query, @Nullable Class> domainClass) {
return;
}
- updatePropertiesInFieldsAndSourceFilter(query, domainClass);
+ updatePropertiesInFieldsSortAndSourceFilter(query, domainClass);
if (query instanceof CriteriaQuery criteriaQuery) {
updatePropertiesInCriteriaQuery(criteriaQuery, domainClass);
@@ -1240,7 +1244,14 @@ public void updateQuery(Query query, @Nullable Class> domainClass) {
}
}
- private void updatePropertiesInFieldsAndSourceFilter(Query query, Class> domainClass) {
+ /**
+ * replaces the names of fields in the query, the sort or soucre filters with the field names used in Elasticsearch
+ * when they are defined on the ElasticsearchProperties
+ *
+ * @param query the query to process
+ * @param domainClass the domain class (persistent entity)
+ */
+ private void updatePropertiesInFieldsSortAndSourceFilter(Query query, Class> domainClass) {
ElasticsearchPersistentEntity> persistentEntity = mappingContext.getPersistentEntity(domainClass);
@@ -1248,12 +1259,12 @@ private void updatePropertiesInFieldsAndSourceFilter(Query query, Class> domai
List fields = query.getFields();
if (!fields.isEmpty()) {
- query.setFields(updateFieldNames(fields, persistentEntity));
+ query.setFields(propertyToFieldNames(fields, persistentEntity));
}
List storedFields = query.getStoredFields();
if (!CollectionUtils.isEmpty(storedFields)) {
- query.setStoredFields(updateFieldNames(storedFields, persistentEntity));
+ query.setStoredFields(propertyToFieldNames(storedFields, persistentEntity));
}
SourceFilter sourceFilter = query.getSourceFilter();
@@ -1264,37 +1275,60 @@ private void updatePropertiesInFieldsAndSourceFilter(Query query, Class> domai
String[] excludes = null;
if (sourceFilter.getIncludes() != null) {
- includes = updateFieldNames(Arrays.asList(sourceFilter.getIncludes()), persistentEntity)
+ includes = propertyToFieldNames(Arrays.asList(sourceFilter.getIncludes()), persistentEntity)
.toArray(new String[] {});
}
if (sourceFilter.getExcludes() != null) {
- excludes = updateFieldNames(Arrays.asList(sourceFilter.getExcludes()), persistentEntity)
+ excludes = propertyToFieldNames(Arrays.asList(sourceFilter.getExcludes()), persistentEntity)
.toArray(new String[] {});
}
query.addSourceFilter(new FetchSourceFilter(includes, excludes));
}
+
+ if (query.getSort() != null) {
+ var sort = query.getSort();
+ // stream the orders and map them to a new order with the changed names,
+ // then replace the existing sort with a new sort containing the new orders.
+ var newOrders = sort.stream().map(order -> {
+ var fieldNames = updateFieldNames(order.getProperty(), persistentEntity);
+
+ if (order instanceof Order springDataElasticsearchOrder) {
+ return springDataElasticsearchOrder.withProperty(fieldNames);
+ } else {
+ return new Sort.Order(order.getDirection(),
+ fieldNames,
+ order.isIgnoreCase(),
+ order.getNullHandling());
+ }
+ }).toList();
+
+ if (query instanceof BaseQuery baseQuery) {
+ baseQuery.setSort(Sort.by(newOrders));
+ }
+ }
}
}
/**
- * relaces the fieldName with the property name of a property of the persistentEntity with the corresponding
- * fieldname. If no such property exists, the original fieldName is kept.
+ * replaces property name of a property of the persistentEntity with the corresponding fieldname. If no such property
+ * exists, the original fieldName is kept.
*
- * @param fieldNames list of fieldnames
+ * @param propertyNames list of fieldnames
* @param persistentEntity the persistent entity to check
* @return an updated list of field names
*/
- private List updateFieldNames(List fieldNames, ElasticsearchPersistentEntity> persistentEntity) {
- return fieldNames.stream().map(fieldName -> updateFieldName(persistentEntity, fieldName))
+ private List propertyToFieldNames(List propertyNames,
+ ElasticsearchPersistentEntity> persistentEntity) {
+ return propertyNames.stream().map(propertyName -> propertyToFieldName(persistentEntity, propertyName))
.collect(Collectors.toList());
}
@NotNull
- private String updateFieldName(ElasticsearchPersistentEntity> persistentEntity, String fieldName) {
- ElasticsearchPersistentProperty persistentProperty = persistentEntity.getPersistentProperty(fieldName);
- return persistentProperty != null ? persistentProperty.getFieldName() : fieldName;
+ private String propertyToFieldName(ElasticsearchPersistentEntity> persistentEntity, String propertyName) {
+ ElasticsearchPersistentProperty persistentProperty = persistentEntity.getPersistentProperty(propertyName);
+ return persistentProperty != null ? persistentProperty.getFieldName() : propertyName;
}
private void updatePropertiesInCriteriaQuery(CriteriaQuery criteriaQuery, Class> domainClass) {
@@ -1324,53 +1358,21 @@ private void updatePropertiesInCriteria(Criteria criteria, ElasticsearchPersiste
return;
}
- String[] fieldNames = field.getName().split("\\.");
-
- ElasticsearchPersistentEntity> currentEntity = persistentEntity;
- ElasticsearchPersistentProperty persistentProperty = null;
- int propertyCount = 0;
- boolean isNested = false;
-
- for (int i = 0; i < fieldNames.length; i++) {
- persistentProperty = currentEntity.getPersistentProperty(fieldNames[i]);
-
- if (persistentProperty != null) {
- propertyCount++;
- fieldNames[i] = persistentProperty.getFieldName();
-
- org.springframework.data.elasticsearch.annotations.Field fieldAnnotation = persistentProperty
- .findAnnotation(org.springframework.data.elasticsearch.annotations.Field.class);
-
- if (fieldAnnotation != null && fieldAnnotation.type() == FieldType.Nested) {
- isNested = true;
- }
-
- try {
- currentEntity = mappingContext.getPersistentEntity(persistentProperty.getActualType());
- } catch (Exception e) {
- // using system types like UUIDs will lead to java.lang.reflect.InaccessibleObjectException in JDK 16
- // so if we cannot get an entity here, bail out.
- currentEntity = null;
- }
- }
-
- if (currentEntity == null) {
- break;
- }
- }
+ var propertyNamesUpdate = updatePropertyNames(persistentEntity, field.getName());
+ var fieldNames = propertyNamesUpdate.names();
field.setName(String.join(".", fieldNames));
- if (propertyCount > 1 && isNested) {
+ if (propertyNamesUpdate.propertyCount() > 1 && propertyNamesUpdate.nestedProperty()) {
List propertyNames = Arrays.asList(fieldNames);
- field.setPath(String.join(".", propertyNames.subList(0, propertyCount - 1)));
+ field.setPath(String.join(".", propertyNames.subList(0, propertyNamesUpdate.propertyCount - 1)));
}
- if (persistentProperty != null) {
+ if (propertyNamesUpdate.persistentProperty != null) {
- if (persistentProperty.hasPropertyValueConverter()) {
+ if (propertyNamesUpdate.persistentProperty.hasPropertyValueConverter()) {
PropertyValueConverter propertyValueConverter = Objects
- .requireNonNull(persistentProperty.getPropertyValueConverter());
+ .requireNonNull(propertyNamesUpdate.persistentProperty.getPropertyValueConverter());
criteria.getQueryCriteriaEntries().forEach(criteriaEntry -> {
if (criteriaEntry.getKey().hasValue()) {
@@ -1389,7 +1391,7 @@ private void updatePropertiesInCriteria(Criteria criteria, ElasticsearchPersiste
});
}
- org.springframework.data.elasticsearch.annotations.Field fieldAnnotation = persistentProperty
+ org.springframework.data.elasticsearch.annotations.Field fieldAnnotation = propertyNamesUpdate.persistentProperty
.findAnnotation(org.springframework.data.elasticsearch.annotations.Field.class);
if (fieldAnnotation != null) {
@@ -1398,38 +1400,71 @@ private void updatePropertiesInCriteria(Criteria criteria, ElasticsearchPersiste
}
}
+ static record PropertyNamesUpdate(
+ String[] names,
+ Boolean nestedProperty,
+ Integer propertyCount,
+ ElasticsearchPersistentProperty persistentProperty) {
+ }
+
@Override
public String updateFieldNames(String propertyPath, ElasticsearchPersistentEntity> persistentEntity) {
Assert.notNull(propertyPath, "propertyPath must not be null");
Assert.notNull(persistentEntity, "persistentEntity must not be null");
- var properties = propertyPath.split("\\.", 2);
+ var propertyNamesUpdate = updatePropertyNames(persistentEntity, propertyPath);
+ return String.join(".", propertyNamesUpdate.names());
+ }
- if (properties.length > 0) {
- var propertyName = properties[0];
- var fieldName = updateFieldName(persistentEntity, propertyName);
+ /**
+ * Parse a propertyPath and replace the path values with the field names from a persistentEntity. path entries not
+ * found in the entity are kept as they are.
+ *
+ * @return the eventually modified names, a flag if a nested entity was encountered the number of processed
+ * propertiesand the last processed PersistentProperty.
+ */
+ PropertyNamesUpdate updatePropertyNames(ElasticsearchPersistentEntity> persistentEntity, String propertyPath) {
- if (properties.length > 1) {
- var persistentProperty = persistentEntity.getPersistentProperty(propertyName);
+ String[] propertyNames = propertyPath.split("\\.");
+ String[] fieldNames = Arrays.copyOf(propertyNames, propertyNames.length);
- if (persistentProperty != null) {
- ElasticsearchPersistentEntity> nestedPersistentEntity = mappingContext
- .getPersistentEntity(persistentProperty);
- if (nestedPersistentEntity != null) {
- return fieldName + '.' + updateFieldNames(properties[1], nestedPersistentEntity);
- } else {
- return fieldName;
- }
+ ElasticsearchPersistentEntity> currentEntity = persistentEntity;
+ ElasticsearchPersistentProperty persistentProperty = null;
+
+ int propertyCount = 0;
+ boolean isNested = false;
+
+ for (int i = 0; i < propertyNames.length; i++) {
+ persistentProperty = currentEntity.getPersistentProperty(propertyNames[i]);
+
+ if (persistentProperty != null) {
+ propertyCount++;
+ fieldNames[i] = persistentProperty.getFieldName();
+
+ org.springframework.data.elasticsearch.annotations.Field fieldAnnotation = persistentProperty
+ .findAnnotation(org.springframework.data.elasticsearch.annotations.Field.class);
+
+ if (fieldAnnotation != null && fieldAnnotation.type() == FieldType.Nested) {
+ isNested = true;
+ }
+
+ try {
+ currentEntity = mappingContext.getPersistentEntity(persistentProperty.getActualType());
+ } catch (Exception e) {
+ // using system types like UUIDs will lead to java.lang.reflect.InaccessibleObjectException in JDK 16
+ // so if we cannot get an entity here, bail out.
+ currentEntity = null;
}
}
- return fieldName;
- } else {
- return propertyPath;
+
+ if (currentEntity == null) {
+ break;
+ }
}
+ return new PropertyNamesUpdate(fieldNames, isNested, propertyCount, persistentProperty);
}
-
// endregion
@SuppressWarnings("ClassCanBeRecord")
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/convert/NumberRangePropertyValueConverter.java b/src/main/java/org/springframework/data/elasticsearch/core/convert/NumberRangePropertyValueConverter.java
index 412efc6cf8..6a47f37f23 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/convert/NumberRangePropertyValueConverter.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/convert/NumberRangePropertyValueConverter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/convert/TemporalPropertyValueConverter.java b/src/main/java/org/springframework/data/elasticsearch/core/convert/TemporalPropertyValueConverter.java
index 079f036ea6..efc2ab53bb 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/convert/TemporalPropertyValueConverter.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/convert/TemporalPropertyValueConverter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/convert/TemporalRangePropertyValueConverter.java b/src/main/java/org/springframework/data/elasticsearch/core/convert/TemporalRangePropertyValueConverter.java
index b0d9cc853e..f41107922d 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/convert/TemporalRangePropertyValueConverter.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/convert/TemporalRangePropertyValueConverter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/document/Document.java b/src/main/java/org/springframework/data/elasticsearch/core/document/Document.java
index c2328c25aa..8c9917c600 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/document/Document.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/document/Document.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2019-2024 the original author or authors.
+ * Copyright 2019-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/document/Explanation.java b/src/main/java/org/springframework/data/elasticsearch/core/document/Explanation.java
index 15d9fa55c3..48135b2266 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/document/Explanation.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/document/Explanation.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/document/MapDocument.java b/src/main/java/org/springframework/data/elasticsearch/core/document/MapDocument.java
index 522e26c2cf..6693131955 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/document/MapDocument.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/document/MapDocument.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2019-2024 the original author or authors.
+ * Copyright 2019-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/document/NestedMetaData.java b/src/main/java/org/springframework/data/elasticsearch/core/document/NestedMetaData.java
index 46cfd1ef85..3294e7a6fe 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/document/NestedMetaData.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/document/NestedMetaData.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2024 the original author or authors.
+ * Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/document/SearchDocument.java b/src/main/java/org/springframework/data/elasticsearch/core/document/SearchDocument.java
index 4e22d45b3d..d98c68524d 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/document/SearchDocument.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/document/SearchDocument.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2019-2024 the original author or authors.
+ * Copyright 2019-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/document/SearchDocumentAdapter.java b/src/main/java/org/springframework/data/elasticsearch/core/document/SearchDocumentAdapter.java
index 557667504b..e2549aada8 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/document/SearchDocumentAdapter.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/document/SearchDocumentAdapter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/document/SearchDocumentResponse.java b/src/main/java/org/springframework/data/elasticsearch/core/document/SearchDocumentResponse.java
index 23e0898aca..3c85418cf1 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/document/SearchDocumentResponse.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/document/SearchDocumentResponse.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2019-2024 the original author or authors.
+ * Copyright 2019-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/event/AfterConvertCallback.java b/src/main/java/org/springframework/data/elasticsearch/core/event/AfterConvertCallback.java
index 27ce209d09..01c185d6cf 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/event/AfterConvertCallback.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/event/AfterConvertCallback.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2024 the original author or authors.
+ * Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/event/AfterLoadCallback.java b/src/main/java/org/springframework/data/elasticsearch/core/event/AfterLoadCallback.java
index bae1adec6c..5d898f3556 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/event/AfterLoadCallback.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/event/AfterLoadCallback.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/event/AfterSaveCallback.java b/src/main/java/org/springframework/data/elasticsearch/core/event/AfterSaveCallback.java
index 361b8ab176..37b41fc2a2 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/event/AfterSaveCallback.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/event/AfterSaveCallback.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2024 the original author or authors.
+ * Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/event/AuditingEntityCallback.java b/src/main/java/org/springframework/data/elasticsearch/core/event/AuditingEntityCallback.java
index f42bdcd6ae..26caf0f32f 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/event/AuditingEntityCallback.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/event/AuditingEntityCallback.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2024 the original author or authors.
+ * Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/event/BeforeConvertCallback.java b/src/main/java/org/springframework/data/elasticsearch/core/event/BeforeConvertCallback.java
index e08c920907..52f0ca3d94 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/event/BeforeConvertCallback.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/event/BeforeConvertCallback.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2024 the original author or authors.
+ * Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -31,7 +31,7 @@ public interface BeforeConvertCallback extends EntityCallback {
/**
* Callback method that will be invoked before an entity is persisted. Can return the same or a different instance of
* the domain entity class.
- *
+ *
* @param entity the entity being converted
* @param index must not be {@literal null}.
* @return the entity to be converted
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/event/ReactiveAfterConvertCallback.java b/src/main/java/org/springframework/data/elasticsearch/core/event/ReactiveAfterConvertCallback.java
index 309b116c71..9a4273d717 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/event/ReactiveAfterConvertCallback.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/event/ReactiveAfterConvertCallback.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2024 the original author or authors.
+ * Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/event/ReactiveAfterLoadCallback.java b/src/main/java/org/springframework/data/elasticsearch/core/event/ReactiveAfterLoadCallback.java
index a0ee6784fd..1e73244dff 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/event/ReactiveAfterLoadCallback.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/event/ReactiveAfterLoadCallback.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/event/ReactiveAfterSaveCallback.java b/src/main/java/org/springframework/data/elasticsearch/core/event/ReactiveAfterSaveCallback.java
index bfcbe2eca3..5a9c6dfe59 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/event/ReactiveAfterSaveCallback.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/event/ReactiveAfterSaveCallback.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2024 the original author or authors.
+ * Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/event/ReactiveAuditingEntityCallback.java b/src/main/java/org/springframework/data/elasticsearch/core/event/ReactiveAuditingEntityCallback.java
index bc2f9d752a..4a471193fc 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/event/ReactiveAuditingEntityCallback.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/event/ReactiveAuditingEntityCallback.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2024 the original author or authors.
+ * Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/event/ReactiveBeforeConvertCallback.java b/src/main/java/org/springframework/data/elasticsearch/core/event/ReactiveBeforeConvertCallback.java
index cfc12503cd..48df60a780 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/event/ReactiveBeforeConvertCallback.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/event/ReactiveBeforeConvertCallback.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2024 the original author or authors.
+ * Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -32,7 +32,7 @@ public interface ReactiveBeforeConvertCallback extends EntityCallback {
/**
* Callback method that will be invoked before an entity is persisted. Can return the same or a different instance of
* the domain entity class.
- *
+ *
* @param entity the entity being converted
* @param index must not be {@literal null}.
* @return the entity to be converted
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/geo/GeoBox.java b/src/main/java/org/springframework/data/elasticsearch/core/geo/GeoBox.java
index 802e57ca37..b1a570ff6e 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/geo/GeoBox.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/geo/GeoBox.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2013-2024 the original author or authors.
+ * Copyright 2013-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/geo/GeoJson.java b/src/main/java/org/springframework/data/elasticsearch/core/geo/GeoJson.java
index 2f9b6f3f46..20c3123032 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/geo/GeoJson.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/geo/GeoJson.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2024 the original author or authors.
+ * Copyright 2015-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/geo/GeoJsonGeometryCollection.java b/src/main/java/org/springframework/data/elasticsearch/core/geo/GeoJsonGeometryCollection.java
index 6bb232e4ca..ef67ec2c95 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/geo/GeoJsonGeometryCollection.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/geo/GeoJsonGeometryCollection.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2024 the original author or authors.
+ * Copyright 2015-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/geo/GeoJsonLineString.java b/src/main/java/org/springframework/data/elasticsearch/core/geo/GeoJsonLineString.java
index 56ce8c1276..5c848e90b1 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/geo/GeoJsonLineString.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/geo/GeoJsonLineString.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2024 the original author or authors.
+ * Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/geo/GeoJsonMultiLineString.java b/src/main/java/org/springframework/data/elasticsearch/core/geo/GeoJsonMultiLineString.java
index 7be2ab9a6f..dec613fa90 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/geo/GeoJsonMultiLineString.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/geo/GeoJsonMultiLineString.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2024 the original author or authors.
+ * Copyright 2015-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -27,7 +27,7 @@
/**
* {@link GeoJsonMultiLineString} is defined as list of {@link GeoJsonLineString}s.
* Copied from Spring Data Mongodb
- *
+ *
* @author Christoph Strobl
* @author Peter-Josef Meisch
* @since 4.1
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/geo/GeoJsonMultiPoint.java b/src/main/java/org/springframework/data/elasticsearch/core/geo/GeoJsonMultiPoint.java
index 06e2a72012..d81e30f522 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/geo/GeoJsonMultiPoint.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/geo/GeoJsonMultiPoint.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2024 the original author or authors.
+ * Copyright 2015-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/geo/GeoJsonMultiPolygon.java b/src/main/java/org/springframework/data/elasticsearch/core/geo/GeoJsonMultiPolygon.java
index a34cd4be1a..bcd46bc6f1 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/geo/GeoJsonMultiPolygon.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/geo/GeoJsonMultiPolygon.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2024 the original author or authors.
+ * Copyright 2015-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/geo/GeoJsonPoint.java b/src/main/java/org/springframework/data/elasticsearch/core/geo/GeoJsonPoint.java
index 33e34460a9..a7bca7e6e2 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/geo/GeoJsonPoint.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/geo/GeoJsonPoint.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2024 the original author or authors.
+ * Copyright 2015-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/geo/GeoJsonPolygon.java b/src/main/java/org/springframework/data/elasticsearch/core/geo/GeoJsonPolygon.java
index bb873d4e74..ffc613b305 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/geo/GeoJsonPolygon.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/geo/GeoJsonPolygon.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2024 the original author or authors.
+ * Copyright 2015-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/geo/GeoPoint.java b/src/main/java/org/springframework/data/elasticsearch/core/geo/GeoPoint.java
index 57a5a01560..ade1a5532d 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/geo/GeoPoint.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/geo/GeoPoint.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2013-2024 the original author or authors.
+ * Copyright 2013-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/index/AliasAction.java b/src/main/java/org/springframework/data/elasticsearch/core/index/AliasAction.java
index 2269e13d37..5297b19823 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/index/AliasAction.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/index/AliasAction.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2024 the original author or authors.
+ * Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/index/AliasActionParameters.java b/src/main/java/org/springframework/data/elasticsearch/core/index/AliasActionParameters.java
index 9db8473d20..1b71a8aa01 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/index/AliasActionParameters.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/index/AliasActionParameters.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2024 the original author or authors.
+ * Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/index/AliasActions.java b/src/main/java/org/springframework/data/elasticsearch/core/index/AliasActions.java
index 7270244f3d..44c3869c5b 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/index/AliasActions.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/index/AliasActions.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2024 the original author or authors.
+ * Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/index/AliasData.java b/src/main/java/org/springframework/data/elasticsearch/core/index/AliasData.java
index 924deb691e..615de488c8 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/index/AliasData.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/index/AliasData.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2024 the original author or authors.
+ * Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/index/ComponentTemplateRequestData.java b/src/main/java/org/springframework/data/elasticsearch/core/index/ComponentTemplateRequestData.java
index 47fa323d4c..b67d411143 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/index/ComponentTemplateRequestData.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/index/ComponentTemplateRequestData.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2023-2024 the original author or authors.
+ * Copyright 2023-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/index/DeleteComponentTemplateRequest.java b/src/main/java/org/springframework/data/elasticsearch/core/index/DeleteComponentTemplateRequest.java
index c586f16a49..81e90ef635 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/index/DeleteComponentTemplateRequest.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/index/DeleteComponentTemplateRequest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2023-2024 the original author or authors.
+ * Copyright 2023-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/index/DeleteIndexTemplateRequest.java b/src/main/java/org/springframework/data/elasticsearch/core/index/DeleteIndexTemplateRequest.java
index 71545fd969..60d8f35cbf 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/index/DeleteIndexTemplateRequest.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/index/DeleteIndexTemplateRequest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2023-2024 the original author or authors.
+ * Copyright 2023-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/index/DeleteTemplateRequest.java b/src/main/java/org/springframework/data/elasticsearch/core/index/DeleteTemplateRequest.java
index 5b89f442f2..8d11652e55 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/index/DeleteTemplateRequest.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/index/DeleteTemplateRequest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2024 the original author or authors.
+ * Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/index/ExistsComponentTemplateRequest.java b/src/main/java/org/springframework/data/elasticsearch/core/index/ExistsComponentTemplateRequest.java
index 134a739eb5..13e42bd353 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/index/ExistsComponentTemplateRequest.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/index/ExistsComponentTemplateRequest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2023-2024 the original author or authors.
+ * Copyright 2023-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/index/ExistsIndexTemplateRequest.java b/src/main/java/org/springframework/data/elasticsearch/core/index/ExistsIndexTemplateRequest.java
index 0933be08f7..34da32b46c 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/index/ExistsIndexTemplateRequest.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/index/ExistsIndexTemplateRequest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2023-2024 the original author or authors.
+ * Copyright 2023-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/index/ExistsTemplateRequest.java b/src/main/java/org/springframework/data/elasticsearch/core/index/ExistsTemplateRequest.java
index b13c2457aa..d9119add86 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/index/ExistsTemplateRequest.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/index/ExistsTemplateRequest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2024 the original author or authors.
+ * Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/index/GeoShapeMappingParameters.java b/src/main/java/org/springframework/data/elasticsearch/core/index/GeoShapeMappingParameters.java
index d175caef10..e34da7b70a 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/index/GeoShapeMappingParameters.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/index/GeoShapeMappingParameters.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2024 the original author or authors.
+ * Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/index/GetComponentTemplateRequest.java b/src/main/java/org/springframework/data/elasticsearch/core/index/GetComponentTemplateRequest.java
index 4c9efe49c3..9dbdce161b 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/index/GetComponentTemplateRequest.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/index/GetComponentTemplateRequest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2023-2024 the original author or authors.
+ * Copyright 2023-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/index/GetIndexTemplateRequest.java b/src/main/java/org/springframework/data/elasticsearch/core/index/GetIndexTemplateRequest.java
index 0217dc2bf9..ebdd1b5a6e 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/index/GetIndexTemplateRequest.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/index/GetIndexTemplateRequest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2023-2024 the original author or authors.
+ * Copyright 2023-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/index/GetTemplateRequest.java b/src/main/java/org/springframework/data/elasticsearch/core/index/GetTemplateRequest.java
index c9de016252..3df81d560d 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/index/GetTemplateRequest.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/index/GetTemplateRequest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2024 the original author or authors.
+ * Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/index/MappingBuilder.java b/src/main/java/org/springframework/data/elasticsearch/core/index/MappingBuilder.java
index bcf25c01b3..0e86446c17 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/index/MappingBuilder.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/index/MappingBuilder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2014-2024 the original author or authors.
+ * Copyright 2014-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -345,8 +345,10 @@ private void buildPropertyMapping(ObjectNode propertiesNode, boolean isRootObjec
: nestedPropertyPrefix + '.' + property.getFieldName();
Field fieldAnnotation = property.findAnnotation(Field.class);
+ MultiField multiFieldAnnotation = property.findAnnotation(MultiField.class);
- if (fieldAnnotation != null && fieldAnnotation.excludeFromSource()) {
+ if ((fieldAnnotation != null && fieldAnnotation.excludeFromSource()) ||
+ multiFieldAnnotation != null && multiFieldAnnotation.mainField().excludeFromSource()) {
excludeFromSource.add(nestedPropertyPath);
}
@@ -377,8 +379,6 @@ private void buildPropertyMapping(ObjectNode propertiesNode, boolean isRootObjec
}
}
- MultiField multiField = property.findAnnotation(MultiField.class);
-
if (isCompletionProperty) {
CompletionField completionField = property.findAnnotation(CompletionField.class);
applyCompletionFieldMapping(propertiesNode, property, completionField);
@@ -386,8 +386,8 @@ private void buildPropertyMapping(ObjectNode propertiesNode, boolean isRootObjec
if (isRootObject && fieldAnnotation != null && property.isIdProperty()) {
applyDefaultIdFieldMapping(propertiesNode, property);
- } else if (multiField != null) {
- addMultiFieldMapping(propertiesNode, property, multiField, isNestedOrObjectProperty, dynamicMapping);
+ } else if (multiFieldAnnotation != null) {
+ addMultiFieldMapping(propertiesNode, property, multiFieldAnnotation, isNestedOrObjectProperty, dynamicMapping);
} else if (fieldAnnotation != null) {
addSingleFieldMapping(propertiesNode, property, fieldAnnotation, isNestedOrObjectProperty, dynamicMapping);
}
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/index/MappingParameters.java b/src/main/java/org/springframework/data/elasticsearch/core/index/MappingParameters.java
index 72fa129bc3..bb59b202df 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/index/MappingParameters.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/index/MappingParameters.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2019-2024 the original author or authors.
+ * Copyright 2019-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -171,8 +171,8 @@ private MappingParameters(Field field) {
positiveScoreImpact = field.positiveScoreImpact();
dims = field.dims();
if (type == FieldType.Dense_Vector) {
- Assert.isTrue(dims >= 1 && dims <= 2048,
- "Invalid required parameter! Dense_Vector value \"dims\" must be between 1 and 2048.");
+ Assert.isTrue(dims >= 1 && dims <= 4096,
+ "Invalid required parameter! Dense_Vector value \"dims\" must be between 1 and 4096.");
}
Assert.isTrue(field.enabled() || type == FieldType.Object, "enabled false is only allowed for field type object");
enabled = field.enabled();
@@ -214,8 +214,8 @@ private MappingParameters(InnerField field) {
positiveScoreImpact = field.positiveScoreImpact();
dims = field.dims();
if (type == FieldType.Dense_Vector) {
- Assert.isTrue(dims >= 1 && dims <= 2048,
- "Invalid required parameter! Dense_Vector value \"dims\" must be between 1 and 2048.");
+ Assert.isTrue(dims >= 1 && dims <= 4096,
+ "Invalid required parameter! Dense_Vector value \"dims\" must be between 1 and 4096.");
}
enabled = true;
eagerGlobalOrdinals = field.eagerGlobalOrdinals();
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/index/PutComponentTemplateRequest.java b/src/main/java/org/springframework/data/elasticsearch/core/index/PutComponentTemplateRequest.java
index 5693e668b1..1576823b07 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/index/PutComponentTemplateRequest.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/index/PutComponentTemplateRequest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2023-2024 the original author or authors.
+ * Copyright 2023-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/index/PutIndexTemplateRequest.java b/src/main/java/org/springframework/data/elasticsearch/core/index/PutIndexTemplateRequest.java
index 01c3a77d17..1df627d35e 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/index/PutIndexTemplateRequest.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/index/PutIndexTemplateRequest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2023-2024 the original author or authors.
+ * Copyright 2023-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/index/PutTemplateRequest.java b/src/main/java/org/springframework/data/elasticsearch/core/index/PutTemplateRequest.java
index f010a50a64..c18f5166c9 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/index/PutTemplateRequest.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/index/PutTemplateRequest.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2024 the original author or authors.
+ * Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/index/ReactiveMappingBuilder.java b/src/main/java/org/springframework/data/elasticsearch/core/index/ReactiveMappingBuilder.java
index 983cfcb2c2..21bc2a1707 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/index/ReactiveMappingBuilder.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/index/ReactiveMappingBuilder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/index/Settings.java b/src/main/java/org/springframework/data/elasticsearch/core/index/Settings.java
index e3b096e07e..4989146a97 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/index/Settings.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/index/Settings.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/index/TemplateData.java b/src/main/java/org/springframework/data/elasticsearch/core/index/TemplateData.java
index bc780f41dc..365a9118a0 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/index/TemplateData.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/index/TemplateData.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2024 the original author or authors.
+ * Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/index/TemplateResponse.java b/src/main/java/org/springframework/data/elasticsearch/core/index/TemplateResponse.java
index 8a942d427b..10f9f0dfbf 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/index/TemplateResponse.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/index/TemplateResponse.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2023-2024 the original author or authors.
+ * Copyright 2023-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/index/TemplateResponseData.java b/src/main/java/org/springframework/data/elasticsearch/core/index/TemplateResponseData.java
index e90ade22fa..7f6649e0e2 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/index/TemplateResponseData.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/index/TemplateResponseData.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2023-2024 the original author or authors.
+ * Copyright 2023-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/join/JoinField.java b/src/main/java/org/springframework/data/elasticsearch/core/join/JoinField.java
index bc00799a56..c6d5891333 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/join/JoinField.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/join/JoinField.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2024 the original author or authors.
+ * Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/mapping/ElasticsearchPersistentEntity.java b/src/main/java/org/springframework/data/elasticsearch/core/mapping/ElasticsearchPersistentEntity.java
index 6d13d7eb63..655e6dc483 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/mapping/ElasticsearchPersistentEntity.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/mapping/ElasticsearchPersistentEntity.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2013-2024 the original author or authors.
+ * Copyright 2013-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/mapping/ElasticsearchPersistentProperty.java b/src/main/java/org/springframework/data/elasticsearch/core/mapping/ElasticsearchPersistentProperty.java
index 2b9d6232e0..ab4c12d3e5 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/mapping/ElasticsearchPersistentProperty.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/mapping/ElasticsearchPersistentProperty.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2013-2024 the original author or authors.
+ * Copyright 2013-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/mapping/ElasticsearchSimpleTypes.java b/src/main/java/org/springframework/data/elasticsearch/core/mapping/ElasticsearchSimpleTypes.java
index 3d03f178f3..300251a064 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/mapping/ElasticsearchSimpleTypes.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/mapping/ElasticsearchSimpleTypes.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2019-2024 the original author or authors.
+ * Copyright 2019-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/mapping/IndexCoordinates.java b/src/main/java/org/springframework/data/elasticsearch/core/mapping/IndexCoordinates.java
index a6783cba24..0f44ca138c 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/mapping/IndexCoordinates.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/mapping/IndexCoordinates.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2019-2024 the original author or authors.
+ * Copyright 2019-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/mapping/KebabCaseFieldNamingStrategy.java b/src/main/java/org/springframework/data/elasticsearch/core/mapping/KebabCaseFieldNamingStrategy.java
index bf23033189..5811a066e2 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/mapping/KebabCaseFieldNamingStrategy.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/mapping/KebabCaseFieldNamingStrategy.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2019-2024 the original author or authors.
+ * Copyright 2019-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/mapping/PropertyValueConverter.java b/src/main/java/org/springframework/data/elasticsearch/core/mapping/PropertyValueConverter.java
index 79ab431387..9fb8cc382d 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/mapping/PropertyValueConverter.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/mapping/PropertyValueConverter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2019-2024 the original author or authors.
+ * Copyright 2019-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/mapping/SimpleElasticsearchMappingContext.java b/src/main/java/org/springframework/data/elasticsearch/core/mapping/SimpleElasticsearchMappingContext.java
index 2564a51efb..e69a907560 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/mapping/SimpleElasticsearchMappingContext.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/mapping/SimpleElasticsearchMappingContext.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2013-2024 the original author or authors.
+ * Copyright 2013-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/mapping/SimpleElasticsearchPersistentEntity.java b/src/main/java/org/springframework/data/elasticsearch/core/mapping/SimpleElasticsearchPersistentEntity.java
index f265fa13d1..7c3d89a392 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/mapping/SimpleElasticsearchPersistentEntity.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/mapping/SimpleElasticsearchPersistentEntity.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2013-2024 the original author or authors.
+ * Copyright 2013-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/mapping/SimpleElasticsearchPersistentProperty.java b/src/main/java/org/springframework/data/elasticsearch/core/mapping/SimpleElasticsearchPersistentProperty.java
index 8ba4bffccf..3b5608a036 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/mapping/SimpleElasticsearchPersistentProperty.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/mapping/SimpleElasticsearchPersistentProperty.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2013-2024 the original author or authors.
+ * Copyright 2013-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/query/BaseQuery.java b/src/main/java/org/springframework/data/elasticsearch/core/query/BaseQuery.java
index 86e6fdc338..a174511c44 100755
--- a/src/main/java/org/springframework/data/elasticsearch/core/query/BaseQuery.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/query/BaseQuery.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2013-2024 the original author or authors.
+ * Copyright 2013-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/query/BaseQueryBuilder.java b/src/main/java/org/springframework/data/elasticsearch/core/query/BaseQueryBuilder.java
index a7d4bf25f6..b9c9acc623 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/query/BaseQueryBuilder.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/query/BaseQueryBuilder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2022-2024 the original author or authors.
+ * Copyright 2022-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/query/BulkOptions.java b/src/main/java/org/springframework/data/elasticsearch/core/query/BulkOptions.java
index 41837acbb1..3c9ca4bc37 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/query/BulkOptions.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/query/BulkOptions.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2019-2024 the original author or authors.
+ * Copyright 2019-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/query/ByQueryResponse.java b/src/main/java/org/springframework/data/elasticsearch/core/query/ByQueryResponse.java
index cf6d3269bc..2cd40cd051 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/query/ByQueryResponse.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/query/ByQueryResponse.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/elasticsearch/core/query/Criteria.java b/src/main/java/org/springframework/data/elasticsearch/core/query/Criteria.java
index 78b4996a38..d398d7ee1f 100644
--- a/src/main/java/org/springframework/data/elasticsearch/core/query/Criteria.java
+++ b/src/main/java/org/springframework/data/elasticsearch/core/query/Criteria.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2013-2024 the original author or authors.
+ * Copyright 2013-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,6 +22,7 @@
import java.util.List;
import java.util.Objects;
import java.util.Set;
+import java.util.stream.Collectors;
import org.springframework.dao.InvalidDataAccessApiUsageException;
import org.springframework.data.elasticsearch.core.geo.GeoBox;
@@ -859,6 +860,7 @@ private List