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.data spring-data-elasticsearch - 5.3.0 + 5.3.13-SNAPSHOT org.springframework.data.build spring-data-parent - 3.3.0 + 3.3.13-SNAPSHOT Spring 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.RELEASE 0.14.4 2.18.0 1.5.1 @@ -248,13 +247,6 @@ test - - io.projectreactor.tools - blockhound-junit-platform - ${blockhound-junit} - test - - org.skyscreamer jsonassert @@ -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.antora antora-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 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 toCollection(Object... values) { // endregion + // region equals/hashcode @Override public boolean equals(Object o) { if (this == o) @@ -874,6 +876,8 @@ public boolean equals(Object o) { return false; if (!Objects.equals(field, criteria.field)) return false; + if (!criteriaChain.filter(this).equals(criteria.criteriaChain.filter(criteria))) + return false; if (!queryCriteriaEntries.equals(criteria.queryCriteriaEntries)) return false; if (!filterCriteriaEntries.equals(criteria.filterCriteriaEntries)) @@ -886,11 +890,16 @@ public int hashCode() { int result = field != null ? field.hashCode() : 0; result = 31 * result + (boost != +0.0f ? Float.floatToIntBits(boost) : 0); result = 31 * result + (negating ? 1 : 0); + // the criteriaChain contains "this" object, so we need to filter it out + // to avoid a stackoverflow here, because the hashcode implementation + // uses the element's hashcodes + result = 31 * result + criteriaChain.filter(this).hashCode(); result = 31 * result + queryCriteriaEntries.hashCode(); result = 31 * result + filterCriteriaEntries.hashCode(); result = 31 * result + subCriteria.hashCode(); return result; } + // endregion @Override public String toString() { @@ -938,7 +947,17 @@ public Operator getOperator() { * * @since 4.1 */ - public static class CriteriaChain extends LinkedList {} + public static class CriteriaChain extends LinkedList { + /** + * return a copy of this list with the given element filtered out. + * + * @param criteria the element to filter + * @return the filtered list + */ + List filter(Criteria criteria) { + return this.stream().filter(c -> c != criteria).collect(Collectors.toList()); + } + } /** * Operator to join the entries of the criteria chain diff --git a/src/main/java/org/springframework/data/elasticsearch/core/query/CriteriaQuery.java b/src/main/java/org/springframework/data/elasticsearch/core/query/CriteriaQuery.java index 86afa20503..195d29e0b5 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/CriteriaQuery.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/CriteriaQuery.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/CriteriaQueryBuilder.java b/src/main/java/org/springframework/data/elasticsearch/core/query/CriteriaQueryBuilder.java index fd67cc3bed..b2fc5139b8 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/CriteriaQueryBuilder.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/CriteriaQueryBuilder.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/DeleteQuery.java b/src/main/java/org/springframework/data/elasticsearch/core/query/DeleteQuery.java index e8a29ea2b2..d96fed8c7c 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/DeleteQuery.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/DeleteQuery.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/query/DocValueField.java b/src/main/java/org/springframework/data/elasticsearch/core/query/DocValueField.java index 84be12c43b..4ac86722fa 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/DocValueField.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/DocValueField.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/query/FetchSourceFilter.java b/src/main/java/org/springframework/data/elasticsearch/core/query/FetchSourceFilter.java index caca169c6d..cf4664c875 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/FetchSourceFilter.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/FetchSourceFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2024 the original author or authors. + * Copyright 2016-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/FetchSourceFilterBuilder.java b/src/main/java/org/springframework/data/elasticsearch/core/query/FetchSourceFilterBuilder.java index 501f380046..21331da7eb 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/FetchSourceFilterBuilder.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/FetchSourceFilterBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2024 the original author or authors. + * Copyright 2016-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/Field.java b/src/main/java/org/springframework/data/elasticsearch/core/query/Field.java index eb20dec05d..77c8ea45cd 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/Field.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/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/core/query/GeoDistanceOrder.java b/src/main/java/org/springframework/data/elasticsearch/core/query/GeoDistanceOrder.java index 638f307b88..162eb57fa8 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/GeoDistanceOrder.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/GeoDistanceOrder.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/query/HasChildQuery.java b/src/main/java/org/springframework/data/elasticsearch/core/query/HasChildQuery.java index e8e7885e8f..5fe4d5a122 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/HasChildQuery.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/HasChildQuery.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/query/HasParentQuery.java b/src/main/java/org/springframework/data/elasticsearch/core/query/HasParentQuery.java index 7331a27254..0d8f9fb731 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/HasParentQuery.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/HasParentQuery.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/query/HighlightQuery.java b/src/main/java/org/springframework/data/elasticsearch/core/query/HighlightQuery.java index 379a972134..370afcd2c1 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/HighlightQuery.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/HighlightQuery.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/query/IndexBoost.java b/src/main/java/org/springframework/data/elasticsearch/core/query/IndexBoost.java index 94ec1c0ace..6ed97562bd 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/IndexBoost.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/IndexBoost.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2024 the original author or authors. + * Copyright 2016-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/IndexQuery.java b/src/main/java/org/springframework/data/elasticsearch/core/query/IndexQuery.java index 73c6626626..14871022fb 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/IndexQuery.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/IndexQuery.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/IndexQueryBuilder.java b/src/main/java/org/springframework/data/elasticsearch/core/query/IndexQueryBuilder.java index cfde12fc7d..8cc67b2867 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/IndexQueryBuilder.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/IndexQueryBuilder.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/core/query/IndicesOptions.java b/src/main/java/org/springframework/data/elasticsearch/core/query/IndicesOptions.java index 7ced9cb52b..dd8660197f 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/IndicesOptions.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/IndicesOptions.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/InnerHitsQuery.java b/src/main/java/org/springframework/data/elasticsearch/core/query/InnerHitsQuery.java index 42cbadf4ab..d4a92954d4 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/InnerHitsQuery.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/InnerHitsQuery.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/query/MoreLikeThisQuery.java b/src/main/java/org/springframework/data/elasticsearch/core/query/MoreLikeThisQuery.java index 4bc503b7ae..57ce6ea34a 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/MoreLikeThisQuery.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/MoreLikeThisQuery.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/Order.java b/src/main/java/org/springframework/data/elasticsearch/core/query/Order.java index 5977110f05..a3eaad2477 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/Order.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/Order.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/Query.java b/src/main/java/org/springframework/data/elasticsearch/core/query/Query.java index 5087499c0c..2a0dd17b7b 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/Query.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/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/core/query/RescorerQuery.java b/src/main/java/org/springframework/data/elasticsearch/core/query/RescorerQuery.java index 791582626c..c35725d1e0 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/RescorerQuery.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/RescorerQuery.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/RuntimeField.java b/src/main/java/org/springframework/data/elasticsearch/core/query/RuntimeField.java index fca9ec8fa2..805883a5f9 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/RuntimeField.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/RuntimeField.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/ScriptData.java b/src/main/java/org/springframework/data/elasticsearch/core/query/ScriptData.java index 3db9ac6705..0bcb6ad207 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/ScriptData.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/ScriptData.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/ScriptType.java b/src/main/java/org/springframework/data/elasticsearch/core/query/ScriptType.java index ddddb539de..1c6ceecab2 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/ScriptType.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/ScriptType.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/ScriptedField.java b/src/main/java/org/springframework/data/elasticsearch/core/query/ScriptedField.java index 687d19e530..2a30a3c2e2 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/ScriptedField.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/ScriptedField.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/SearchTemplateQuery.java b/src/main/java/org/springframework/data/elasticsearch/core/query/SearchTemplateQuery.java index 9255461fb3..4b4999fb05 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/SearchTemplateQuery.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/SearchTemplateQuery.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/SearchTemplateQueryBuilder.java b/src/main/java/org/springframework/data/elasticsearch/core/query/SearchTemplateQueryBuilder.java index a2b55fa8be..78fa4c3ad2 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/SearchTemplateQueryBuilder.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/SearchTemplateQueryBuilder.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/SeqNoPrimaryTerm.java b/src/main/java/org/springframework/data/elasticsearch/core/query/SeqNoPrimaryTerm.java index d47b074054..0623128504 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/SeqNoPrimaryTerm.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/SeqNoPrimaryTerm.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/query/SimpleField.java b/src/main/java/org/springframework/data/elasticsearch/core/query/SimpleField.java index ee2e0473ea..e943743654 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/SimpleField.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/SimpleField.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/SourceFilter.java b/src/main/java/org/springframework/data/elasticsearch/core/query/SourceFilter.java index 286a8da801..e6ef7c6554 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/SourceFilter.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/SourceFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2024 the original author or authors. + * Copyright 2016-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/StringQuery.java b/src/main/java/org/springframework/data/elasticsearch/core/query/StringQuery.java index e0ce51e87e..1b7a381475 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/StringQuery.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/StringQuery.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/StringQueryBuilder.java b/src/main/java/org/springframework/data/elasticsearch/core/query/StringQueryBuilder.java index 90e40de43f..f688bee788 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/StringQueryBuilder.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/StringQueryBuilder.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/UpdateQuery.java b/src/main/java/org/springframework/data/elasticsearch/core/query/UpdateQuery.java index b2daafd60f..90f759749e 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/UpdateQuery.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/UpdateQuery.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/UpdateResponse.java b/src/main/java/org/springframework/data/elasticsearch/core/query/UpdateResponse.java index 60fb1d0304..da26874257 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/UpdateResponse.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/UpdateResponse.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/query/highlight/Highlight.java b/src/main/java/org/springframework/data/elasticsearch/core/query/highlight/Highlight.java index cba0760742..7ebdeca969 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/highlight/Highlight.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/highlight/Highlight.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/highlight/HighlightCommonParameters.java b/src/main/java/org/springframework/data/elasticsearch/core/query/highlight/HighlightCommonParameters.java index a63185bbc5..a48523cf39 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/highlight/HighlightCommonParameters.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/highlight/HighlightCommonParameters.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/highlight/HighlightField.java b/src/main/java/org/springframework/data/elasticsearch/core/query/highlight/HighlightField.java index 1b8cf0d990..43c87d2a9a 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/highlight/HighlightField.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/highlight/HighlightField.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/highlight/HighlightFieldParameters.java b/src/main/java/org/springframework/data/elasticsearch/core/query/highlight/HighlightFieldParameters.java index 0e7103d102..2e14eb3c5f 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/highlight/HighlightFieldParameters.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/highlight/HighlightFieldParameters.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/highlight/HighlightParameters.java b/src/main/java/org/springframework/data/elasticsearch/core/query/highlight/HighlightParameters.java index 4878182989..32209ef16f 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/highlight/HighlightParameters.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/highlight/HighlightParameters.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/highlight/package-info.java b/src/main/java/org/springframework/data/elasticsearch/core/query/highlight/package-info.java index 5e4366ac41..b9a2dac3fe 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/highlight/package-info.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/highlight/package-info.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/types/ConflictsType.java b/src/main/java/org/springframework/data/elasticsearch/core/query/types/ConflictsType.java index 5c55159ddb..3c08b9adfc 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/types/ConflictsType.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/types/ConflictsType.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/query/types/OperatorType.java b/src/main/java/org/springframework/data/elasticsearch/core/query/types/OperatorType.java index 1135b3ac2c..91575000ed 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/query/types/OperatorType.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/query/types/OperatorType.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/reindex/ReindexRequest.java b/src/main/java/org/springframework/data/elasticsearch/core/reindex/ReindexRequest.java index b3582639ea..bf32e67ec0 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/reindex/ReindexRequest.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/reindex/ReindexRequest.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/reindex/ReindexResponse.java b/src/main/java/org/springframework/data/elasticsearch/core/reindex/ReindexResponse.java index baa7e9d217..dbb3e8cf45 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/reindex/ReindexResponse.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/reindex/ReindexResponse.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/reindex/Remote.java b/src/main/java/org/springframework/data/elasticsearch/core/reindex/Remote.java index 82ff011d1e..6454b67f25 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/reindex/Remote.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/reindex/Remote.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/script/ReactiveScriptOperations.java b/src/main/java/org/springframework/data/elasticsearch/core/script/ReactiveScriptOperations.java index 2939a43505..bed2d3667d 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/script/ReactiveScriptOperations.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/script/ReactiveScriptOperations.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/script/Script.java b/src/main/java/org/springframework/data/elasticsearch/core/script/Script.java index b5bdb560e4..b4c3d03722 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/script/Script.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/script/Script.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/script/ScriptOperations.java b/src/main/java/org/springframework/data/elasticsearch/core/script/ScriptOperations.java index 185fcc1347..8593293dce 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/script/ScriptOperations.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/script/ScriptOperations.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/suggest/Completion.java b/src/main/java/org/springframework/data/elasticsearch/core/suggest/Completion.java index 918c2bf3ed..88be836b33 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/suggest/Completion.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/suggest/Completion.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/suggest/package-info.java b/src/main/java/org/springframework/data/elasticsearch/core/suggest/package-info.java index a5e6b99f60..47463fc6ab 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/suggest/package-info.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/suggest/package-info.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/suggest/response/CompletionSuggestion.java b/src/main/java/org/springframework/data/elasticsearch/core/suggest/response/CompletionSuggestion.java index 6f9c05934c..94d93c80d1 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/suggest/response/CompletionSuggestion.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/suggest/response/CompletionSuggestion.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/suggest/response/PhraseSuggestion.java b/src/main/java/org/springframework/data/elasticsearch/core/suggest/response/PhraseSuggestion.java index e437ec05c7..ad50678d93 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/suggest/response/PhraseSuggestion.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/suggest/response/PhraseSuggestion.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/suggest/response/SortBy.java b/src/main/java/org/springframework/data/elasticsearch/core/suggest/response/SortBy.java index f377bb365a..3fda6cc51c 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/suggest/response/SortBy.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/suggest/response/SortBy.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/suggest/response/Suggest.java b/src/main/java/org/springframework/data/elasticsearch/core/suggest/response/Suggest.java index 03cec7b150..862d0ed442 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/suggest/response/Suggest.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/suggest/response/Suggest.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/suggest/response/TermSuggestion.java b/src/main/java/org/springframework/data/elasticsearch/core/suggest/response/TermSuggestion.java index b2aef3f22a..2e42bc00b6 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/suggest/response/TermSuggestion.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/suggest/response/TermSuggestion.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/repository/ElasticsearchRepository.java b/src/main/java/org/springframework/data/elasticsearch/repository/ElasticsearchRepository.java index 9527cabfc1..44331d72e1 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/ElasticsearchRepository.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/ElasticsearchRepository.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/repository/ReactiveElasticsearchRepository.java b/src/main/java/org/springframework/data/elasticsearch/repository/ReactiveElasticsearchRepository.java index a00ebecc6e..59ee81f307 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/ReactiveElasticsearchRepository.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/ReactiveElasticsearchRepository.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", @Nullable RefreshPolicy refreshPolicy); * you may not use this file except in compliance with the License. diff --git a/src/main/java/org/springframework/data/elasticsearch/repository/aot/RepositoryRuntimeHints.java b/src/main/java/org/springframework/data/elasticsearch/repository/aot/RepositoryRuntimeHints.java index 35b8caf27f..b86a7137c9 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/aot/RepositoryRuntimeHints.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/aot/RepositoryRuntimeHints.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/repository/cdi/ElasticsearchRepositoryBean.java b/src/main/java/org/springframework/data/elasticsearch/repository/cdi/ElasticsearchRepositoryBean.java index 255ed2dc1b..458a343a6e 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/cdi/ElasticsearchRepositoryBean.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/cdi/ElasticsearchRepositoryBean.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/repository/cdi/ElasticsearchRepositoryExtension.java b/src/main/java/org/springframework/data/elasticsearch/repository/cdi/ElasticsearchRepositoryExtension.java index 7bc97fa726..cb7e50ad2c 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/cdi/ElasticsearchRepositoryExtension.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/cdi/ElasticsearchRepositoryExtension.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/repository/config/ElasticsearchRepositoriesRegistrar.java b/src/main/java/org/springframework/data/elasticsearch/repository/config/ElasticsearchRepositoriesRegistrar.java index 5f1d2f5841..4f643ebab2 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/config/ElasticsearchRepositoriesRegistrar.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/config/ElasticsearchRepositoriesRegistrar.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/repository/config/ElasticsearchRepositoryConfigExtension.java b/src/main/java/org/springframework/data/elasticsearch/repository/config/ElasticsearchRepositoryConfigExtension.java index 7607ac6235..b1caf1b3eb 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/config/ElasticsearchRepositoryConfigExtension.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/config/ElasticsearchRepositoryConfigExtension.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/repository/config/EnableElasticsearchRepositories.java b/src/main/java/org/springframework/data/elasticsearch/repository/config/EnableElasticsearchRepositories.java index 8109e8a717..120d0df50f 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/config/EnableElasticsearchRepositories.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/config/EnableElasticsearchRepositories.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/repository/config/EnableReactiveElasticsearchRepositories.java b/src/main/java/org/springframework/data/elasticsearch/repository/config/EnableReactiveElasticsearchRepositories.java index b56b27470a..42e1534f02 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/config/EnableReactiveElasticsearchRepositories.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/config/EnableReactiveElasticsearchRepositories.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/repository/config/ReactiveElasticsearchRepositoriesRegistrar.java b/src/main/java/org/springframework/data/elasticsearch/repository/config/ReactiveElasticsearchRepositoriesRegistrar.java index d834115f05..485f322bd1 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/config/ReactiveElasticsearchRepositoriesRegistrar.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/config/ReactiveElasticsearchRepositoriesRegistrar.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/repository/config/ReactiveElasticsearchRepositoryConfigurationExtension.java b/src/main/java/org/springframework/data/elasticsearch/repository/config/ReactiveElasticsearchRepositoryConfigurationExtension.java index 5079290a40..6eb546eec6 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/config/ReactiveElasticsearchRepositoryConfigurationExtension.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/config/ReactiveElasticsearchRepositoryConfigurationExtension.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/repository/query/AbstractElasticsearchRepositoryQuery.java b/src/main/java/org/springframework/data/elasticsearch/repository/query/AbstractElasticsearchRepositoryQuery.java index a8f744e377..4420c7e091 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/query/AbstractElasticsearchRepositoryQuery.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/query/AbstractElasticsearchRepositoryQuery.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/repository/query/AbstractReactiveElasticsearchRepositoryQuery.java b/src/main/java/org/springframework/data/elasticsearch/repository/query/AbstractReactiveElasticsearchRepositoryQuery.java index cd87229b1f..74d3e78d75 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/query/AbstractReactiveElasticsearchRepositoryQuery.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/query/AbstractReactiveElasticsearchRepositoryQuery.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/repository/query/ElasticsearchEntityMetadata.java b/src/main/java/org/springframework/data/elasticsearch/repository/query/ElasticsearchEntityMetadata.java index 2b6c9b4280..4e041b4282 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/query/ElasticsearchEntityMetadata.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/query/ElasticsearchEntityMetadata.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/repository/query/ElasticsearchParameter.java b/src/main/java/org/springframework/data/elasticsearch/repository/query/ElasticsearchParameter.java index 7ffcb77a8b..4f7039f94c 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/query/ElasticsearchParameter.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/query/ElasticsearchParameter.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/repository/query/ElasticsearchParameterAccessor.java b/src/main/java/org/springframework/data/elasticsearch/repository/query/ElasticsearchParameterAccessor.java index 3b01e97057..fd3450919c 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/query/ElasticsearchParameterAccessor.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/query/ElasticsearchParameterAccessor.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/repository/query/ElasticsearchParameters.java b/src/main/java/org/springframework/data/elasticsearch/repository/query/ElasticsearchParameters.java index dd736c41f1..7b2e724692 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/query/ElasticsearchParameters.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/query/ElasticsearchParameters.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/repository/query/ElasticsearchParametersParameterAccessor.java b/src/main/java/org/springframework/data/elasticsearch/repository/query/ElasticsearchParametersParameterAccessor.java index 92f4992c40..7ff3055118 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/query/ElasticsearchParametersParameterAccessor.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/query/ElasticsearchParametersParameterAccessor.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/repository/query/ElasticsearchPartQuery.java b/src/main/java/org/springframework/data/elasticsearch/repository/query/ElasticsearchPartQuery.java index cee8e00d2c..f4bec2da9f 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/query/ElasticsearchPartQuery.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/query/ElasticsearchPartQuery.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/repository/query/ElasticsearchQueryMethod.java b/src/main/java/org/springframework/data/elasticsearch/repository/query/ElasticsearchQueryMethod.java index f030023f2c..6b0f54311e 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/query/ElasticsearchQueryMethod.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/query/ElasticsearchQueryMethod.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/repository/query/ElasticsearchStringQuery.java b/src/main/java/org/springframework/data/elasticsearch/repository/query/ElasticsearchStringQuery.java index 1ba765a009..4bbbefab66 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/query/ElasticsearchStringQuery.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/query/ElasticsearchStringQuery.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/repository/query/HighlightConverter.java b/src/main/java/org/springframework/data/elasticsearch/repository/query/HighlightConverter.java index 8e74b0a30b..843aadecd2 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/query/HighlightConverter.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/query/HighlightConverter.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/repository/query/ReactiveElasticsearchParametersParameterAccessor.java b/src/main/java/org/springframework/data/elasticsearch/repository/query/ReactiveElasticsearchParametersParameterAccessor.java index 9ec8b46a90..8688dcb0d8 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/query/ReactiveElasticsearchParametersParameterAccessor.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/query/ReactiveElasticsearchParametersParameterAccessor.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/repository/query/ReactiveElasticsearchQueryExecution.java b/src/main/java/org/springframework/data/elasticsearch/repository/query/ReactiveElasticsearchQueryExecution.java index dab654c601..d66a0087e0 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/query/ReactiveElasticsearchQueryExecution.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/query/ReactiveElasticsearchQueryExecution.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/repository/query/ReactiveElasticsearchQueryMethod.java b/src/main/java/org/springframework/data/elasticsearch/repository/query/ReactiveElasticsearchQueryMethod.java index 047a0756d3..320ff5cf66 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/query/ReactiveElasticsearchQueryMethod.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/query/ReactiveElasticsearchQueryMethod.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/repository/query/ReactiveElasticsearchStringQuery.java b/src/main/java/org/springframework/data/elasticsearch/repository/query/ReactiveElasticsearchStringQuery.java index c15b4dfb26..3fbbfff539 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/query/ReactiveElasticsearchStringQuery.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/query/ReactiveElasticsearchStringQuery.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/repository/query/ReactivePartTreeElasticsearchQuery.java b/src/main/java/org/springframework/data/elasticsearch/repository/query/ReactivePartTreeElasticsearchQuery.java index 1da8c29a61..1b16e2e5a9 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/query/ReactivePartTreeElasticsearchQuery.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/query/ReactivePartTreeElasticsearchQuery.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/repository/query/SimpleElasticsearchEntityMetadata.java b/src/main/java/org/springframework/data/elasticsearch/repository/query/SimpleElasticsearchEntityMetadata.java index 3ba461f122..86c51400f8 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/query/SimpleElasticsearchEntityMetadata.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/query/SimpleElasticsearchEntityMetadata.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/repository/query/parser/ElasticsearchQueryCreator.java b/src/main/java/org/springframework/data/elasticsearch/repository/query/parser/ElasticsearchQueryCreator.java index ebb3618802..e681d018d7 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/query/parser/ElasticsearchQueryCreator.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/query/parser/ElasticsearchQueryCreator.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/repository/support/ElasticsearchEntityInformation.java b/src/main/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchEntityInformation.java index 58d30d919e..6e71c428c9 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchEntityInformation.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchEntityInformation.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/repository/support/ElasticsearchEntityInformationCreator.java b/src/main/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchEntityInformationCreator.java index 151699db8a..fa91061431 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchEntityInformationCreator.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchEntityInformationCreator.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/repository/support/ElasticsearchEntityInformationCreatorImpl.java b/src/main/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchEntityInformationCreatorImpl.java index 122770bc98..c571e2920e 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchEntityInformationCreatorImpl.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchEntityInformationCreatorImpl.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/repository/support/ElasticsearchRepositoryFactory.java b/src/main/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchRepositoryFactory.java index b7c5f29eca..321cbff344 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchRepositoryFactory.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchRepositoryFactory.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/repository/support/ElasticsearchRepositoryFactoryBean.java b/src/main/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchRepositoryFactoryBean.java index 87d7f7bec6..e331fa60e9 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchRepositoryFactoryBean.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchRepositoryFactoryBean.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/repository/support/ElasticsearchRepositoryMetadata.java b/src/main/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchRepositoryMetadata.java index 5f1a8e4416..46cea4961f 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchRepositoryMetadata.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchRepositoryMetadata.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/repository/support/MappingElasticsearchEntityInformation.java b/src/main/java/org/springframework/data/elasticsearch/repository/support/MappingElasticsearchEntityInformation.java index 6d106ab5c6..7c3152ed3f 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/support/MappingElasticsearchEntityInformation.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/support/MappingElasticsearchEntityInformation.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/repository/support/QueryStringPlaceholderReplacer.java b/src/main/java/org/springframework/data/elasticsearch/repository/support/QueryStringPlaceholderReplacer.java index 7d93623cdf..82bf414afc 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/support/QueryStringPlaceholderReplacer.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/support/QueryStringPlaceholderReplacer.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/repository/support/QueryStringProcessor.java b/src/main/java/org/springframework/data/elasticsearch/repository/support/QueryStringProcessor.java index 8ac45acb7f..bf00809915 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/support/QueryStringProcessor.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/support/QueryStringProcessor.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/repository/support/ReactiveElasticsearchRepositoryFactory.java b/src/main/java/org/springframework/data/elasticsearch/repository/support/ReactiveElasticsearchRepositoryFactory.java index d4f65a7aa0..49e1e18fc3 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/support/ReactiveElasticsearchRepositoryFactory.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/support/ReactiveElasticsearchRepositoryFactory.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/repository/support/ReactiveElasticsearchRepositoryFactoryBean.java b/src/main/java/org/springframework/data/elasticsearch/repository/support/ReactiveElasticsearchRepositoryFactoryBean.java index de810586f4..b58bb3999b 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/support/ReactiveElasticsearchRepositoryFactoryBean.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/support/ReactiveElasticsearchRepositoryFactoryBean.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/repository/support/ReactiveElasticsearchRepositoryMetadata.java b/src/main/java/org/springframework/data/elasticsearch/repository/support/ReactiveElasticsearchRepositoryMetadata.java index 2950975473..29b540dd6c 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/support/ReactiveElasticsearchRepositoryMetadata.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/support/ReactiveElasticsearchRepositoryMetadata.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/repository/support/SimpleElasticsearchRepository.java b/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java index e4d1da6e20..e58d9cc762 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleElasticsearchRepository.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/repository/support/SimpleReactiveElasticsearchRepository.java b/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java index 94dc3a60c3..1d9c116cf6 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepository.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/repository/support/querybyexample/ExampleCriteriaMapper.java b/src/main/java/org/springframework/data/elasticsearch/repository/support/querybyexample/ExampleCriteriaMapper.java index 91332e4080..cd3eefa925 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/support/querybyexample/ExampleCriteriaMapper.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/support/querybyexample/ExampleCriteriaMapper.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/repository/support/querybyexample/QueryByExampleElasticsearchExecutor.java b/src/main/java/org/springframework/data/elasticsearch/repository/support/querybyexample/QueryByExampleElasticsearchExecutor.java index 9001a888c5..4386581bc0 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/support/querybyexample/QueryByExampleElasticsearchExecutor.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/support/querybyexample/QueryByExampleElasticsearchExecutor.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/repository/support/querybyexample/ReactiveQueryByExampleElasticsearchExecutor.java b/src/main/java/org/springframework/data/elasticsearch/repository/support/querybyexample/ReactiveQueryByExampleElasticsearchExecutor.java index 1dffcf85dc..de6b1e07ce 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/support/querybyexample/ReactiveQueryByExampleElasticsearchExecutor.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/support/querybyexample/ReactiveQueryByExampleElasticsearchExecutor.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/repository/support/spel/QueryStringSpELEvaluator.java b/src/main/java/org/springframework/data/elasticsearch/repository/support/spel/QueryStringSpELEvaluator.java index 66fe369b4c..3d691d3137 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/support/spel/QueryStringSpELEvaluator.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/support/spel/QueryStringSpELEvaluator.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/repository/support/value/ElasticsearchCollectionValueToStringConverter.java b/src/main/java/org/springframework/data/elasticsearch/repository/support/value/ElasticsearchCollectionValueToStringConverter.java index 4179fa1a1f..706e11de22 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/support/value/ElasticsearchCollectionValueToStringConverter.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/support/value/ElasticsearchCollectionValueToStringConverter.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/repository/support/value/ElasticsearchQueryValueConversionService.java b/src/main/java/org/springframework/data/elasticsearch/repository/support/value/ElasticsearchQueryValueConversionService.java index 5f276bc80a..67540ee1fc 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/support/value/ElasticsearchQueryValueConversionService.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/support/value/ElasticsearchQueryValueConversionService.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/repository/support/value/ElasticsearchStringValueToStringConverter.java b/src/main/java/org/springframework/data/elasticsearch/repository/support/value/ElasticsearchStringValueToStringConverter.java index b336e075dc..23b4a75de0 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/support/value/ElasticsearchStringValueToStringConverter.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/support/value/ElasticsearchStringValueToStringConverter.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/support/DefaultStringObjectMap.java b/src/main/java/org/springframework/data/elasticsearch/support/DefaultStringObjectMap.java index 0d94e9e28c..a27aa036c6 100644 --- a/src/main/java/org/springframework/data/elasticsearch/support/DefaultStringObjectMap.java +++ b/src/main/java/org/springframework/data/elasticsearch/support/DefaultStringObjectMap.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/support/ExceptionUtils.java b/src/main/java/org/springframework/data/elasticsearch/support/ExceptionUtils.java index 22c4729e07..4fcc56ffad 100644 --- a/src/main/java/org/springframework/data/elasticsearch/support/ExceptionUtils.java +++ b/src/main/java/org/springframework/data/elasticsearch/support/ExceptionUtils.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/support/HttpHeaders.java b/src/main/java/org/springframework/data/elasticsearch/support/HttpHeaders.java index 61f01e5d81..464b7253e1 100644 --- a/src/main/java/org/springframework/data/elasticsearch/support/HttpHeaders.java +++ b/src/main/java/org/springframework/data/elasticsearch/support/HttpHeaders.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/support/ScoreDoc.java b/src/main/java/org/springframework/data/elasticsearch/support/ScoreDoc.java index d52090d2c6..c5079133f6 100644 --- a/src/main/java/org/springframework/data/elasticsearch/support/ScoreDoc.java +++ b/src/main/java/org/springframework/data/elasticsearch/support/ScoreDoc.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/support/StringObjectMap.java b/src/main/java/org/springframework/data/elasticsearch/support/StringObjectMap.java index ecf92303e7..0cb286c7d9 100644 --- a/src/main/java/org/springframework/data/elasticsearch/support/StringObjectMap.java +++ b/src/main/java/org/springframework/data/elasticsearch/support/StringObjectMap.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/support/Version.java b/src/main/java/org/springframework/data/elasticsearch/support/Version.java index a4506e5040..b8aae6a70e 100644 --- a/src/main/java/org/springframework/data/elasticsearch/support/Version.java +++ b/src/main/java/org/springframework/data/elasticsearch/support/Version.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/support/VersionInfo.java b/src/main/java/org/springframework/data/elasticsearch/support/VersionInfo.java index 5d9255ff01..f9f85b6aac 100644 --- a/src/main/java/org/springframework/data/elasticsearch/support/VersionInfo.java +++ b/src/main/java/org/springframework/data/elasticsearch/support/VersionInfo.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/utils/geohash/BitUtil.java b/src/main/java/org/springframework/data/elasticsearch/utils/geohash/BitUtil.java index 06ddba1a19..175983a740 100644 --- a/src/main/java/org/springframework/data/elasticsearch/utils/geohash/BitUtil.java +++ b/src/main/java/org/springframework/data/elasticsearch/utils/geohash/BitUtil.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/utils/geohash/Geohash.java b/src/main/java/org/springframework/data/elasticsearch/utils/geohash/Geohash.java index 410f067782..cf444bfc48 100644 --- a/src/main/java/org/springframework/data/elasticsearch/utils/geohash/Geohash.java +++ b/src/main/java/org/springframework/data/elasticsearch/utils/geohash/Geohash.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. @@ -17,6 +17,7 @@ import java.util.ArrayList; import java.util.Collection; +import java.util.Locale; import org.springframework.util.Assert; @@ -84,7 +85,7 @@ public static String toLatLon(final String geohash) { Assert.notNull(geohash, "geohash must not be null"); var point = Geohash.toPoint(geohash); - return String.format("%f,%f", point.getLat(), point.getLon()); + return String.format(Locale.ROOT, "%f,%f", point.getLat(), point.getLon()); } /** diff --git a/src/main/java/org/springframework/data/elasticsearch/utils/geohash/Geometry.java b/src/main/java/org/springframework/data/elasticsearch/utils/geohash/Geometry.java index d53b572ba1..0ca757d4f3 100644 --- a/src/main/java/org/springframework/data/elasticsearch/utils/geohash/Geometry.java +++ b/src/main/java/org/springframework/data/elasticsearch/utils/geohash/Geometry.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/utils/geohash/GeometryValidator.java b/src/main/java/org/springframework/data/elasticsearch/utils/geohash/GeometryValidator.java index 2a866f454c..c06f3ddc10 100644 --- a/src/main/java/org/springframework/data/elasticsearch/utils/geohash/GeometryValidator.java +++ b/src/main/java/org/springframework/data/elasticsearch/utils/geohash/GeometryValidator.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/utils/geohash/GeometryVisitor.java b/src/main/java/org/springframework/data/elasticsearch/utils/geohash/GeometryVisitor.java index 6afabb2f18..e2daa06595 100644 --- a/src/main/java/org/springframework/data/elasticsearch/utils/geohash/GeometryVisitor.java +++ b/src/main/java/org/springframework/data/elasticsearch/utils/geohash/GeometryVisitor.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/utils/geohash/Point.java b/src/main/java/org/springframework/data/elasticsearch/utils/geohash/Point.java index 8a849b0762..7e979b3657 100644 --- a/src/main/java/org/springframework/data/elasticsearch/utils/geohash/Point.java +++ b/src/main/java/org/springframework/data/elasticsearch/utils/geohash/Point.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/utils/geohash/Rectangle.java b/src/main/java/org/springframework/data/elasticsearch/utils/geohash/Rectangle.java index af187bb88b..c8145e7ab9 100644 --- a/src/main/java/org/springframework/data/elasticsearch/utils/geohash/Rectangle.java +++ b/src/main/java/org/springframework/data/elasticsearch/utils/geohash/Rectangle.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/utils/geohash/ShapeType.java b/src/main/java/org/springframework/data/elasticsearch/utils/geohash/ShapeType.java index ad0597258f..386fac749f 100644 --- a/src/main/java/org/springframework/data/elasticsearch/utils/geohash/ShapeType.java +++ b/src/main/java/org/springframework/data/elasticsearch/utils/geohash/ShapeType.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/utils/geohash/StandardValidator.java b/src/main/java/org/springframework/data/elasticsearch/utils/geohash/StandardValidator.java index a2b909a312..98659e7c74 100644 --- a/src/main/java/org/springframework/data/elasticsearch/utils/geohash/StandardValidator.java +++ b/src/main/java/org/springframework/data/elasticsearch/utils/geohash/StandardValidator.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/utils/geohash/WellKnownText.java b/src/main/java/org/springframework/data/elasticsearch/utils/geohash/WellKnownText.java index c65944f758..1b72c579bc 100644 --- a/src/main/java/org/springframework/data/elasticsearch/utils/geohash/WellKnownText.java +++ b/src/main/java/org/springframework/data/elasticsearch/utils/geohash/WellKnownText.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/utils/geohash/package-info.java b/src/main/java/org/springframework/data/elasticsearch/utils/geohash/package-info.java index 0f9a90ec4b..dbcea229e9 100644 --- a/src/main/java/org/springframework/data/elasticsearch/utils/geohash/package-info.java +++ b/src/main/java/org/springframework/data/elasticsearch/utils/geohash/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/kotlin/org/springframework/data/elasticsearch/core/SearchOperationsExtensions.kt b/src/main/kotlin/org/springframework/data/elasticsearch/core/SearchOperationsExtensions.kt index c8b67855c6..f7d9c9ecc9 100644 --- a/src/main/kotlin/org/springframework/data/elasticsearch/core/SearchOperationsExtensions.kt +++ b/src/main/kotlin/org/springframework/data/elasticsearch/core/SearchOperationsExtensions.kt @@ -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/kotlin/org/springframework/data/elasticsearch/repository/CoroutineElasticsearchRepository.kt b/src/main/kotlin/org/springframework/data/elasticsearch/repository/CoroutineElasticsearchRepository.kt index cd0bc24afa..221db17db9 100644 --- a/src/main/kotlin/org/springframework/data/elasticsearch/repository/CoroutineElasticsearchRepository.kt +++ b/src/main/kotlin/org/springframework/data/elasticsearch/repository/CoroutineElasticsearchRepository.kt @@ -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/resources/notice.txt b/src/main/resources/notice.txt index 8cee1fd55e..aef66b261c 100644 --- a/src/main/resources/notice.txt +++ b/src/main/resources/notice.txt @@ -1,4 +1,4 @@ -Spring Data Elasticsearch 5.3 GA (2024.0.0) +Spring Data Elasticsearch 5.3.12 (2024.0.12) Copyright (c) [2013-2022] Pivotal Software, Inc. This product is licensed to you under the Apache License, Version 2.0 (the "License"). @@ -16,6 +16,18 @@ conditions of the subcomponent's license, as noted in the LICENSE file. + + + + + + + + + + + + diff --git a/src/test/java/org/elasticsearch/bootstrap/JarHell.java b/src/test/java/org/elasticsearch/bootstrap/JarHell.java index 8db87b0d64..a4369f3c63 100644 --- a/src/test/java/org/elasticsearch/bootstrap/JarHell.java +++ b/src/test/java/org/elasticsearch/bootstrap/JarHell.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/test/java/org/springframework/data/elasticsearch/BulkFailureExceptionTest.java b/src/test/java/org/springframework/data/elasticsearch/BulkFailureExceptionTest.java index e086cc0664..88743e4477 100644 --- a/src/test/java/org/springframework/data/elasticsearch/BulkFailureExceptionTest.java +++ b/src/test/java/org/springframework/data/elasticsearch/BulkFailureExceptionTest.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/test/java/org/springframework/data/elasticsearch/DocumentUnitTests.java b/src/test/java/org/springframework/data/elasticsearch/DocumentUnitTests.java index 279cb7467f..d083be144b 100644 --- a/src/test/java/org/springframework/data/elasticsearch/DocumentUnitTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/DocumentUnitTests.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/test/java/org/springframework/data/elasticsearch/JUnit5ClusterConnectionTests.java b/src/test/java/org/springframework/data/elasticsearch/JUnit5ClusterConnectionTests.java index 72433075c7..acbe9bfbb9 100644 --- a/src/test/java/org/springframework/data/elasticsearch/JUnit5ClusterConnectionTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/JUnit5ClusterConnectionTests.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/test/java/org/springframework/data/elasticsearch/JUnit5SampleElasticsearchTemplateTests.java b/src/test/java/org/springframework/data/elasticsearch/JUnit5SampleElasticsearchTemplateTests.java index b48148fd3a..363f93906b 100644 --- a/src/test/java/org/springframework/data/elasticsearch/JUnit5SampleElasticsearchTemplateTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/JUnit5SampleElasticsearchTemplateTests.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/test/java/org/springframework/data/elasticsearch/JUnit5SampleReactiveELCTests.java b/src/test/java/org/springframework/data/elasticsearch/JUnit5SampleReactiveELCTests.java index 53c6e5b7e2..d5b6f48e11 100644 --- a/src/test/java/org/springframework/data/elasticsearch/JUnit5SampleReactiveELCTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/JUnit5SampleReactiveELCTests.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/test/java/org/springframework/data/elasticsearch/NestedObjectELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/NestedObjectELCIntegrationTests.java index 3c29d8d3d6..e99b5e72fb 100644 --- a/src/test/java/org/springframework/data/elasticsearch/NestedObjectELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/NestedObjectELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/NestedObjectIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/NestedObjectIntegrationTests.java index 85b9c8a655..38ebf66e09 100644 --- a/src/test/java/org/springframework/data/elasticsearch/NestedObjectIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/NestedObjectIntegrationTests.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/test/java/org/springframework/data/elasticsearch/annotations/ComposableAnnotationsUnitTest.java b/src/test/java/org/springframework/data/elasticsearch/annotations/ComposableAnnotationsUnitTest.java index d7dc516ac1..e376c0beb6 100644 --- a/src/test/java/org/springframework/data/elasticsearch/annotations/ComposableAnnotationsUnitTest.java +++ b/src/test/java/org/springframework/data/elasticsearch/annotations/ComposableAnnotationsUnitTest.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/test/java/org/springframework/data/elasticsearch/blockhound/BlockHoundIntegrationCustomizer.java b/src/test/java/org/springframework/data/elasticsearch/blockhound/BlockHoundIntegrationCustomizer.java deleted file mode 100644 index 1f79dc622e..0000000000 --- a/src/test/java/org/springframework/data/elasticsearch/blockhound/BlockHoundIntegrationCustomizer.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2021-2024 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. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.springframework.data.elasticsearch.blockhound; - -import reactor.blockhound.BlockHound; -import reactor.blockhound.BlockingOperationError; -import reactor.blockhound.integration.BlockHoundIntegration; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -/** - * @author Peter-Josef Meisch - */ -public class BlockHoundIntegrationCustomizer implements BlockHoundIntegration { - - private static final Log LOGGER = LogFactory.getLog(BlockHoundIntegrationCustomizer.class); - - @Override - public void applyTo(BlockHound.Builder builder) { - // Elasticsearch classes reading from the classpath on initialization, needed for parsing Elasticsearch responses - builder // - .allowBlockingCallsInside("org.elasticsearch.Build", "") // - .allowBlockingCallsInside("org.elasticsearch.common.xcontent.XContentBuilder", "") // pre 7.16 - .allowBlockingCallsInside("org.elasticsearch.common.XContentBuilder", "") // from 7.16 on - .allowBlockingCallsInside("org.elasticsearch.xcontent.json.JsonXContent", "contentBuilder") // from 7.16 on - .allowBlockingCallsInside("jakarta.json.spi.JsonProvider", "provider") // - ; - builder.blockingMethodCallback(it -> { - LOGGER.error("BlockHound error", new Error(it.toString())); - throw new BlockingOperationError(it); - }); - - } -} diff --git a/src/test/java/org/springframework/data/elasticsearch/blockhound/BlockHoundTests.java b/src/test/java/org/springframework/data/elasticsearch/blockhound/BlockHoundTests.java deleted file mode 100644 index 2e10327d45..0000000000 --- a/src/test/java/org/springframework/data/elasticsearch/blockhound/BlockHoundTests.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2021-2024 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. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.springframework.data.elasticsearch.blockhound; - -import static org.assertj.core.api.Assertions.*; - -import reactor.blockhound.BlockingOperationError; -import reactor.core.publisher.Mono; - -import java.time.Duration; - -import org.junit.jupiter.api.DisplayName; -import org.junit.jupiter.api.Test; - -/** - * @author Peter-Josef Meisch - */ -public class BlockHoundTests { - - @Test // #1822 - @DisplayName("should fail if BlockHound is not installed") - void shouldFailIfBlockHoundIsNotInstalled() { - - assertThatThrownBy(() -> { - Mono.delay(Duration.ofMillis(1)).doOnNext(it -> { - try { - Thread.sleep(10); - } catch (InterruptedException e) { - throw new RuntimeException(e); - } - }).block(); // should throw an exception about Thread.sleep - }).hasCauseInstanceOf(BlockingOperationError.class); - } -} diff --git a/src/test/java/org/springframework/data/elasticsearch/client/ClientConfigurationUnitTests.java b/src/test/java/org/springframework/data/elasticsearch/client/ClientConfigurationUnitTests.java index 3638e1eb0b..aa61213a20 100644 --- a/src/test/java/org/springframework/data/elasticsearch/client/ClientConfigurationUnitTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/client/ClientConfigurationUnitTests.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/test/java/org/springframework/data/elasticsearch/client/InetSocketAddressParserUnitTests.java b/src/test/java/org/springframework/data/elasticsearch/client/InetSocketAddressParserUnitTests.java index 8e3a56c86d..8bbef09c18 100644 --- a/src/test/java/org/springframework/data/elasticsearch/client/InetSocketAddressParserUnitTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/client/InetSocketAddressParserUnitTests.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/test/java/org/springframework/data/elasticsearch/client/RestClientsTest.java b/src/test/java/org/springframework/data/elasticsearch/client/RestClientsTest.java index 20c8b0dc26..f8c9b6e495 100644 --- a/src/test/java/org/springframework/data/elasticsearch/client/RestClientsTest.java +++ b/src/test/java/org/springframework/data/elasticsearch/client/RestClientsTest.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/test/java/org/springframework/data/elasticsearch/client/elc/AutoCloseableElasticsearchClientTest.java b/src/test/java/org/springframework/data/elasticsearch/client/elc/AutoCloseableElasticsearchClientTest.java index 83ae05750c..279d64936c 100644 --- a/src/test/java/org/springframework/data/elasticsearch/client/elc/AutoCloseableElasticsearchClientTest.java +++ b/src/test/java/org/springframework/data/elasticsearch/client/elc/AutoCloseableElasticsearchClientTest.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/test/java/org/springframework/data/elasticsearch/client/elc/CriteriaQueryMappingUnitTests.java b/src/test/java/org/springframework/data/elasticsearch/client/elc/CriteriaQueryMappingUnitTests.java index ed44cacbd0..e53a33df67 100644 --- a/src/test/java/org/springframework/data/elasticsearch/client/elc/CriteriaQueryMappingUnitTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/client/elc/CriteriaQueryMappingUnitTests.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. @@ -15,6 +15,7 @@ */ package org.springframework.data.elasticsearch.client.elc; +import static org.assertj.core.api.Assertions.*; import static org.skyscreamer.jsonassert.JSONAssert.*; import static org.springframework.data.elasticsearch.client.elc.JsonUtils.*; @@ -22,6 +23,7 @@ import co.elastic.clients.json.jackson.JacksonJsonpMapper; import java.time.LocalDate; +import java.util.ArrayList; import java.util.Collections; import java.util.Date; import java.util.List; @@ -445,6 +447,108 @@ void shouldMapNamesInSourceStoredFields() { softly.assertAll(); } + // the following test failed because of a wrong implementation in Criteria + // equals and hscode methods. + @Test // #3083 + @DisplayName("should map correct subcriteria") + void shouldMapCorrectSubcriteria() throws JSONException { + Criteria criteria = new Criteria("first").is("hello"); + + List criterias = new ArrayList<>(); + criterias.add(new Criteria().or("second").exists()); + + List subCriterias = new ArrayList<>(); + subCriterias.add(new Criteria("third").exists() + .and(new Criteria("fourth").is("ciao"))); + subCriterias.add(new Criteria("third").exists() + .and(new Criteria("fourth").is("hi"))); + + Criteria result = Criteria.or(); + + for (Criteria c : criterias) { + result = result.or(c); + } + + for (Criteria c : subCriterias) { + result = result.subCriteria(c); + } + criteria = criteria.subCriteria(result); + CriteriaQuery criteriaQuery = new CriteriaQuery(criteria); + + String expected = """ + { + "bool": { + "must": [ + { + "query_string": { + "default_operator": "and", + "fields": [ + "first" + ], + "query": "hello" + } + }, + { + "bool": { + "should": [ + { + "exists": { + "field": "second" + } + }, + { + "bool": { + "must": [ + { + "exists": { + "field": "third" + } + }, + { + "query_string": { + "default_operator": "and", + "fields": [ + "fourth" + ], + "query": "ciao" + } + } + ] + } + }, + { + "bool": { + "must": [ + { + "exists": { + "field": "third" + } + }, + { + "query_string": { + "default_operator": "and", + "fields": [ + "fourth" + ], + "query": "hi" + } + } + ] + } + } + ] + } + } + ] + } + } + """; + + mappingElasticsearchConverter.updateQuery(criteriaQuery, Person.class); + var queryString = queryToJson(CriteriaQueryProcessor.createQuery(criteriaQuery.getCriteria()), mapper); + + assertEquals(expected, queryString, false); + } // endregion // region helper functions diff --git a/src/test/java/org/springframework/data/elasticsearch/client/elc/CriteriaQueryProcessorUnitTests.java b/src/test/java/org/springframework/data/elasticsearch/client/elc/CriteriaQueryProcessorUnitTests.java index c4d99f7048..9ef5bd13f2 100644 --- a/src/test/java/org/springframework/data/elasticsearch/client/elc/CriteriaQueryProcessorUnitTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/client/elc/CriteriaQueryProcessorUnitTests.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/test/java/org/springframework/data/elasticsearch/client/elc/DevTests.java b/src/test/java/org/springframework/data/elasticsearch/client/elc/DevTests.java index 856d5a3d32..54714bc30b 100644 --- a/src/test/java/org/springframework/data/elasticsearch/client/elc/DevTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/client/elc/DevTests.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/test/java/org/springframework/data/elasticsearch/client/elc/DocumentAdaptersUnitTests.java b/src/test/java/org/springframework/data/elasticsearch/client/elc/DocumentAdaptersUnitTests.java index cb0af89f8e..1b9e603397 100644 --- a/src/test/java/org/springframework/data/elasticsearch/client/elc/DocumentAdaptersUnitTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/client/elc/DocumentAdaptersUnitTests.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/test/java/org/springframework/data/elasticsearch/client/elc/ELCWiremockTests.java b/src/test/java/org/springframework/data/elasticsearch/client/elc/ELCWiremockTests.java index 84a8fb7ecc..4e6c092300 100644 --- a/src/test/java/org/springframework/data/elasticsearch/client/elc/ELCWiremockTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/client/elc/ELCWiremockTests.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/test/java/org/springframework/data/elasticsearch/client/elc/ElasticsearchPartQueryELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/client/elc/ElasticsearchPartQueryELCIntegrationTests.java index 94a9136a7b..86b3958402 100644 --- a/src/test/java/org/springframework/data/elasticsearch/client/elc/ElasticsearchPartQueryELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/client/elc/ElasticsearchPartQueryELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/client/elc/ReactiveIndicesTemplateTest.java b/src/test/java/org/springframework/data/elasticsearch/client/elc/ReactiveIndicesTemplateTest.java index d64c2aa91f..8e44ef0069 100644 --- a/src/test/java/org/springframework/data/elasticsearch/client/elc/ReactiveIndicesTemplateTest.java +++ b/src/test/java/org/springframework/data/elasticsearch/client/elc/ReactiveIndicesTemplateTest.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/test/java/org/springframework/data/elasticsearch/client/elc/RequestConverterTest.java b/src/test/java/org/springframework/data/elasticsearch/client/elc/RequestConverterTest.java index 5036f92c9b..a789eb4ad2 100644 --- a/src/test/java/org/springframework/data/elasticsearch/client/elc/RequestConverterTest.java +++ b/src/test/java/org/springframework/data/elasticsearch/client/elc/RequestConverterTest.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. @@ -30,12 +30,16 @@ import org.springframework.data.elasticsearch.core.convert.MappingElasticsearchConverter; import org.springframework.data.elasticsearch.core.mapping.IndexCoordinates; import org.springframework.data.elasticsearch.core.mapping.SimpleElasticsearchMappingContext; +import org.springframework.data.elasticsearch.core.query.Criteria; +import org.springframework.data.elasticsearch.core.query.CriteriaQuery; +import org.springframework.data.elasticsearch.core.query.DeleteQuery; import org.springframework.data.elasticsearch.core.query.DocValueField; import org.springframework.data.elasticsearch.core.query.StringQuery; import org.springframework.lang.Nullable; /** * @author Peter-Josef Meisch + * @author Han Seungwoo */ class RequestConverterTest { @@ -72,6 +76,19 @@ void shouldAddDocvalueFields() { assertThat(fieldAndFormats.get(1).format()).isEqualTo("format2"); } + @Test // #2973 + @DisplayName("should set refresh based on deleteRequest") + void refreshSetByDeleteRequest() { + var query = new CriteriaQuery(new Criteria("text").contains("test")); + var deleteQuery = DeleteQuery.builder(query).withRefresh(true).build(); + + var deleteByQueryRequest = requestConverter.documentDeleteByQueryRequest(deleteQuery, null, SampleEntity.class, + IndexCoordinates.of("foo"), + null); + + assertThat(deleteByQueryRequest.refresh()).isTrue(); + } + @Document(indexName = "does-not-matter") static class SampleEntity { @Nullable diff --git a/src/test/java/org/springframework/data/elasticsearch/client/elc/SearchDocumentResponseBuilderUnitTests.java b/src/test/java/org/springframework/data/elasticsearch/client/elc/SearchDocumentResponseBuilderUnitTests.java index ee1469178d..627c49bb33 100644 --- a/src/test/java/org/springframework/data/elasticsearch/client/elc/SearchDocumentResponseBuilderUnitTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/client/elc/SearchDocumentResponseBuilderUnitTests.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/test/java/org/springframework/data/elasticsearch/client/util/ScrollStateTest.java b/src/test/java/org/springframework/data/elasticsearch/client/util/ScrollStateTest.java index b6dc4719ec..562fc26c45 100644 --- a/src/test/java/org/springframework/data/elasticsearch/client/util/ScrollStateTest.java +++ b/src/test/java/org/springframework/data/elasticsearch/client/util/ScrollStateTest.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/test/java/org/springframework/data/elasticsearch/config/AuditingELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/config/AuditingELCIntegrationTests.java index fca9ec464c..1b73f5dcee 100644 --- a/src/test/java/org/springframework/data/elasticsearch/config/AuditingELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/config/AuditingELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/config/AuditingIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/config/AuditingIntegrationTests.java index 0552cad34b..4ee583aaa0 100644 --- a/src/test/java/org/springframework/data/elasticsearch/config/AuditingIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/config/AuditingIntegrationTests.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/test/java/org/springframework/data/elasticsearch/config/AuditingReactiveELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/config/AuditingReactiveELCIntegrationTests.java index 8c0b2f509d..30c514ad66 100644 --- a/src/test/java/org/springframework/data/elasticsearch/config/AuditingReactiveELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/config/AuditingReactiveELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/config/AuditingReactiveIntegrationTest.java b/src/test/java/org/springframework/data/elasticsearch/config/AuditingReactiveIntegrationTest.java index cd6e477a0b..2dfaee370e 100644 --- a/src/test/java/org/springframework/data/elasticsearch/config/AuditingReactiveIntegrationTest.java +++ b/src/test/java/org/springframework/data/elasticsearch/config/AuditingReactiveIntegrationTest.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/test/java/org/springframework/data/elasticsearch/config/ElasticsearchAuditingRegistrarUnitTests.java b/src/test/java/org/springframework/data/elasticsearch/config/ElasticsearchAuditingRegistrarUnitTests.java index 226afc603e..a2e5f3b5a7 100644 --- a/src/test/java/org/springframework/data/elasticsearch/config/ElasticsearchAuditingRegistrarUnitTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/config/ElasticsearchAuditingRegistrarUnitTests.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/test/java/org/springframework/data/elasticsearch/config/ElasticsearchConfigurationSupportUnitTests.java b/src/test/java/org/springframework/data/elasticsearch/config/ElasticsearchConfigurationSupportUnitTests.java index 9a828d7906..3470b6a79a 100644 --- a/src/test/java/org/springframework/data/elasticsearch/config/ElasticsearchConfigurationSupportUnitTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/config/ElasticsearchConfigurationSupportUnitTests.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/test/java/org/springframework/data/elasticsearch/config/configuration/ElasticsearchConfigurationELCTests.java b/src/test/java/org/springframework/data/elasticsearch/config/configuration/ElasticsearchConfigurationELCTests.java index 71e1cd3afd..489daba24d 100644 --- a/src/test/java/org/springframework/data/elasticsearch/config/configuration/ElasticsearchConfigurationELCTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/config/configuration/ElasticsearchConfigurationELCTests.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/test/java/org/springframework/data/elasticsearch/config/configuration/ReactiveElasticsearchConfigurationELCTests.java b/src/test/java/org/springframework/data/elasticsearch/config/configuration/ReactiveElasticsearchConfigurationELCTests.java index 0c9c8f5ca3..a01485c995 100644 --- a/src/test/java/org/springframework/data/elasticsearch/config/configuration/ReactiveElasticsearchConfigurationELCTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/config/configuration/ReactiveElasticsearchConfigurationELCTests.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/test/java/org/springframework/data/elasticsearch/config/namespace/ElasticsearchNamespaceHandlerTests.java b/src/test/java/org/springframework/data/elasticsearch/config/namespace/ElasticsearchNamespaceHandlerTests.java index 1989a601a3..0472e4d636 100644 --- a/src/test/java/org/springframework/data/elasticsearch/config/namespace/ElasticsearchNamespaceHandlerTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/config/namespace/ElasticsearchNamespaceHandlerTests.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/test/java/org/springframework/data/elasticsearch/config/nested/EnableNestedRepositoriesELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/config/nested/EnableNestedRepositoriesELCIntegrationTests.java index e546210d74..ca749ffe21 100644 --- a/src/test/java/org/springframework/data/elasticsearch/config/nested/EnableNestedRepositoriesELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/config/nested/EnableNestedRepositoriesELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/config/nested/EnableNestedRepositoriesIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/config/nested/EnableNestedRepositoriesIntegrationTests.java index 31651a0cc5..de50ad46e4 100644 --- a/src/test/java/org/springframework/data/elasticsearch/config/nested/EnableNestedRepositoriesIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/config/nested/EnableNestedRepositoriesIntegrationTests.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/test/java/org/springframework/data/elasticsearch/config/notnested/EnableRepositoriesELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/config/notnested/EnableRepositoriesELCIntegrationTests.java index e83a6fd2f5..9a56b59526 100644 --- a/src/test/java/org/springframework/data/elasticsearch/config/notnested/EnableRepositoriesELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/config/notnested/EnableRepositoriesELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/config/notnested/EnableRepositoriesIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/config/notnested/EnableRepositoriesIntegrationTests.java index b27b7deaf7..a40aa5eaa4 100644 --- a/src/test/java/org/springframework/data/elasticsearch/config/notnested/EnableRepositoriesIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/config/notnested/EnableRepositoriesIntegrationTests.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/test/java/org/springframework/data/elasticsearch/config/notnested/SampleElasticsearchRepository.java b/src/test/java/org/springframework/data/elasticsearch/config/notnested/SampleElasticsearchRepository.java index 87241dadf1..25bfb7c1f8 100644 --- a/src/test/java/org/springframework/data/elasticsearch/config/notnested/SampleElasticsearchRepository.java +++ b/src/test/java/org/springframework/data/elasticsearch/config/notnested/SampleElasticsearchRepository.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/test/java/org/springframework/data/elasticsearch/config/notnested/SampleUUIDKeyedElasticsearchRepository.java b/src/test/java/org/springframework/data/elasticsearch/config/notnested/SampleUUIDKeyedElasticsearchRepository.java index ae95501dd9..ec355e0981 100644 --- a/src/test/java/org/springframework/data/elasticsearch/config/notnested/SampleUUIDKeyedElasticsearchRepository.java +++ b/src/test/java/org/springframework/data/elasticsearch/config/notnested/SampleUUIDKeyedElasticsearchRepository.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/test/java/org/springframework/data/elasticsearch/core/ElasticsearchELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/ElasticsearchELCIntegrationTests.java index 5686cf69df..a7c6d62583 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/ElasticsearchELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/ElasticsearchELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/ElasticsearchIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/ElasticsearchIntegrationTests.java index 4c5c5a77f2..618ed38799 100755 --- a/src/test/java/org/springframework/data/elasticsearch/core/ElasticsearchIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/ElasticsearchIntegrationTests.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. @@ -1634,7 +1634,9 @@ void shouldDoUpdateByQueryForExistingDocument() { .withParams(Collections.singletonMap("newMessage", messageAfterUpdate)).withAbortOnVersionConflict(true) .build(); - operations.updateByQuery(updateQuery, IndexCoordinates.of(indexNameProvider.indexName())); + var byQueryResponse = operations.updateByQuery(updateQuery, IndexCoordinates.of(indexNameProvider.indexName())); + + assertThat(byQueryResponse.getUpdated()).isEqualTo(1); SampleEntity indexedEntity = operations.get(documentId, SampleEntity.class, IndexCoordinates.of(indexNameProvider.indexName())); diff --git a/src/test/java/org/springframework/data/elasticsearch/core/IndexCoordinatesUnitTests.java b/src/test/java/org/springframework/data/elasticsearch/core/IndexCoordinatesUnitTests.java index d16ce907b2..855fdbf41f 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/IndexCoordinatesUnitTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/IndexCoordinatesUnitTests.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/test/java/org/springframework/data/elasticsearch/core/InnerHitsELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/InnerHitsELCIntegrationTests.java index c0219db262..3d28a95c11 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/InnerHitsELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/InnerHitsELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/InnerHitsIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/InnerHitsIntegrationTests.java index 8ea2991adc..1f50ee60fe 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/InnerHitsIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/InnerHitsIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/LogEntityELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/LogEntityELCIntegrationTests.java index 186cf39dad..02c753df94 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/LogEntityELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/LogEntityELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/LogEntityIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/LogEntityIntegrationTests.java index 10905363ee..c189c68634 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/LogEntityIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/LogEntityIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/MappingContextBaseTests.java b/src/test/java/org/springframework/data/elasticsearch/core/MappingContextBaseTests.java index d74ab54725..fa54bf2c4b 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/MappingContextBaseTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/MappingContextBaseTests.java @@ -1,4 +1,4 @@ -/* 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/test/java/org/springframework/data/elasticsearch/core/PointInTimeELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/PointInTimeELCIntegrationTests.java index 3a3674dc4a..ed1ccf162c 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/PointInTimeELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/PointInTimeELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/PointInTimeIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/PointInTimeIntegrationTests.java index dff56565b1..63ec4fec90 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/PointInTimeIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/PointInTimeIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchELCIntegrationTests.java index 548c87ac68..f6ead65ff2 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java index 270e56cdec..e39131dfad 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/ReactivePointInTimeELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/ReactivePointInTimeELCIntegrationTests.java index 4232a7ffcc..4cb9366e44 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/ReactivePointInTimeELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/ReactivePointInTimeELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/ReactivePointInTimeIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/ReactivePointInTimeIntegrationTests.java index 161a11ca6a..b6b2695929 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/ReactivePointInTimeIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/ReactivePointInTimeIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/ReactiveReindexELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/ReactiveReindexELCIntegrationTests.java index 7034417dbb..8c1843082a 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/ReactiveReindexELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/ReactiveReindexELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/ReactiveReindexIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/ReactiveReindexIntegrationTests.java index bd2568be30..e1dddee382 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/ReactiveReindexIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/ReactiveReindexIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/ReactiveResourceUtilTest.java b/src/test/java/org/springframework/data/elasticsearch/core/ReactiveResourceUtilTest.java index 9ba6f5b5c7..79c574b3d9 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/ReactiveResourceUtilTest.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/ReactiveResourceUtilTest.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/test/java/org/springframework/data/elasticsearch/core/ReactiveSearchTemplateELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/ReactiveSearchTemplateELCIntegrationTests.java index 118790de54..d049cf2919 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/ReactiveSearchTemplateELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/ReactiveSearchTemplateELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/ReactiveSearchTemplateIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/ReactiveSearchTemplateIntegrationTests.java index f80bd48d7f..7b3abbd9ec 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/ReactiveSearchTemplateIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/ReactiveSearchTemplateIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/ReindexELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/ReindexELCIntegrationTests.java index c66c94073d..3d5264ea8d 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/ReindexELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/ReindexELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/ReindexIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/ReindexIntegrationTests.java index 1499455abd..03d2485ef4 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/ReindexIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/ReindexIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/SearchAsYouTypeELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/SearchAsYouTypeELCIntegrationTests.java index ad89eabafb..af84914655 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/SearchAsYouTypeELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/SearchAsYouTypeELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/SearchAsYouTypeIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/SearchAsYouTypeIntegrationTests.java index cb8d938b66..429abe9199 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/SearchAsYouTypeIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/SearchAsYouTypeIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/SearchHitSupportTest.java b/src/test/java/org/springframework/data/elasticsearch/core/SearchHitSupportTest.java index bedc20c8b3..5364006dc0 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/SearchHitSupportTest.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/SearchHitSupportTest.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/test/java/org/springframework/data/elasticsearch/core/SearchTemplateELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/SearchTemplateELCIntegrationTests.java index 1d346fa124..0843de8adb 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/SearchTemplateELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/SearchTemplateELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/SearchTemplateIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/SearchTemplateIntegrationTests.java index a02684db2b..e6339c2087 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/SearchTemplateIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/SearchTemplateIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/SourceFilterELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/SourceFilterELCIntegrationTests.java index d96039851f..1084b0d02a 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/SourceFilterELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/SourceFilterELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/SourceFilterIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/SourceFilterIntegrationTests.java index bf5118f0ba..3c0d251670 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/SourceFilterIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/SourceFilterIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/StreamQueriesTest.java b/src/test/java/org/springframework/data/elasticsearch/core/StreamQueriesTest.java index 5b14e8c763..da48da9f56 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/StreamQueriesTest.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/StreamQueriesTest.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/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationELCIntegrationTests.java index 36141e41d5..84020c194e 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java index f087c6f58c..ec6fa95fb8 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/cluster/ClusterOperationsELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/cluster/ClusterOperationsELCIntegrationTests.java index e8705ca4c4..3fdc0709fd 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/cluster/ClusterOperationsELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/cluster/ClusterOperationsELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/cluster/ClusterOperationsIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/cluster/ClusterOperationsIntegrationTests.java index ff3de066c0..ddf586108a 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/cluster/ClusterOperationsIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/cluster/ClusterOperationsIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/cluster/ClusterOperationsReactiveELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/cluster/ClusterOperationsReactiveELCIntegrationTests.java index 045d671c62..f4e839f021 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/cluster/ClusterOperationsReactiveELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/cluster/ClusterOperationsReactiveELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/cluster/ClusterOperationsReactiveIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/cluster/ClusterOperationsReactiveIntegrationTests.java index 9cceacd9ad..2644dbfe78 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/cluster/ClusterOperationsReactiveIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/cluster/ClusterOperationsReactiveIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchCustomConversionsUnitTests.java b/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchCustomConversionsUnitTests.java index cca1246da1..7b584e661d 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchCustomConversionsUnitTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchCustomConversionsUnitTests.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/test/java/org/springframework/data/elasticsearch/core/convert/GeoConvertersUnitTests.java b/src/test/java/org/springframework/data/elasticsearch/core/convert/GeoConvertersUnitTests.java index 41f382385a..c251ed4cad 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/convert/GeoConvertersUnitTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/convert/GeoConvertersUnitTests.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/test/java/org/springframework/data/elasticsearch/core/convert/MappingElasticsearchConverterUnitTests.java b/src/test/java/org/springframework/data/elasticsearch/core/convert/MappingElasticsearchConverterUnitTests.java index be1ba7b0c2..985a17ad30 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/convert/MappingElasticsearchConverterUnitTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/convert/MappingElasticsearchConverterUnitTests.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. @@ -49,8 +49,10 @@ import org.springframework.data.elasticsearch.annotations.Field; import org.springframework.data.elasticsearch.annotations.FieldType; import org.springframework.data.elasticsearch.annotations.GeoPointField; +import org.springframework.data.elasticsearch.annotations.ScriptedField; import org.springframework.data.elasticsearch.annotations.ValueConverter; import org.springframework.data.elasticsearch.core.document.Document; +import org.springframework.data.elasticsearch.core.document.SearchDocumentAdapter; import org.springframework.data.elasticsearch.core.geo.GeoJsonEntity; import org.springframework.data.elasticsearch.core.geo.GeoJsonGeometryCollection; import org.springframework.data.elasticsearch.core.geo.GeoJsonLineString; @@ -83,6 +85,7 @@ * @author Konrad Kurdej * @author Roman Puchkovskiy * @author Sascha Woo + * @author llosimura */ public class MappingElasticsearchConverterUnitTests { @@ -1800,6 +1803,68 @@ void shouldReadASingleStringIntoAListPropertyImmutable() { assertThat(entity.getStringList()).containsExactly("foo"); } + @Test + void shouldPopulateScriptedFields() { + SearchDocumentAdapter document = new SearchDocumentAdapter(Document.create(), + 0.0f, + new Object[]{}, + Map.of( + "scriptedField" , List.of("scriptedField"), + "custom-name-scripted-field" , List.of("custom-name-scripted-field") + ), + emptyMap(), + emptyMap(), + null, + null, + null, + null + ); + // Create a SearchDocument instance + var entity = mappingElasticsearchConverter.read(ScriptedEntity.class, document); + assertThat(entity.customScriptedField).isEqualTo("custom-name-scripted-field"); + assertThat(entity.scriptedField).isEqualTo("scriptedField"); + } + + static class ScriptedEntity { + @ScriptedField + private String scriptedField; + @ScriptedField(name = "custom-name-scripted-field") String customScriptedField; + + ScriptedEntity() { + customScriptedField = ""; + scriptedField = ""; + } + + public String getScriptedField() { + return scriptedField; + } + + public void setScriptedField(String scriptedField) { + this.scriptedField = scriptedField; + } + + public String getCustomScriptedField() { + return customScriptedField; + } + + public void setCustomScriptedField(String customScriptedField) { + this.customScriptedField = customScriptedField; + } + + @Override + public boolean equals(Object o) { + if (o == null || getClass() != o.getClass()) return false; + ScriptedEntity that = (ScriptedEntity) o; + return Objects.equals(scriptedField, that.scriptedField) && Objects.equals(customScriptedField, that.customScriptedField); + } + + @Override + public int hashCode() { + return Objects.hash(scriptedField, customScriptedField); + } + } + + @Test // #2280 @DisplayName("should read a String array into a List property immutable") void shouldReadAStringArrayIntoAListPropertyImmutable() { diff --git a/src/test/java/org/springframework/data/elasticsearch/core/convert/PropertyValueConvertersUnitTests.java b/src/test/java/org/springframework/data/elasticsearch/core/convert/PropertyValueConvertersUnitTests.java index 15c5dea5ce..273e0cf420 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/convert/PropertyValueConvertersUnitTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/convert/PropertyValueConvertersUnitTests.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/test/java/org/springframework/data/elasticsearch/core/event/AuditingEntityCallbackTests.java b/src/test/java/org/springframework/data/elasticsearch/core/event/AuditingEntityCallbackTests.java index d9e2bc3057..f3e0e29698 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/event/AuditingEntityCallbackTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/event/AuditingEntityCallbackTests.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/test/java/org/springframework/data/elasticsearch/core/event/CallbackELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/event/CallbackELCIntegrationTests.java index 7bf62117d2..614331306f 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/event/CallbackELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/event/CallbackELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/event/CallbackIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/event/CallbackIntegrationTests.java index 70c194e2a9..991b31c6d5 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/event/CallbackIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/event/CallbackIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/event/ReactiveAuditingEntityCallbackTests.java b/src/test/java/org/springframework/data/elasticsearch/core/event/ReactiveAuditingEntityCallbackTests.java index 4cd3728853..d00a8d690e 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/event/ReactiveAuditingEntityCallbackTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/event/ReactiveAuditingEntityCallbackTests.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/test/java/org/springframework/data/elasticsearch/core/event/ReactiveCallbackELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/event/ReactiveCallbackELCIntegrationTests.java index 913a8fb365..3dddd26a58 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/event/ReactiveCallbackELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/event/ReactiveCallbackELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/event/ReactiveCallbackIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/event/ReactiveCallbackIntegrationTests.java index 6c1c6afbce..eb5f7f407c 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/event/ReactiveCallbackIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/event/ReactiveCallbackIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/geo/GeoELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/geo/GeoELCIntegrationTests.java index ec24ac2acb..38990853b3 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/geo/GeoELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/geo/GeoELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/geo/GeoIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/geo/GeoIntegrationTests.java index a6406615a8..20e3b6eb52 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/geo/GeoIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/geo/GeoIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/geo/GeoJsonELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/geo/GeoJsonELCIntegrationTests.java index ec492b873a..e1476a43bd 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/geo/GeoJsonELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/geo/GeoJsonELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/geo/GeoJsonEntity.java b/src/test/java/org/springframework/data/elasticsearch/core/geo/GeoJsonEntity.java index e6c1b61482..87c1fd095f 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/geo/GeoJsonEntity.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/geo/GeoJsonEntity.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/test/java/org/springframework/data/elasticsearch/core/geo/GeoJsonGeometryCollectionUnitTests.java b/src/test/java/org/springframework/data/elasticsearch/core/geo/GeoJsonGeometryCollectionUnitTests.java index e0ea07eaac..da2dcb3e44 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/geo/GeoJsonGeometryCollectionUnitTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/geo/GeoJsonGeometryCollectionUnitTests.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/test/java/org/springframework/data/elasticsearch/core/geo/GeoJsonIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/geo/GeoJsonIntegrationTests.java index c6dd7f8cdc..8a5e789039 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/geo/GeoJsonIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/geo/GeoJsonIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/geo/GeoJsonLineStringUnitTests.java b/src/test/java/org/springframework/data/elasticsearch/core/geo/GeoJsonLineStringUnitTests.java index 6c54f3330b..6eed5b7ced 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/geo/GeoJsonLineStringUnitTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/geo/GeoJsonLineStringUnitTests.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/test/java/org/springframework/data/elasticsearch/core/geo/GeoJsonMultiLineStringUnitTests.java b/src/test/java/org/springframework/data/elasticsearch/core/geo/GeoJsonMultiLineStringUnitTests.java index 65f1682287..2f00301768 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/geo/GeoJsonMultiLineStringUnitTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/geo/GeoJsonMultiLineStringUnitTests.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/test/java/org/springframework/data/elasticsearch/core/geo/GeoJsonMultiPointUnitTests.java b/src/test/java/org/springframework/data/elasticsearch/core/geo/GeoJsonMultiPointUnitTests.java index eeebe06a80..2ea05ddbf7 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/geo/GeoJsonMultiPointUnitTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/geo/GeoJsonMultiPointUnitTests.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/test/java/org/springframework/data/elasticsearch/core/geo/GeoJsonMultiPolygonUnitTests.java b/src/test/java/org/springframework/data/elasticsearch/core/geo/GeoJsonMultiPolygonUnitTests.java index ffa458a895..bfa7949e2f 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/geo/GeoJsonMultiPolygonUnitTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/geo/GeoJsonMultiPolygonUnitTests.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/test/java/org/springframework/data/elasticsearch/core/geo/GeoJsonPointUnitTests.java b/src/test/java/org/springframework/data/elasticsearch/core/geo/GeoJsonPointUnitTests.java index b8606e7bf9..36d47c47c5 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/geo/GeoJsonPointUnitTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/geo/GeoJsonPointUnitTests.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/test/java/org/springframework/data/elasticsearch/core/index/IndexOperationsELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/index/IndexOperationsELCIntegrationTests.java index f8175479e6..9f4f64319d 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/index/IndexOperationsELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/index/IndexOperationsELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/index/IndexOperationsIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/index/IndexOperationsIntegrationTests.java index eb65d0ac9d..0bc984faaa 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/index/IndexOperationsIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/index/IndexOperationsIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/index/IndexTemplateELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/index/IndexTemplateELCIntegrationTests.java index 385310a625..6476d5fc15 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/index/IndexTemplateELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/index/IndexTemplateELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/index/IndexTemplateIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/index/IndexTemplateIntegrationTests.java index e7858f858b..06209cc245 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/index/IndexTemplateIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/index/IndexTemplateIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/index/MappingBuilderELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/index/MappingBuilderELCIntegrationTests.java index 037d45b60d..e717afb7ea 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/index/MappingBuilderELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/index/MappingBuilderELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/index/MappingBuilderIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/index/MappingBuilderIntegrationTests.java index f769ffaaa4..e419d90b48 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/index/MappingBuilderIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/index/MappingBuilderIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/index/MappingBuilderUnitTests.java b/src/test/java/org/springframework/data/elasticsearch/core/index/MappingBuilderUnitTests.java index 8ce062c282..116604f243 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/index/MappingBuilderUnitTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/index/MappingBuilderUnitTests.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. @@ -1090,38 +1090,49 @@ void shouldAddFieldsThatAreExcludedFromSource() throws JSONException { String expected = """ { - "properties": { - "_class": { - "type": "keyword", - "index": false, - "doc_values": false - }, - "excluded-date": { - "type": "date", - "format": "date" - }, - "nestedEntity": { - "type": "nested", - "properties": { - "_class": { - "type": "keyword", - "index": false, - "doc_values": false - }, - "excluded-text": { - "type": "text" - } - } - } - }, - "_source": { - "excludes": [ - "excluded-date", - "nestedEntity.excluded-text" - ] - } - } - """; // + "properties": { + "_class": { + "type": "keyword", + "index": false, + "doc_values": false + }, + "excluded-date": { + "type": "date", + "format": "date" + }, + "nestedEntity": { + "type": "nested", + "properties": { + "_class": { + "type": "keyword", + "index": false, + "doc_values": false + }, + "excluded-text": { + "type": "text" + } + } + }, + "excluded-multifield": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword" + } + } + } + }, + "_source": { + "excludes": [ + "excluded-date", + "nestedEntity.excluded-text", + "excluded-multifield" + ] + } + + } + + """; // String mapping = getMappingBuilder().buildPropertyMapping(ExcludedFieldEntity.class); @@ -2395,6 +2406,10 @@ private static class ExcludedFieldEntity { excludeFromSource = true) private LocalDate excludedDate; @Nullable @Field(type = Nested) private NestedExcludedFieldEntity nestedEntity; + @Nullable + @MultiField(mainField = @Field(name = "excluded-multifield", type = Text, excludeFromSource = true), otherFields = { + @InnerField(suffix = "keyword", type = Keyword) + }) private String excludedMultifield; } @SuppressWarnings("unused") diff --git a/src/test/java/org/springframework/data/elasticsearch/core/index/MappingParametersTest.java b/src/test/java/org/springframework/data/elasticsearch/core/index/MappingParametersTest.java index a572ab7474..7d424d0498 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/index/MappingParametersTest.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/index/MappingParametersTest.java @@ -70,8 +70,8 @@ void shouldAllowEnabledFalseOnlyOnObjectFields() { } @Test // #1700 - @DisplayName("should not allow dims length greater than 2048 for dense_vector type") - void shouldNotAllowDimsLengthGreaterThan2048ForDenseVectorType() { + @DisplayName("should not allow dims length greater than 4096 for dense_vector type") + void shouldNotAllowDimsLengthGreaterThan4096ForDenseVectorType() { ElasticsearchPersistentEntity failEntity = elasticsearchConverter.get().getMappingContext() .getRequiredPersistentEntity(DenseVectorInvalidDimsClass.class); Annotation annotation = failEntity.getRequiredPersistentProperty("dense_vector").findAnnotation(Field.class); @@ -90,21 +90,28 @@ void shouldRequireDimsParameterForDenseVectorType() { } static class AnnotatedClass { - @Nullable @Field private String field; - @Nullable @MultiField(mainField = @Field, + @Nullable + @Field private String field; + @Nullable + @MultiField(mainField = @Field, otherFields = { @InnerField(suffix = "test", type = FieldType.Text) }) private String mainField; - @Nullable @Field(type = FieldType.Text, docValues = false) private String docValuesText; - @Nullable @Field(type = FieldType.Nested, docValues = false) private String docValuesNested; - @Nullable @Field(type = Object, enabled = true) private String enabledObject; - @Nullable @Field(type = Object, enabled = false) private String disabledObject; + @Nullable + @Field(type = FieldType.Text, docValues = false) private String docValuesText; + @Nullable + @Field(type = FieldType.Nested, docValues = false) private String docValuesNested; + @Nullable + @Field(type = Object, enabled = true) private String enabledObject; + @Nullable + @Field(type = Object, enabled = false) private String disabledObject; } static class InvalidEnabledFieldClass { - @Nullable @Field(type = FieldType.Text, enabled = false) private String disabledObject; + @Nullable + @Field(type = FieldType.Text, enabled = false) private String disabledObject; } static class DenseVectorInvalidDimsClass { - @Field(type = Dense_Vector, dims = 2049) private float[] dense_vector; + @Field(type = Dense_Vector, dims = 4097) private float[] dense_vector; } static class DenseVectorMissingDimsClass { diff --git a/src/test/java/org/springframework/data/elasticsearch/core/index/ReactiveIndexOperationsELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/index/ReactiveIndexOperationsELCIntegrationTests.java index e5cfd12518..b991e644a9 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/index/ReactiveIndexOperationsELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/index/ReactiveIndexOperationsELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/index/ReactiveIndexOperationsIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/index/ReactiveIndexOperationsIntegrationTests.java index b37ba3c539..f5c49f9f75 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/index/ReactiveIndexOperationsIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/index/ReactiveIndexOperationsIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/index/ReactiveIndexTemplateELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/index/ReactiveIndexTemplateELCIntegrationTests.java index 0c4dcc30b8..07388144ef 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/index/ReactiveIndexTemplateELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/index/ReactiveIndexTemplateELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/index/ReactiveIndexTemplateIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/index/ReactiveIndexTemplateIntegrationTests.java index e64ce7e104..b832a32853 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/index/ReactiveIndexTemplateIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/index/ReactiveIndexTemplateIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/index/ReactiveMappingBuilderUnitTests.java b/src/test/java/org/springframework/data/elasticsearch/core/index/ReactiveMappingBuilderUnitTests.java index e7a193b030..d4b10d17bf 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/index/ReactiveMappingBuilderUnitTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/index/ReactiveMappingBuilderUnitTests.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/test/java/org/springframework/data/elasticsearch/core/index/SettingsUnitTests.java b/src/test/java/org/springframework/data/elasticsearch/core/index/SettingsUnitTests.java index 8b150a33a7..e745f67b69 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/index/SettingsUnitTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/index/SettingsUnitTests.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/test/java/org/springframework/data/elasticsearch/core/index/SimpleDynamicTemplatesMappingTests.java b/src/test/java/org/springframework/data/elasticsearch/core/index/SimpleDynamicTemplatesMappingTests.java index 72acf8e330..2026a58157 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/index/SimpleDynamicTemplatesMappingTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/index/SimpleDynamicTemplatesMappingTests.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/test/java/org/springframework/data/elasticsearch/core/index/SimpleElasticsearchDateMappingTests.java b/src/test/java/org/springframework/data/elasticsearch/core/index/SimpleElasticsearchDateMappingTests.java index 0363a307f9..f45158c936 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/index/SimpleElasticsearchDateMappingTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/index/SimpleElasticsearchDateMappingTests.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/test/java/org/springframework/data/elasticsearch/core/mapping/EntityCustomConversionELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/mapping/EntityCustomConversionELCIntegrationTests.java index e3c949d095..57f57d51ae 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/mapping/EntityCustomConversionELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/mapping/EntityCustomConversionELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/mapping/EntityCustomConversionIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/mapping/EntityCustomConversionIntegrationTests.java index cf483256e6..9ad3d83374 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/mapping/EntityCustomConversionIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/mapping/EntityCustomConversionIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/mapping/FieldNamingStrategyELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/mapping/FieldNamingStrategyELCIntegrationTests.java index 44c84440a0..b9acc4a9f9 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/mapping/FieldNamingStrategyELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/mapping/FieldNamingStrategyELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/mapping/FieldNamingStrategyIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/mapping/FieldNamingStrategyIntegrationTests.java index 92a87cce75..2ee3e39abd 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/mapping/FieldNamingStrategyIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/mapping/FieldNamingStrategyIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/mapping/ReactiveFieldNamingStrategyELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/mapping/ReactiveFieldNamingStrategyELCIntegrationTests.java index 08afd793da..abf40388c9 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/mapping/ReactiveFieldNamingStrategyELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/mapping/ReactiveFieldNamingStrategyELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/mapping/ReactiveFieldNamingStrategyIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/mapping/ReactiveFieldNamingStrategyIntegrationTests.java index 9f89e8b720..61f839cdf1 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/mapping/ReactiveFieldNamingStrategyIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/mapping/ReactiveFieldNamingStrategyIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/mapping/SimpleElasticsearchPersistentEntityTests.java b/src/test/java/org/springframework/data/elasticsearch/core/mapping/SimpleElasticsearchPersistentEntityTests.java index c06f7666da..858ccaaa54 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/mapping/SimpleElasticsearchPersistentEntityTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/mapping/SimpleElasticsearchPersistentEntityTests.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/test/java/org/springframework/data/elasticsearch/core/mapping/SimpleElasticsearchPersistentPropertyUnitTests.java b/src/test/java/org/springframework/data/elasticsearch/core/mapping/SimpleElasticsearchPersistentPropertyUnitTests.java index fa9a2367ce..e723143cf9 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/mapping/SimpleElasticsearchPersistentPropertyUnitTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/mapping/SimpleElasticsearchPersistentPropertyUnitTests.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/test/java/org/springframework/data/elasticsearch/core/paginating/ReactiveSearchAfterELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/paginating/ReactiveSearchAfterELCIntegrationTests.java index 9814139546..24c6df1a9f 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/paginating/ReactiveSearchAfterELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/paginating/ReactiveSearchAfterELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/paginating/ReactiveSearchAfterIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/paginating/ReactiveSearchAfterIntegrationTests.java index 547a413a71..62951e4c7c 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/paginating/ReactiveSearchAfterIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/paginating/ReactiveSearchAfterIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/paginating/SearchAfterELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/paginating/SearchAfterELCIntegrationTests.java index 05123918c5..f5a9ce8ecf 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/paginating/SearchAfterELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/paginating/SearchAfterELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/paginating/SearchAfterIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/paginating/SearchAfterIntegrationTests.java index 2e0eca3747..674a031624 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/paginating/SearchAfterIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/paginating/SearchAfterIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/query/CriteriaQueryELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/query/CriteriaQueryELCIntegrationTests.java index 6c66817ad8..63101772f0 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/query/CriteriaQueryELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/query/CriteriaQueryELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/query/CriteriaQueryIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/query/CriteriaQueryIntegrationTests.java index 8f8ca8f83a..2d91462e12 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/query/CriteriaQueryIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/query/CriteriaQueryIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/query/ElasticsearchPartQueryIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/query/ElasticsearchPartQueryIntegrationTests.java index 2ca4b46c9c..ee352207e8 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/query/ElasticsearchPartQueryIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/query/ElasticsearchPartQueryIntegrationTests.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. @@ -15,6 +15,7 @@ */ package org.springframework.data.elasticsearch.core.query; +import static org.assertj.core.api.Assertions.*; import static org.skyscreamer.jsonassert.JSONAssert.*; import java.lang.reflect.Method; @@ -23,9 +24,11 @@ import java.util.List; import org.json.JSONException; +import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.annotation.Id; +import org.springframework.data.domain.Sort; import org.springframework.data.elasticsearch.annotations.Field; import org.springframework.data.elasticsearch.annotations.FieldType; import org.springframework.data.elasticsearch.core.ElasticsearchOperations; @@ -639,6 +642,84 @@ void findByAvailableTrueOrderByNameDesc() throws NoSuchMethodException, JSONExce assertEquals(expected, query, false); } + @Test // #3072 + @DisplayName("should build sort object with correct field names") + void shouldBuildSortObjectWithCorrectFieldNames() throws NoSuchMethodException, JSONException { + + String methodName = "findByNameOrderBySortAuthor_SortName"; + Class[] parameterClasses = new Class[] { String.class }; + Object[] parameters = new Object[] { BOOK_TITLE }; + + String query = getQueryString(methodName, parameterClasses, parameters); + + String expected = """ + + { + "query": { + "bool": { + "must": [ + { + "query_string": { + "query": "Title", + "fields": [ + "name" + ] + } + } + ] + } + }, + "sort": [ + { + "sort_author.sort_name": { + "order": "asc" + } + } + ] + }"""; + + assertEquals(expected, query, false); + } + + @Test // #3081 + @DisplayName("should build sort object with unknown field names") + void shouldBuildSortObjectWithUnknownFieldNames() throws NoSuchMethodException, JSONException { + + String methodName = "findByName"; + Class[] parameterClasses = new Class[] { String.class, Sort.class }; + Object[] parameters = new Object[] { BOOK_TITLE, Sort.by("sortAuthor.sortName.raw") }; + + String query = getQueryString(methodName, parameterClasses, parameters); + + String expected = """ + + { + "query": { + "bool": { + "must": [ + { + "query_string": { + "query": "Title", + "fields": [ + "name" + ] + } + } + ] + } + }, + "sort": [ + { + "sort_author.sort_name.raw": { + "order": "asc" + } + } + ] + }"""; + + assertEquals(expected, query, false); + } + private String getQueryString(String methodName, Class[] parameterClasses, Object[] parameters) throws NoSuchMethodException { @@ -726,6 +807,9 @@ private interface SampleRepository extends ElasticsearchRepository List findByAvailableTrueOrderByNameDesc(); + List findByNameOrderBySortAuthor_SortName(String name); + + List findByName(String name, Sort sort); } public static class Book { @@ -735,6 +819,10 @@ public static class Book { @Nullable private Integer price; @Field(type = FieldType.Boolean) private boolean available; + // this is needed for the #3072 test + @Nullable + @Field(name = "sort_author", type = FieldType.Object) private Author sortAuthor; + @Nullable public String getId() { return id; @@ -766,8 +854,32 @@ public Boolean getAvailable() { return available; } + @Nullable + public Author getSortAuthor() { + return sortAuthor; + } + + public void setSortAuthor(@Nullable Author sortAuthor) { + this.sortAuthor = sortAuthor; + } + public void setAvailable(Boolean available) { this.available = available; + + } + } + + public static class Author { + @Nullable + @Field(name = "sort_name", type = FieldType.Keyword) private String sortName; + + @Nullable + public String getSortName() { + return sortName; + } + + public void setSortName(@Nullable String sortName) { + this.sortName = sortName; } } } diff --git a/src/test/java/org/springframework/data/elasticsearch/core/query/NativeQueryELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/query/NativeQueryELCIntegrationTests.java index 81e7b714f2..6bda9b7d50 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/query/NativeQueryELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/query/NativeQueryELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/query/NativeQueryIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/query/NativeQueryIntegrationTests.java index a03bc93483..30a29af122 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/query/NativeQueryIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/query/NativeQueryIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/query/RuntimeFieldTest.java b/src/test/java/org/springframework/data/elasticsearch/core/query/RuntimeFieldTest.java index ab598f0e92..7b34c21d88 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/query/RuntimeFieldTest.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/query/RuntimeFieldTest.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/test/java/org/springframework/data/elasticsearch/core/query/SeqNoPrimaryTermTests.java b/src/test/java/org/springframework/data/elasticsearch/core/query/SeqNoPrimaryTermTests.java index c95118c354..4bc264b637 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/query/SeqNoPrimaryTermTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/query/SeqNoPrimaryTermTests.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/test/java/org/springframework/data/elasticsearch/core/query/scriptedandruntimefields/ReactiveScriptedAndRuntimeFieldsIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/query/scriptedandruntimefields/ReactiveScriptedAndRuntimeFieldsIntegrationTests.java index dc016eb846..b093d12464 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/query/scriptedandruntimefields/ReactiveScriptedAndRuntimeFieldsIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/query/scriptedandruntimefields/ReactiveScriptedAndRuntimeFieldsIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/query/scriptedandruntimefields/ScriptedAndRuntimeFieldsELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/query/scriptedandruntimefields/ScriptedAndRuntimeFieldsELCIntegrationTests.java index a7b0c7bead..b9a2ad56e1 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/query/scriptedandruntimefields/ScriptedAndRuntimeFieldsELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/query/scriptedandruntimefields/ScriptedAndRuntimeFieldsELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/query/scriptedandruntimefields/ScriptedAndRuntimeFieldsIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/query/scriptedandruntimefields/ScriptedAndRuntimeFieldsIntegrationTests.java index e49d8381bf..9d05a240c3 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/query/scriptedandruntimefields/ScriptedAndRuntimeFieldsIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/query/scriptedandruntimefields/ScriptedAndRuntimeFieldsIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/query/sort/NestedSortIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/query/sort/NestedSortIntegrationTests.java index 41a5e2c8d2..513923554f 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/query/sort/NestedSortIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/query/sort/NestedSortIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/routing/ReactiveRoutingELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/routing/ReactiveRoutingELCIntegrationTests.java index 6a4b3c3a10..ba154127e8 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/routing/ReactiveRoutingELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/routing/ReactiveRoutingELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionELCIntegrationTests.java index 2f4e7ca201..041b9a093d 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java index b4d5c2a576..fc52f8c5bf 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionWithContextsELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionWithContextsELCIntegrationTests.java index ba82cc7516..e3e130f0cf 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionWithContextsELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionWithContextsELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionWithContextsIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionWithContextsIntegrationTests.java index 1e62b51589..148b7183bc 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionWithContextsIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionWithContextsIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/suggest/ReactiveSuggestELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/suggest/ReactiveSuggestELCIntegrationTests.java index a5f1441707..e46dee4f8b 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/suggest/ReactiveSuggestELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/suggest/ReactiveSuggestELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/core/suggest/ReactiveSuggestIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/suggest/ReactiveSuggestIntegrationTests.java index 794a0f28e4..8a629516ce 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/suggest/ReactiveSuggestIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/suggest/ReactiveSuggestIntegrationTests.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/test/java/org/springframework/data/elasticsearch/immutable/ImmutableRepositoryELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/immutable/ImmutableRepositoryELCIntegrationTests.java index bf22e425f5..bd9e93ab51 100644 --- a/src/test/java/org/springframework/data/elasticsearch/immutable/ImmutableRepositoryELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/immutable/ImmutableRepositoryELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/immutable/ImmutableRepositoryIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/immutable/ImmutableRepositoryIntegrationTests.java index a77bf541fe..a6407d15ee 100644 --- a/src/test/java/org/springframework/data/elasticsearch/immutable/ImmutableRepositoryIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/immutable/ImmutableRepositoryIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2024 the original author or authors. + * Copyright 2016-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/test/java/org/springframework/data/elasticsearch/junit/jupiter/ClusterConnection.java b/src/test/java/org/springframework/data/elasticsearch/junit/jupiter/ClusterConnection.java index 34247bfe9d..8ac75d0004 100644 --- a/src/test/java/org/springframework/data/elasticsearch/junit/jupiter/ClusterConnection.java +++ b/src/test/java/org/springframework/data/elasticsearch/junit/jupiter/ClusterConnection.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. @@ -129,10 +129,13 @@ private ClusterConnectionInfo startElasticsearchContainer() { Map testcontainersProperties = testcontainersProperties( "testcontainers-" + testcontainersConfiguration + ".properties"); + var testcontainersPropertiesLocal = testcontainersProperties("testcontainers-local.properties"); + testcontainersProperties.putAll(testcontainersPropertiesLocal); + DockerImageName dockerImageName = getDockerImageName(testcontainersProperties); ElasticsearchContainer elasticsearchContainer = new SpringDataElasticsearchContainer(dockerImageName) - .withEnv(testcontainersProperties).withStartupTimeout(Duration.ofMinutes(2)); + .withEnv(testcontainersProperties).withStartupTimeout(Duration.ofMinutes(2)).withReuse(true); elasticsearchContainer.start(); return ClusterConnectionInfo.builder() // @@ -192,16 +195,7 @@ private Map testcontainersProperties(String propertiesFile) { @Override public void close() { - if (clusterConnectionInfo != null && clusterConnectionInfo.getElasticsearchContainer() != null) { - if (LOGGER.isDebugEnabled()) { - LOGGER.debug("Stopping container"); - } - clusterConnectionInfo.getElasticsearchContainer().stop(); - } - if (LOGGER.isDebugEnabled()) { - LOGGER.debug("closed"); - } } private static class SpringDataElasticsearchContainer extends ElasticsearchContainer { diff --git a/src/test/java/org/springframework/data/elasticsearch/junit/jupiter/ClusterConnectionException.java b/src/test/java/org/springframework/data/elasticsearch/junit/jupiter/ClusterConnectionException.java index bf68703a63..8b17c85093 100644 --- a/src/test/java/org/springframework/data/elasticsearch/junit/jupiter/ClusterConnectionException.java +++ b/src/test/java/org/springframework/data/elasticsearch/junit/jupiter/ClusterConnectionException.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/test/java/org/springframework/data/elasticsearch/junit/jupiter/ClusterConnectionInfo.java b/src/test/java/org/springframework/data/elasticsearch/junit/jupiter/ClusterConnectionInfo.java index 1f440520e6..76c837783f 100644 --- a/src/test/java/org/springframework/data/elasticsearch/junit/jupiter/ClusterConnectionInfo.java +++ b/src/test/java/org/springframework/data/elasticsearch/junit/jupiter/ClusterConnectionInfo.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/test/java/org/springframework/data/elasticsearch/junit/jupiter/ElasticsearchTemplateConfiguration.java b/src/test/java/org/springframework/data/elasticsearch/junit/jupiter/ElasticsearchTemplateConfiguration.java index 440c5c031e..1de266c482 100644 --- a/src/test/java/org/springframework/data/elasticsearch/junit/jupiter/ElasticsearchTemplateConfiguration.java +++ b/src/test/java/org/springframework/data/elasticsearch/junit/jupiter/ElasticsearchTemplateConfiguration.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/test/java/org/springframework/data/elasticsearch/junit/jupiter/IntegrationTest.java b/src/test/java/org/springframework/data/elasticsearch/junit/jupiter/IntegrationTest.java index c0e619ce7c..4e79298127 100644 --- a/src/test/java/org/springframework/data/elasticsearch/junit/jupiter/IntegrationTest.java +++ b/src/test/java/org/springframework/data/elasticsearch/junit/jupiter/IntegrationTest.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/test/java/org/springframework/data/elasticsearch/junit/jupiter/IntegrationtestEnvironment.java b/src/test/java/org/springframework/data/elasticsearch/junit/jupiter/IntegrationtestEnvironment.java index 8aa1cfa1f8..505aecc740 100644 --- a/src/test/java/org/springframework/data/elasticsearch/junit/jupiter/IntegrationtestEnvironment.java +++ b/src/test/java/org/springframework/data/elasticsearch/junit/jupiter/IntegrationtestEnvironment.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/test/java/org/springframework/data/elasticsearch/junit/jupiter/ReactiveElasticsearchTemplateConfiguration.java b/src/test/java/org/springframework/data/elasticsearch/junit/jupiter/ReactiveElasticsearchTemplateConfiguration.java index 134b02ac93..135ef1f980 100644 --- a/src/test/java/org/springframework/data/elasticsearch/junit/jupiter/ReactiveElasticsearchTemplateConfiguration.java +++ b/src/test/java/org/springframework/data/elasticsearch/junit/jupiter/ReactiveElasticsearchTemplateConfiguration.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/test/java/org/springframework/data/elasticsearch/junit/jupiter/SpringDataElasticsearchExtension.java b/src/test/java/org/springframework/data/elasticsearch/junit/jupiter/SpringDataElasticsearchExtension.java index f477615109..ec9abeebdb 100644 --- a/src/test/java/org/springframework/data/elasticsearch/junit/jupiter/SpringDataElasticsearchExtension.java +++ b/src/test/java/org/springframework/data/elasticsearch/junit/jupiter/SpringDataElasticsearchExtension.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/test/java/org/springframework/data/elasticsearch/junit/jupiter/SpringIntegrationTest.java b/src/test/java/org/springframework/data/elasticsearch/junit/jupiter/SpringIntegrationTest.java index 1c97cf6013..7bad52bdb1 100644 --- a/src/test/java/org/springframework/data/elasticsearch/junit/jupiter/SpringIntegrationTest.java +++ b/src/test/java/org/springframework/data/elasticsearch/junit/jupiter/SpringIntegrationTest.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/test/java/org/springframework/data/elasticsearch/junit/jupiter/Tags.java b/src/test/java/org/springframework/data/elasticsearch/junit/jupiter/Tags.java index f5a9c3ab4b..efeca7ccb5 100644 --- a/src/test/java/org/springframework/data/elasticsearch/junit/jupiter/Tags.java +++ b/src/test/java/org/springframework/data/elasticsearch/junit/jupiter/Tags.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/test/java/org/springframework/data/elasticsearch/repositories/cdi/CdiProductRepository.java b/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/CdiProductRepository.java index da84e2ef90..35e8f45374 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/CdiProductRepository.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/CdiProductRepository.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/test/java/org/springframework/data/elasticsearch/repositories/cdi/CdiRepositoryClient.java b/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/CdiRepositoryClient.java index 3782b34635..e6b5536b22 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/CdiRepositoryClient.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/CdiRepositoryClient.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/test/java/org/springframework/data/elasticsearch/repositories/cdi/CdiRepositoryTests.java b/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/CdiRepositoryTests.java index 569ad7a35d..a0b7cab669 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/CdiRepositoryTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/CdiRepositoryTests.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/test/java/org/springframework/data/elasticsearch/repositories/cdi/ElasticsearchOperationsProducer.java b/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/ElasticsearchOperationsProducer.java index 3f570b50e4..74371fd688 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/ElasticsearchOperationsProducer.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/ElasticsearchOperationsProducer.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/test/java/org/springframework/data/elasticsearch/repositories/cdi/OtherQualifier.java b/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/OtherQualifier.java index 45a2e4d440..7bcb96403d 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/OtherQualifier.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/OtherQualifier.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2024 the original author or authors. + * Copyright 2016-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/test/java/org/springframework/data/elasticsearch/repositories/cdi/PersonDB.java b/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/PersonDB.java index d772a662e6..bd56b8fc54 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/PersonDB.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/PersonDB.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2024 the original author or authors. + * Copyright 2016-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/test/java/org/springframework/data/elasticsearch/repositories/cdi/QualifiedProductRepository.java b/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/QualifiedProductRepository.java index 1b91fc9335..689b96c6f1 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/QualifiedProductRepository.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/QualifiedProductRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2024 the original author or authors. + * Copyright 2016-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/test/java/org/springframework/data/elasticsearch/repositories/cdi/SamplePersonRepository.java b/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/SamplePersonRepository.java index 5b29e7f1d1..52b45564b3 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/SamplePersonRepository.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/SamplePersonRepository.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/test/java/org/springframework/data/elasticsearch/repositories/cdi/SamplePersonRepositoryCustom.java b/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/SamplePersonRepositoryCustom.java index fefcfd4c47..7c3845c394 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/SamplePersonRepositoryCustom.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/SamplePersonRepositoryCustom.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/test/java/org/springframework/data/elasticsearch/repositories/cdi/SamplePersonRepositoryImpl.java b/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/SamplePersonRepositoryImpl.java index cfea0c9608..d2b345f8f1 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/SamplePersonRepositoryImpl.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/cdi/SamplePersonRepositoryImpl.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/test/java/org/springframework/data/elasticsearch/repositories/complex/custommethod/autowiring/ComplexCustomMethodRepositoryELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repositories/complex/custommethod/autowiring/ComplexCustomMethodRepositoryELCIntegrationTests.java index ea1e08b1cb..d488fd4276 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/complex/custommethod/autowiring/ComplexCustomMethodRepositoryELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/complex/custommethod/autowiring/ComplexCustomMethodRepositoryELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/repositories/complex/custommethod/autowiring/ComplexCustomMethodRepositoryIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repositories/complex/custommethod/autowiring/ComplexCustomMethodRepositoryIntegrationTests.java index 95def7d675..856efdf0ae 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/complex/custommethod/autowiring/ComplexCustomMethodRepositoryIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/complex/custommethod/autowiring/ComplexCustomMethodRepositoryIntegrationTests.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/test/java/org/springframework/data/elasticsearch/repositories/complex/custommethod/autowiring/ComplexElasticsearchRepository.java b/src/test/java/org/springframework/data/elasticsearch/repositories/complex/custommethod/autowiring/ComplexElasticsearchRepository.java index 974ef17003..062231b55a 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/complex/custommethod/autowiring/ComplexElasticsearchRepository.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/complex/custommethod/autowiring/ComplexElasticsearchRepository.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/test/java/org/springframework/data/elasticsearch/repositories/complex/custommethod/autowiring/ComplexElasticsearchRepositoryCustom.java b/src/test/java/org/springframework/data/elasticsearch/repositories/complex/custommethod/autowiring/ComplexElasticsearchRepositoryCustom.java index b040249979..ae81cf4b22 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/complex/custommethod/autowiring/ComplexElasticsearchRepositoryCustom.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/complex/custommethod/autowiring/ComplexElasticsearchRepositoryCustom.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/test/java/org/springframework/data/elasticsearch/repositories/complex/custommethod/manualwiring/ComplexCustomMethodRepositoryManualWiringELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repositories/complex/custommethod/manualwiring/ComplexCustomMethodRepositoryManualWiringELCIntegrationTests.java index a0a179ec10..6013306350 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/complex/custommethod/manualwiring/ComplexCustomMethodRepositoryManualWiringELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/complex/custommethod/manualwiring/ComplexCustomMethodRepositoryManualWiringELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/repositories/complex/custommethod/manualwiring/ComplexCustomMethodRepositoryManualWiringIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repositories/complex/custommethod/manualwiring/ComplexCustomMethodRepositoryManualWiringIntegrationTests.java index 182e6b76ac..5f5490b495 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/complex/custommethod/manualwiring/ComplexCustomMethodRepositoryManualWiringIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/complex/custommethod/manualwiring/ComplexCustomMethodRepositoryManualWiringIntegrationTests.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/test/java/org/springframework/data/elasticsearch/repositories/complex/custommethod/manualwiring/ComplexElasticsearchRepositoryManualWiring.java b/src/test/java/org/springframework/data/elasticsearch/repositories/complex/custommethod/manualwiring/ComplexElasticsearchRepositoryManualWiring.java index 57eb30f66c..686a572d65 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/complex/custommethod/manualwiring/ComplexElasticsearchRepositoryManualWiring.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/complex/custommethod/manualwiring/ComplexElasticsearchRepositoryManualWiring.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/test/java/org/springframework/data/elasticsearch/repositories/complex/custommethod/manualwiring/ComplexElasticsearchRepositoryManualWiringImpl.java b/src/test/java/org/springframework/data/elasticsearch/repositories/complex/custommethod/manualwiring/ComplexElasticsearchRepositoryManualWiringImpl.java index c83c16d845..b71e6e919f 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/complex/custommethod/manualwiring/ComplexElasticsearchRepositoryManualWiringImpl.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/complex/custommethod/manualwiring/ComplexElasticsearchRepositoryManualWiringImpl.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/test/java/org/springframework/data/elasticsearch/repositories/custommethod/CustomMethodRepositoryELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repositories/custommethod/CustomMethodRepositoryELCIntegrationTests.java index 3bdd52e94f..d57d469d34 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/custommethod/CustomMethodRepositoryELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/custommethod/CustomMethodRepositoryELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/repositories/custommethod/CustomMethodRepositoryIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repositories/custommethod/CustomMethodRepositoryIntegrationTests.java index 730c551167..1b19b0cbeb 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/custommethod/CustomMethodRepositoryIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/custommethod/CustomMethodRepositoryIntegrationTests.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/test/java/org/springframework/data/elasticsearch/repositories/custommethod/QueryParameter.java b/src/test/java/org/springframework/data/elasticsearch/repositories/custommethod/QueryParameter.java index 86b842b58d..7cac5dd15a 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/custommethod/QueryParameter.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/custommethod/QueryParameter.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/test/java/org/springframework/data/elasticsearch/repositories/doubleid/DoubleIDRepositoryELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repositories/doubleid/DoubleIDRepositoryELCIntegrationTests.java index a563571628..692a973f79 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/doubleid/DoubleIDRepositoryELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/doubleid/DoubleIDRepositoryELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/repositories/doubleid/DoubleIDRepositoryIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repositories/doubleid/DoubleIDRepositoryIntegrationTests.java index 1b7a1de71b..a6a191f777 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/doubleid/DoubleIDRepositoryIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/doubleid/DoubleIDRepositoryIntegrationTests.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/test/java/org/springframework/data/elasticsearch/repositories/dynamicindex/DynamicIndexEntityELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repositories/dynamicindex/DynamicIndexEntityELCIntegrationTests.java index 79b7e47802..2fabf32ed5 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/dynamicindex/DynamicIndexEntityELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/dynamicindex/DynamicIndexEntityELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/repositories/dynamicindex/DynamicIndexEntityIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repositories/dynamicindex/DynamicIndexEntityIntegrationTests.java index 7d8d0c42fa..5f5160262f 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/dynamicindex/DynamicIndexEntityIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/dynamicindex/DynamicIndexEntityIntegrationTests.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/test/java/org/springframework/data/elasticsearch/repositories/geo/GeoRepositoryELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repositories/geo/GeoRepositoryELCIntegrationTests.java index 652fe28fad..06de58ecc8 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/geo/GeoRepositoryELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/geo/GeoRepositoryELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/repositories/geo/GeoRepositoryIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repositories/geo/GeoRepositoryIntegrationTests.java index de031541cf..4ab4918638 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/geo/GeoRepositoryIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/geo/GeoRepositoryIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2024 the original author or authors. + * Copyright 2016-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/test/java/org/springframework/data/elasticsearch/repositories/integer/IntegerIDRepositoryELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repositories/integer/IntegerIDRepositoryELCIntegrationTests.java index 876c43c22a..ea6f41f336 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/integer/IntegerIDRepositoryELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/integer/IntegerIDRepositoryELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/repositories/integer/IntegerIDRepositoryIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repositories/integer/IntegerIDRepositoryIntegrationTests.java index 215c8fc803..12712e9b40 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/integer/IntegerIDRepositoryIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/integer/IntegerIDRepositoryIntegrationTests.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/test/java/org/springframework/data/elasticsearch/repositories/nestedobject/InnerObjectIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repositories/nestedobject/InnerObjectIntegrationTests.java index 0ddfeb47d6..90f3a2a108 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/nestedobject/InnerObjectIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/nestedobject/InnerObjectIntegrationTests.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/test/java/org/springframework/data/elasticsearch/repositories/setting/dynamic/DynamicSettingAndMappingEntityRepositoryELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repositories/setting/dynamic/DynamicSettingAndMappingEntityRepositoryELCIntegrationTests.java index 08ace88b2a..1d808a83b7 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/setting/dynamic/DynamicSettingAndMappingEntityRepositoryELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/setting/dynamic/DynamicSettingAndMappingEntityRepositoryELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/repositories/setting/dynamic/DynamicSettingAndMappingEntityRepositoryIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repositories/setting/dynamic/DynamicSettingAndMappingEntityRepositoryIntegrationTests.java index 5dbfa09ac6..c02318a21c 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/setting/dynamic/DynamicSettingAndMappingEntityRepositoryIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/setting/dynamic/DynamicSettingAndMappingEntityRepositoryIntegrationTests.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/test/java/org/springframework/data/elasticsearch/repositories/setting/fielddynamic/FieldDynamicMappingEntityRepositoryELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repositories/setting/fielddynamic/FieldDynamicMappingEntityRepositoryELCIntegrationTests.java index bfba0e65d9..72eb6819ce 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/setting/fielddynamic/FieldDynamicMappingEntityRepositoryELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/setting/fielddynamic/FieldDynamicMappingEntityRepositoryELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/repositories/setting/fielddynamic/FieldDynamicMappingEntityRepositoryIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repositories/setting/fielddynamic/FieldDynamicMappingEntityRepositoryIntegrationTests.java index 0cfebd4615..ac327d26be 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/setting/fielddynamic/FieldDynamicMappingEntityRepositoryIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/setting/fielddynamic/FieldDynamicMappingEntityRepositoryIntegrationTests.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/test/java/org/springframework/data/elasticsearch/repositories/spel/SpELEntityELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repositories/spel/SpELEntityELCIntegrationTests.java index 51cc216482..4939f21760 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/spel/SpELEntityELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/spel/SpELEntityELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/repositories/spel/SpELEntityIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repositories/spel/SpELEntityIntegrationTests.java index 6b0791d567..a5c403991a 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/spel/SpELEntityIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/spel/SpELEntityIntegrationTests.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/test/java/org/springframework/data/elasticsearch/repositories/synonym/SynonymRepositoryELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repositories/synonym/SynonymRepositoryELCIntegrationTests.java index 1cbe7e7080..683a31cbd3 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/synonym/SynonymRepositoryELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/synonym/SynonymRepositoryELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/repositories/synonym/SynonymRepositoryIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repositories/synonym/SynonymRepositoryIntegrationTests.java index 12939f6366..ea418a2be2 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/synonym/SynonymRepositoryIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/synonym/SynonymRepositoryIntegrationTests.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/test/java/org/springframework/data/elasticsearch/repositories/uuidkeyed/UUIDElasticsearchRepositoryELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repositories/uuidkeyed/UUIDElasticsearchRepositoryELCIntegrationTests.java index b145b0c4b4..c507c22544 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/uuidkeyed/UUIDElasticsearchRepositoryELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/uuidkeyed/UUIDElasticsearchRepositoryELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/repositories/uuidkeyed/UUIDElasticsearchRepositoryIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repositories/uuidkeyed/UUIDElasticsearchRepositoryIntegrationTests.java index b779eef357..00dae64e25 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/uuidkeyed/UUIDElasticsearchRepositoryIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/uuidkeyed/UUIDElasticsearchRepositoryIntegrationTests.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/test/java/org/springframework/data/elasticsearch/repository/config/ReactiveElasticsearchRepositoriesRegistrarTests.java b/src/test/java/org/springframework/data/elasticsearch/repository/config/ReactiveElasticsearchRepositoriesRegistrarTests.java index ee5d5ccc4a..79b43c3e6a 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repository/config/ReactiveElasticsearchRepositoriesRegistrarTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repository/config/ReactiveElasticsearchRepositoriesRegistrarTests.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/test/java/org/springframework/data/elasticsearch/repository/config/ReactiveElasticsearchRepositoryConfigurationExtensionUnitTests.java b/src/test/java/org/springframework/data/elasticsearch/repository/config/ReactiveElasticsearchRepositoryConfigurationExtensionUnitTests.java index 216eeae761..2dc981dc67 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repository/config/ReactiveElasticsearchRepositoryConfigurationExtensionUnitTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repository/config/ReactiveElasticsearchRepositoryConfigurationExtensionUnitTests.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/test/java/org/springframework/data/elasticsearch/repository/query/ElasticsearchQueryMethodUnitTests.java b/src/test/java/org/springframework/data/elasticsearch/repository/query/ElasticsearchQueryMethodUnitTests.java index 441cf1e80e..abf2f41579 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repository/query/ElasticsearchQueryMethodUnitTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repository/query/ElasticsearchQueryMethodUnitTests.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/test/java/org/springframework/data/elasticsearch/repository/query/ElasticsearchStringQueryUnitTestBase.java b/src/test/java/org/springframework/data/elasticsearch/repository/query/ElasticsearchStringQueryUnitTestBase.java index 5bd221b5d0..ef0f79cb73 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repository/query/ElasticsearchStringQueryUnitTestBase.java +++ b/src/test/java/org/springframework/data/elasticsearch/repository/query/ElasticsearchStringQueryUnitTestBase.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/test/java/org/springframework/data/elasticsearch/repository/query/ElasticsearchStringQueryUnitTests.java b/src/test/java/org/springframework/data/elasticsearch/repository/query/ElasticsearchStringQueryUnitTests.java index 13ae5cb9c7..c15612ff6b 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repository/query/ElasticsearchStringQueryUnitTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repository/query/ElasticsearchStringQueryUnitTests.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/test/java/org/springframework/data/elasticsearch/repository/query/ReactiveElasticsearchQueryMethodUnitTests.java b/src/test/java/org/springframework/data/elasticsearch/repository/query/ReactiveElasticsearchQueryMethodUnitTests.java index b352432716..84adf695db 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repository/query/ReactiveElasticsearchQueryMethodUnitTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repository/query/ReactiveElasticsearchQueryMethodUnitTests.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/test/java/org/springframework/data/elasticsearch/repository/query/ReactiveElasticsearchStringQueryUnitTests.java b/src/test/java/org/springframework/data/elasticsearch/repository/query/ReactiveElasticsearchStringQueryUnitTests.java index e51674ab83..e5a9f626dc 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repository/query/ReactiveElasticsearchStringQueryUnitTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repository/query/ReactiveElasticsearchStringQueryUnitTests.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/test/java/org/springframework/data/elasticsearch/repository/query/keywords/QueryKeywordsELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repository/query/keywords/QueryKeywordsELCIntegrationTests.java index 36d49f60ec..8371384bdb 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repository/query/keywords/QueryKeywordsELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repository/query/keywords/QueryKeywordsELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/repository/query/keywords/QueryKeywordsIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repository/query/keywords/QueryKeywordsIntegrationTests.java index 757484e734..442d49ea2a 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repository/query/keywords/QueryKeywordsIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repository/query/keywords/QueryKeywordsIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2024 the original author or authors. + * Copyright 2016-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/test/java/org/springframework/data/elasticsearch/repository/query/keywords/ReactiveQueryKeywordsELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repository/query/keywords/ReactiveQueryKeywordsELCIntegrationTests.java index e06d8e0f57..7471d64719 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repository/query/keywords/ReactiveQueryKeywordsELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repository/query/keywords/ReactiveQueryKeywordsELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/repository/query/keywords/ReactiveQueryKeywordsIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repository/query/keywords/ReactiveQueryKeywordsIntegrationTests.java index ae27c04169..a2a4c74431 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repository/query/keywords/ReactiveQueryKeywordsIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repository/query/keywords/ReactiveQueryKeywordsIntegrationTests.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/test/java/org/springframework/data/elasticsearch/repository/query/valueconverter/ReactiveValueConverterELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repository/query/valueconverter/ReactiveValueConverterELCIntegrationTests.java index 6f4b75c814..482dea83f9 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repository/query/valueconverter/ReactiveValueConverterELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repository/query/valueconverter/ReactiveValueConverterELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/repository/query/valueconverter/ReactiveValueConverterIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repository/query/valueconverter/ReactiveValueConverterIntegrationTests.java index c896ff5391..3d8044844d 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repository/query/valueconverter/ReactiveValueConverterIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repository/query/valueconverter/ReactiveValueConverterIntegrationTests.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/test/java/org/springframework/data/elasticsearch/repository/query/valueconverter/ValueConverterELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repository/query/valueconverter/ValueConverterELCIntegrationTests.java index f2c19956b1..6018bfaecf 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repository/query/valueconverter/ValueConverterELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repository/query/valueconverter/ValueConverterELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/repository/query/valueconverter/ValueConverterIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repository/query/valueconverter/ValueConverterIntegrationTests.java index 42802a4d07..6fdbfc75b3 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repository/query/valueconverter/ValueConverterIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repository/query/valueconverter/ValueConverterIntegrationTests.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/test/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchEntityInformationCreatorImplTests.java b/src/test/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchEntityInformationCreatorImplTests.java index 1e74e478e8..ff97fe7488 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchEntityInformationCreatorImplTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchEntityInformationCreatorImplTests.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/test/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchRepositoryELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchRepositoryELCIntegrationTests.java index 43fdee7b4a..51b05be02b 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchRepositoryELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchRepositoryELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchRepositoryIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchRepositoryIntegrationTests.java index 1cb0d1bc65..7c037b8231 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchRepositoryIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchRepositoryIntegrationTests.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/test/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepositoryELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepositoryELCIntegrationTests.java index b5aec9c927..20a0ddff3c 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepositoryELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepositoryELCIntegrationTests.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. @@ -15,14 +15,22 @@ */ package org.springframework.data.elasticsearch.repository.support; +import co.elastic.clients.elasticsearch.core.search.FieldCollapse; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; +import org.springframework.data.domain.Pageable; +import org.springframework.data.domain.Sort; +import org.springframework.data.elasticsearch.client.elc.NativeQuery; +import org.springframework.data.elasticsearch.client.elc.Queries; import org.springframework.data.elasticsearch.junit.jupiter.ReactiveElasticsearchTemplateConfiguration; import org.springframework.data.elasticsearch.repositories.custommethod.QueryParameter; import org.springframework.data.elasticsearch.repository.config.EnableReactiveElasticsearchRepositories; import org.springframework.data.elasticsearch.utils.IndexNameProvider; import org.springframework.test.context.ContextConfiguration; +import reactor.test.StepVerifier; /** * @author Peter-Josef Meisch @@ -51,4 +59,33 @@ QueryParameter queryParameter() { } } + /** + * search_after is used by the reactive search operation, it normally always adds _shard_doc as a tiebreaker sort + * parameter. This must not be done when a collapse field is used as sort field, as in that case the collapse field + * must be the only sort field. + */ + @Test // #2935 + @DisplayName("should use collapse_field for search_after in pit search") + void shouldUseCollapseFieldForSearchAfterI() { + var entity = new SampleEntity(); + entity.setId("42"); + entity.setMessage("m"); + entity.setKeyword("kw"); + repository.save(entity).block(); + + var query = NativeQuery.builder() + .withQuery(Queries.matchAllQueryAsQuery()) + .withPageable(Pageable.unpaged()) + .withFieldCollapse(FieldCollapse.of(fcb -> fcb + .field("keyword"))) + .withSort(Sort.by("keyword")) + .build(); + + operations.search(query, SampleEntity.class) + .as(StepVerifier::create) + .expectNextCount(1) + .verifyComplete(); + } + + } diff --git a/src/test/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepositoryIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepositoryIntegrationTests.java index 2ade46a6da..17fddb9288 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepositoryIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepositoryIntegrationTests.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. @@ -105,6 +105,26 @@ private Mono documentWithIdExistsInIndex(String id) { return operations.exists(id, IndexCoordinates.of(indexNameProvider.indexName())); } + @Test // #3093 + @DisplayName("should save all from empty collection") + void shouldSaveAllFromEmptyCollection() { + + repository.saveAll(Collections.emptyList()) + .as(StepVerifier::create) + .expectNextCount(0) + .verifyComplete(); + } + + @Test // #3093 + @DisplayName("should save all from empty flux") + void shouldSaveAllFromEmptyFlux() { + + repository.saveAll(Flux.empty()) + .as(StepVerifier::create) + .expectNextCount(0) + .verifyComplete(); + } + @Test // DATAES-519 void saveShouldComputeMultipleEntities() { diff --git a/src/test/java/org/springframework/data/elasticsearch/repository/support/querybyexample/QueryByExampleElasticsearchExecutorELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repository/support/querybyexample/QueryByExampleElasticsearchExecutorELCIntegrationTests.java index 2e359bc2e9..1238849711 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repository/support/querybyexample/QueryByExampleElasticsearchExecutorELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repository/support/querybyexample/QueryByExampleElasticsearchExecutorELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/repository/support/querybyexample/QueryByExampleElasticsearchExecutorIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repository/support/querybyexample/QueryByExampleElasticsearchExecutorIntegrationTests.java index 040c2ba84f..9bace28edb 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repository/support/querybyexample/QueryByExampleElasticsearchExecutorIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repository/support/querybyexample/QueryByExampleElasticsearchExecutorIntegrationTests.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/test/java/org/springframework/data/elasticsearch/repository/support/querybyexample/ReactiveQueryByExampleElasticsearchExecutorELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repository/support/querybyexample/ReactiveQueryByExampleElasticsearchExecutorELCIntegrationTests.java index 9f12e4eec9..7482bb4884 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repository/support/querybyexample/ReactiveQueryByExampleElasticsearchExecutorELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repository/support/querybyexample/ReactiveQueryByExampleElasticsearchExecutorELCIntegrationTests.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/test/java/org/springframework/data/elasticsearch/repository/support/querybyexample/ReactiveQueryByExampleElasticsearchExecutorIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repository/support/querybyexample/ReactiveQueryByExampleElasticsearchExecutorIntegrationTests.java index ad50e9ea29..7593d5c253 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repository/support/querybyexample/ReactiveQueryByExampleElasticsearchExecutorIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repository/support/querybyexample/ReactiveQueryByExampleElasticsearchExecutorIntegrationTests.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/test/java/org/springframework/data/elasticsearch/support/DefaultStringObjectMapUnitTests.java b/src/test/java/org/springframework/data/elasticsearch/support/DefaultStringObjectMapUnitTests.java index 841e82b69b..a77682d364 100644 --- a/src/test/java/org/springframework/data/elasticsearch/support/DefaultStringObjectMapUnitTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/support/DefaultStringObjectMapUnitTests.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/test/java/org/springframework/data/elasticsearch/support/HttpHeadersTest.java b/src/test/java/org/springframework/data/elasticsearch/support/HttpHeadersTest.java index fba000f70f..e9a0a04529 100644 --- a/src/test/java/org/springframework/data/elasticsearch/support/HttpHeadersTest.java +++ b/src/test/java/org/springframework/data/elasticsearch/support/HttpHeadersTest.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/test/java/org/springframework/data/elasticsearch/support/VersionInfoTest.java b/src/test/java/org/springframework/data/elasticsearch/support/VersionInfoTest.java index 5e3231c140..2571a41ca0 100644 --- a/src/test/java/org/springframework/data/elasticsearch/support/VersionInfoTest.java +++ b/src/test/java/org/springframework/data/elasticsearch/support/VersionInfoTest.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/test/java/org/springframework/data/elasticsearch/support/VersionUnitTest.java b/src/test/java/org/springframework/data/elasticsearch/support/VersionUnitTest.java index 5104564a4f..6e643d34e3 100644 --- a/src/test/java/org/springframework/data/elasticsearch/support/VersionUnitTest.java +++ b/src/test/java/org/springframework/data/elasticsearch/support/VersionUnitTest.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/test/java/org/springframework/data/elasticsearch/utils/IdGenerator.java b/src/test/java/org/springframework/data/elasticsearch/utils/IdGenerator.java index 002681ff2e..adffb8be68 100644 --- a/src/test/java/org/springframework/data/elasticsearch/utils/IdGenerator.java +++ b/src/test/java/org/springframework/data/elasticsearch/utils/IdGenerator.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/test/java/org/springframework/data/elasticsearch/utils/IndexNameProvider.java b/src/test/java/org/springframework/data/elasticsearch/utils/IndexNameProvider.java index 5a4820edd7..dcc28c9457 100644 --- a/src/test/java/org/springframework/data/elasticsearch/utils/IndexNameProvider.java +++ b/src/test/java/org/springframework/data/elasticsearch/utils/IndexNameProvider.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/test/kotlin/org/springframework/data/elasticsearch/repository/query/CoroutineRepositoryELCIntegrationTests.kt b/src/test/kotlin/org/springframework/data/elasticsearch/repository/query/CoroutineRepositoryELCIntegrationTests.kt index ce00ebdd7a..2bd6d5a0da 100644 --- a/src/test/kotlin/org/springframework/data/elasticsearch/repository/query/CoroutineRepositoryELCIntegrationTests.kt +++ b/src/test/kotlin/org/springframework/data/elasticsearch/repository/query/CoroutineRepositoryELCIntegrationTests.kt @@ -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/test/kotlin/org/springframework/data/elasticsearch/repository/query/CoroutineRepositoryIntegrationTests.kt b/src/test/kotlin/org/springframework/data/elasticsearch/repository/query/CoroutineRepositoryIntegrationTests.kt index 89a1dcf7d5..2438aabb81 100644 --- a/src/test/kotlin/org/springframework/data/elasticsearch/repository/query/CoroutineRepositoryIntegrationTests.kt +++ b/src/test/kotlin/org/springframework/data/elasticsearch/repository/query/CoroutineRepositoryIntegrationTests.kt @@ -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/test/resources/META-INF/services/reactor.blockhound.integration.BlockHoundIntegration b/src/test/resources/META-INF/services/reactor.blockhound.integration.BlockHoundIntegration deleted file mode 100644 index 1cd5f8f92f..0000000000 --- a/src/test/resources/META-INF/services/reactor.blockhound.integration.BlockHoundIntegration +++ /dev/null @@ -1 +0,0 @@ -org.springframework.data.elasticsearch.blockhound.BlockHoundIntegrationCustomizer diff --git a/src/test/resources/testcontainers-elasticsearch.properties b/src/test/resources/testcontainers-elasticsearch.properties index 487a77738c..669b532c09 100644 --- a/src/test/resources/testcontainers-elasticsearch.properties +++ b/src/test/resources/testcontainers-elasticsearch.properties @@ -15,7 +15,7 @@ # # sde.testcontainers.image-name=docker.elastic.co/elasticsearch/elasticsearch -sde.testcontainers.image-version=8.13.2 +sde.testcontainers.image-version=8.13.4 # # # needed as we do a DELETE /* at the end of the tests, will be required from 8.0 on, produces a warning since 7.13