diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties index 9f39d05501..dcfaafad58 100644 --- a/.mvn/wrapper/maven-wrapper.properties +++ b/.mvn/wrapper/maven-wrapper.properties @@ -1,3 +1,3 @@ -#Thu Apr 06 16:16:37 CEST 2023 +#Thu Dec 14 08:37:40 CET 2023 wrapperUrl=https\://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar -distributionUrl=https\://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.1/apache-maven-3.9.1-bin.zip +distributionUrl=https\://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip diff --git a/Jenkinsfile b/Jenkinsfile index a4cf17560a..8692547315 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.1.x", threshold: hudson.model.Result.SUCCESS) } options { @@ -37,9 +37,11 @@ pipeline { steps { script { - docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.docker']) { - sh 'PROFILE=none ci/verify.sh' - sh "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" + } } } } @@ -64,9 +66,11 @@ pipeline { } steps { script { - docker.image(p['docker.java.next.image']).inside(p['docker.java.inside.docker']) { - sh 'PROFILE=none ci/verify.sh' - sh "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" + } } } } @@ -86,22 +90,23 @@ pipeline { label 'data' } options { timeout(time: 20, unit: 'MINUTES') } - environment { ARTIFACTORY = credentials("${p['artifactory.credentials']}") } - steps { script { - docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.basic']) { - sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -s settings.xml -Pci,artifactory -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-elasticsearch-non-root ' + - '-Dartifactory.server=https://repo.spring.io ' + - "-Dartifactory.username=${ARTIFACTORY_USR} " + - "-Dartifactory.password=${ARTIFACTORY_PSW} " + - "-Dartifactory.staging-repository=libs-snapshot-local " + - "-Dartifactory.build-name=spring-data-elasticsearch " + - "-Dartifactory.build-number=${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.basic']) { + sh 'MAVEN_OPTS="-Duser.name=' + "${p['jenkins.user.name']}" + ' -Duser.home=/tmp/jenkins-home" ' + + "./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" + } } } } @@ -111,10 +116,6 @@ pipeline { post { changed { script { - slackSend( - color: (currentBuild.currentResult == 'SUCCESS') ? 'good' : 'danger', - channel: '#spring-data-dev', - message: "${currentBuild.fullDisplayName} - `${currentBuild.currentResult}`\n${env.BUILD_URL}") emailext( subject: "[${currentBuild.fullDisplayName}] ${currentBuild.currentResult}", mimeType: 'text/html', diff --git a/README.adoc b/README.adoc index c55a808007..f0d6c86039 100644 --- a/README.adoc +++ b/README.adoc @@ -137,9 +137,9 @@ To use the Release candidate versions of the upcoming major version, use our Mav - spring-libs-snapshot + spring-snapshot Spring Snapshot Repository - https://repo.spring.io/libs-milestone + https://repo.spring.io/milestone ---- @@ -154,9 +154,9 @@ If you'd rather like the latest snapshots of the upcoming major version, use our - spring-libs-snapshot + spring-snapshot Spring Snapshot Repository - https://repo.spring.io/libs-snapshot + https://repo.spring.io/snapshot ---- diff --git a/ci/clean.sh b/ci/clean.sh index e78b1e148c..6ddbf1b4b5 100755 --- a/ci/clean.sh +++ b/ci/clean.sh @@ -2,5 +2,7 @@ set -euo pipefail -MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" \ +export JENKINS_USER=${JENKINS_USER_NAME} + +MAVEN_OPTS="-Duser.name=${JENKINS_USER} -Duser.home=/tmp/jenkins-home" \ ./mvnw -s settings.xml clean -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-elasticsearch diff --git a/ci/pipeline.properties b/ci/pipeline.properties index 2f45263dbc..62e60e6aa5 100644 --- a/ci/pipeline.properties +++ b/ci/pipeline.properties @@ -1,21 +1,22 @@ # Java versions -java.main.tag=17.0.6_10-jdk-focal +java.main.tag=17.0.9_9-jdk-focal java.next.tag=20-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.18 -docker.mongodb.5.0.version=5.0.14 -docker.mongodb.6.0.version=6.0.4 +docker.mongodb.4.4.version=4.4.25 +docker.mongodb.5.0.version=5.0.21 +docker.mongodb.6.0.version=6.0.10 # Supported versions of Redis -docker.redis.6.version=6.2.10 +docker.redis.6.version=6.2.13 +docker.redis.7.version=7.2.4 # Supported versions of Cassandra -docker.cassandra.3.version=3.11.14 +docker.cassandra.3.version=3.11.16 # Docker environment settings docker.java.inside.basic=-v $HOME:/tmp/jenkins-home @@ -24,4 +25,9 @@ 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 +jenkins.user.name=spring-builds+jenkins diff --git a/ci/verify.sh b/ci/verify.sh index e3ea308624..594c857975 100755 --- a/ci/verify.sh +++ b/ci/verify.sh @@ -5,6 +5,8 @@ set -euo pipefail mkdir -p /tmp/jenkins-home/.m2/spring-data-elasticsearch chown -R 1001:1001 . -MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" \ +export JENKINS_USER=${JENKINS_USER_NAME} + +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 \ No newline at end of file + -P${PROFILE} clean dependency:list verify -Dsort -U -B -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-elasticsearch diff --git a/pom.xml b/pom.xml index 219abe9837..b94528c885 100644 --- a/pom.xml +++ b/pom.xml @@ -1,486 +1,483 @@ - 4.0.0 - - org.springframework.data - spring-data-elasticsearch - 5.1.0 - - - org.springframework.data.build - spring-data-parent - 3.1.0 - - - Spring Data Elasticsearch - Spring Data Implementation for Elasticsearch + 4.0.0 + + org.springframework.data + spring-data-elasticsearch + 5.1.13-SNAPSHOT + + + org.springframework.data.build + spring-data-parent + 3.1.13-SNAPSHOT + + + Spring Data Elasticsearch + Spring Data Implementation for Elasticsearch + https://github.com/spring-projects/spring-data-elasticsearch + + + 3.1.13-SNAPSHOT + + + 7.17.15 + + 8.7.1 + + 2.18.0 + + 4.1.107.Final + + 1.0.8.RELEASE + 0.14.4 + 1.5.1 + 1.18.0 + 2.35.0 + + spring.data.elasticsearch + + + test + integration-test + + + + + biomedcentral + BioMed Central Development Team + +0 + + + cstrobl + Christoph Strobl + cstrobl at pivotal.io + Pivotal + https://www.pivotal.io + + Developer + + +1 + + + mpaluch + Mark Paluch + mpaluch at pivotal.io + Pivotal + https://www.pivotal.io + + Developer + + +1 + + + + https://github.com/spring-projects/spring-data-elasticsearch - - - 3.1.0 - - - 7.17.9 - - 8.7.0 - - 2.18.0 - - 4.1.90.Final - - 1.0.8.RELEASE - 0.14.4 - 1.5.1 - 1.18.0 - 2.35.0 - - spring.data.elasticsearch - - - test - integration-test - - - - - biomedcentral - BioMed Central Development Team - +0 - - - cstrobl - Christoph Strobl - cstrobl at pivotal.io - Pivotal - https://www.pivotal.io - - Developer - - +1 - - - mpaluch - Mark Paluch - mpaluch at pivotal.io - Pivotal - https://www.pivotal.io - - Developer - - +1 - - - - - https://github.com/spring-projects/spring-data-elasticsearch - scm:git:git://github.com/spring-projects/spring-data-elasticsearch.git - scm:git:ssh://git@github.com/spring-projects/spring-data-elasticsearch.git - - - - - Bamboo - https://build.spring.io/browse/SPRINGDATAES - - - - GitHub - https://github.com/spring-projects/spring-data-elasticsearch/issues - - - - - - io.netty - netty-bom - ${netty} - pom - import - - - - + scm:git:git://github.com/spring-projects/spring-data-elasticsearch.git + scm:git:ssh://git@github.com/spring-projects/spring-data-elasticsearch.git + + + + + Bamboo + https://build.spring.io/browse/SPRINGDATAES + + + + GitHub + https://github.com/spring-projects/spring-data-elasticsearch/issues + + + - - - - org.springframework - spring-context - - - - org.springframework - spring-tx - - - - - org.springframework.data - spring-data-commons - ${springdata.commons} - - - - - org.springframework - spring-webflux - true - - - - io.projectreactor.netty - reactor-netty-http - true - - - - io.projectreactor - reactor-test - test - - - - - org.elasticsearch.client - elasticsearch-rest-high-level-client - ${elasticsearch-rhlc} - true - - - commons-logging - commons-logging - - - - - - - co.elastic.clients - elasticsearch-java - ${elasticsearch-java} - - - commons-logging - commons-logging - - - - - org.elasticsearch.client - elasticsearch-rest-client - ${elasticsearch-java} - - - commons-logging - commons-logging - - - - - - - com.fasterxml.jackson.core - jackson-core - - - com.fasterxml.jackson.core - jackson-databind - - - - - - javax.interceptor - javax.interceptor-api - 1.2.2 - test - - - - jakarta.enterprise - jakarta.enterprise.cdi-api - 3.0.1 - provided - true - - - - jakarta.annotation - jakarta.annotation-api - ${jakarta-annotation-api} - test - - - - org.apache.openwebbeans - openwebbeans-se - jakarta - ${webbeans} - test - - - - org.apache.openwebbeans - openwebbeans-spi - jakarta - ${webbeans} - test - - - - org.apache.openwebbeans - openwebbeans-impl - jakarta - ${webbeans} - test - - - - - org.springframework - spring-test - test - - - ch.qos.logback - logback-classic - - - - - - org.slf4j - log4j-over-slf4j - ${slf4j} - test - - - org.apache.logging.log4j - log4j-core - ${log4j} - test - - - org.apache.logging.log4j - log4j-to-slf4j - ${log4j} - test - - - - io.projectreactor.tools - blockhound-junit-platform - ${blockhound-junit} - test - - - - org.skyscreamer - jsonassert - ${jsonassert} - test - - - - com.github.tomakehurst - wiremock-jre8 - ${wiremock} - test - - - - commons-logging - commons-logging - - - org.ow2.asm - asm - - - - - - io.specto - hoverfly-java-junit5 - ${hoverfly} - test - - - - - org.apache.xbean - xbean-asm5-shaded - 4.5 - test - - - - javax.servlet - javax.servlet-api - 3.1.0 - test - - - - org.mockito - mockito-junit-jupiter - ${mockito} - test - - - - org.testcontainers - elasticsearch - ${testcontainers} - test - - + + io.netty + netty-bom + ${netty} + pom + import + - - - - - src/main/resources - true - - **/versions.properties - - - - src/main/resources - false - - **/versions.properties - - - - + + + + + + + org.springframework + spring-context + + + + org.springframework + spring-tx + + + + + org.springframework.data + spring-data-commons + ${springdata.commons} + + + + + org.springframework + spring-webflux + true + + + + io.projectreactor.netty + reactor-netty-http + true + + + + io.projectreactor + reactor-test + test + + + + + org.elasticsearch.client + elasticsearch-rest-high-level-client + ${elasticsearch-rhlc} + true + + + commons-logging + commons-logging + + + + + + + co.elastic.clients + elasticsearch-java + ${elasticsearch-java} + + + commons-logging + commons-logging + + + + + org.elasticsearch.client + elasticsearch-rest-client + ${elasticsearch-java} + + + commons-logging + commons-logging + + + + + + + com.fasterxml.jackson.core + jackson-core + + + com.fasterxml.jackson.core + jackson-databind + + + + + + javax.interceptor + javax.interceptor-api + 1.2.2 + test + + + + jakarta.enterprise + jakarta.enterprise.cdi-api + 3.0.1 + provided + true + + + + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-api} + test + + + + org.apache.openwebbeans + openwebbeans-se + jakarta + ${webbeans} + test + + + + org.apache.openwebbeans + openwebbeans-spi + jakarta + ${webbeans} + test + + + + org.apache.openwebbeans + openwebbeans-impl + jakarta + ${webbeans} + test + + + + + org.springframework + spring-test + test + + + ch.qos.logback + logback-classic + + + + + + org.slf4j + log4j-over-slf4j + ${slf4j} + test + + + org.apache.logging.log4j + log4j-core + ${log4j} + test + + + org.apache.logging.log4j + log4j-to-slf4j + ${log4j} + test + + + + io.projectreactor.tools + blockhound-junit-platform + ${blockhound-junit} + test + + + + org.skyscreamer + jsonassert + ${jsonassert} + test + + + + com.github.tomakehurst + wiremock-jre8 + ${wiremock} + test + + + + commons-logging + commons-logging + + + org.ow2.asm + asm + + + + + + io.specto + hoverfly-java-junit5 + ${hoverfly} + test + + + + + org.apache.xbean + xbean-asm5-shaded + 4.5 + test + + + + javax.servlet + javax.servlet-api + 3.1.0 + test + + + + org.mockito + mockito-junit-jupiter + ${mockito} + test + + + + org.testcontainers + elasticsearch + ${testcontainers} + test + + + + + + + + src/main/resources + true + + **/versions.properties + + + + src/main/resources + false + + **/versions.properties + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + true + false + + **/*Tests.java + **/*Test.java + + + false + + + + + + default-test + ${mvn.unit-test.goal} + + test + + + integration-test + + + + + integration-test-elasticsearch + ${mvn.integration-test-elasticsearch.goal} + + test + + + integration-test + + elasticsearch + + + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + org.asciidoctor + asciidoctor-maven-plugin + + + + + + + ci + + + + org.apache.maven.plugins + maven-checkstyle-plugin + + + + + + + + + + + **/* + + .git/**/*,target/**/*,**/target/**/*,.idea/**/*,**/spring.schemas,**/*.svg,mvnw,mvnw.cmd,**/*.policy + + ./ + + + + + + + + jdk13+ + + + [13,) + + - - org.apache.maven.plugins - maven-surefire-plugin - - true - false - - **/*Tests.java - **/*Test.java - - - false - - - - - - default-test - ${mvn.unit-test.goal} - - test - - - integration-test - - - - - integration-test-elasticsearch - ${mvn.integration-test-elasticsearch.goal} - - test - - - integration-test - - elasticsearch - - - - - - - org.apache.maven.plugins - maven-assembly-plugin - - - org.asciidoctor - asciidoctor-maven-plugin - + + org.apache.maven.plugins + maven-surefire-plugin + + -XX:+AllowRedefinitionToAddDeleteMethods + + - - - - - ci - - - - org.apache.maven.plugins - maven-checkstyle-plugin - - - - - - - - - - - **/* - - .git/**/*,target/**/*,**/target/**/*,.idea/**/*,**/spring.schemas,**/*.svg,mvnw,mvnw.cmd,**/*.policy - - ./ - - - - - - - - jdk13+ - - - [13,) - - - - - org.apache.maven.plugins - maven-surefire-plugin - - -XX:+AllowRedefinitionToAddDeleteMethods - - - - - - - - - - spring-libs-release - https://repo.spring.io/libs-release - - - - local-maven-repo - file:///${project.basedir}/src/test/resources/local-maven-repo - - - - - - - spring-plugins-release - https://repo.spring.io/plugins-release - - + + + + + + + spring-snapshot + https://repo.spring.io/snapshot + + true + + + false + + + + spring-milestone + https://repo.spring.io/milestone + + diff --git a/src/main/asciidoc/index.adoc b/src/main/asciidoc/index.adoc index 129ad0cadf..a4d241dc84 100644 --- a/src/main/asciidoc/index.adoc +++ b/src/main/asciidoc/index.adoc @@ -5,7 +5,7 @@ BioMed Central Development Team; Oliver Drotbohm; Greg Turnquist; Christoph Stro ifdef::backend-epub3[:front-cover-image: image:epub-cover.png[Front Cover,1050,1600]] :spring-data-commons-docs: ../../../../spring-data-commons/src/main/asciidoc -(C) 2013-2022 The original author(s). +(C) 2013-2024 The original author(s). NOTE: Copies of this document may be made for your own use and for distribution to others, provided that you do not charge any fee for such copies and further provided that each copy contains this Copyright Notice, whether distributed in print or electronically. diff --git a/src/main/asciidoc/preface.adoc b/src/main/asciidoc/preface.adoc index d48b391f5c..8732e4f134 100644 --- a/src/main/asciidoc/preface.adoc +++ b/src/main/asciidoc/preface.adoc @@ -17,9 +17,9 @@ include::reference/elasticsearch-new.adoc[leveloffset=+1] * Version Control - https://github.com/spring-projects/spring-data-elasticsearch * API Documentation - https://docs.spring.io/spring-data/elasticsearch/docs/current/api/ * Bugtracker - https://github.com/spring-projects/spring-data-elasticsearch/issues -* Release repository - https://repo.spring.io/libs-release -* Milestone repository - https://repo.spring.io/libs-milestone -* Snapshot repository - https://repo.spring.io/libs-snapshot +* Release repository - https://repo1.maven.org/maven2/ +* Milestone repository - https://repo.spring.io/milestone/ +* Snapshot repository - https://repo.spring.io/snapshot/ [[preface.requirements]] == Requirements @@ -37,7 +37,7 @@ built and tested. [cols="^,^,^,^,^",options="header"] |=== | Spring Data Release Train | Spring Data Elasticsearch | Elasticsearch | Spring Framework | Spring Boot -| 2023.0 (Ullmann) | 5.1.x | 8.7.0 | 6.0.x | 3.1.x +| 2023.0 (Ullmann) | 5.1.x | 8.7.1 | 6.0.x | 3.1.x | 2022.0 (Turing) | 5.0.x | 8.5.3 | 6.0.x | 3.0.x | 2021.2 (Raj) | 4.4.xfootnote:oom[Out of maintenance] | 7.17.3 | 5.3.x | 2.7.x | 2021.1 (Q) | 4.3.xfootnote:oom[] | 7.15.2 | 5.3.x | 2.6.x diff --git a/src/main/asciidoc/reference/migration-guides.adoc b/src/main/asciidoc/reference/migration-guides.adoc index 5ef75a1306..cdd23ed121 100644 --- a/src/main/asciidoc/reference/migration-guides.adoc +++ b/src/main/asciidoc/reference/migration-guides.adoc @@ -15,4 +15,6 @@ include::elasticsearch-migration-guide-4.3-4.4.adoc[] include::elasticsearch-migration-guide-4.4-5.0.adoc[] +include::elasticsearch-migration-guide-5.0-5.1.adoc[] + :leveloffset: -1 diff --git a/src/main/java/org/springframework/data/elasticsearch/BulkFailureException.java b/src/main/java/org/springframework/data/elasticsearch/BulkFailureException.java index d0b7c48d16..ac1879ba7c 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-2023 the original author or authors. + * Copyright 2020-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. diff --git a/src/main/java/org/springframework/data/elasticsearch/ElasticsearchErrorCause.java b/src/main/java/org/springframework/data/elasticsearch/ElasticsearchErrorCause.java index 38f52df0c8..130f218f8f 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-2023 the original author or authors. + * Copyright 2022-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. diff --git a/src/main/java/org/springframework/data/elasticsearch/NoSuchIndexException.java b/src/main/java/org/springframework/data/elasticsearch/NoSuchIndexException.java index b7a1bbd6e0..a431801aa4 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-2023 the original author or authors. + * Copyright 2019-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. diff --git a/src/main/java/org/springframework/data/elasticsearch/ResourceFailureException.java b/src/main/java/org/springframework/data/elasticsearch/ResourceFailureException.java index 0b9c0bf3a5..8dac09e1dc 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-2023 the original author or authors. + * 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. diff --git a/src/main/java/org/springframework/data/elasticsearch/ResourceNotFoundException.java b/src/main/java/org/springframework/data/elasticsearch/ResourceNotFoundException.java index 03170a0708..5ba76a6b29 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-2023 the original author or authors. + * Copyright 2022-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. diff --git a/src/main/java/org/springframework/data/elasticsearch/RestStatusException.java b/src/main/java/org/springframework/data/elasticsearch/RestStatusException.java index 8849e21d83..b743cc794f 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-2023 the original author or authors. + * 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. diff --git a/src/main/java/org/springframework/data/elasticsearch/UncategorizedElasticsearchException.java b/src/main/java/org/springframework/data/elasticsearch/UncategorizedElasticsearchException.java index c86be98f0a..c04de263ee 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-2023 the original author or authors. + * Copyright 2020-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. 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 4fd6faa383..3d93be01ec 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-2023 the original author or authors. + * Copyright 2019-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. 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 95e5060f93..04401340d8 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-2023 the original author or authors. + * Copyright 2013-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. 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 463452ca1d..0a0e80752b 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-2023 the original author or authors. + * 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. 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 c34adc9caa..92adc763e2 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-2023 the original author or authors. + * Copyright 2014-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. 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 0d7855c017..0eeda64db5 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-2023 the original author or authors. + * Copyright 2013-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. 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 fae31617a9..23a82f384b 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-2023 the original author or authors. + * 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. 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 0459857d31..dd299a4930 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-2023 the original author or authors. + * Copyright 2013-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. 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 316929e4ab..cbb8cd6090 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-2023 the original author or authors. + * Copyright 2013-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. 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 e17b85ff01..7feda38237 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-2023 the original author or authors. + * Copyright 2013-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. 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 865bf694da..0a3be4d2d6 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-2023 the original author or authors. + * Copyright 2017-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. 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 0c59f2d149..3b93f232d6 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-2023 the original author or authors. + * Copyright 2020-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. 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 4dbf7e92ba..73063b3451 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-2023 the original author or authors. + * Copyright 2020-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. 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 55cb5ab579..dca0e3fe0a 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-2023 the original author or authors. + * Copyright 2020-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. 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 b396786abb..89637309a9 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-2023 the original author or authors. + * Copyright 2019-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. 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 9d8333b0f8..76a481f735 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-2023 the original author or authors. + * Copyright 2019-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. 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 1a15f506c9..fd8cc8146a 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 the original author or authors. + * Copyright 2023-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. 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 3d1bd46e62..ceb6054119 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-2023 the original author or authors. + * Copyright 2014-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. 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 f814588112..4e544bd4c4 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-2023 the original author or authors. + * Copyright 2020-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. 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 6127b94849..fb1be2b68c 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-2023 the original author or authors. + * Copyright 2020-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. 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 2cdaa29efd..125f1a7672 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-2023 the original author or authors. + * Copyright 2014-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. 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 1469a714d6..0901be082d 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-2023 the original author or authors. + * Copyright 2014-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. 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 d3df4bdd94..8707def774 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-2023 the original author or authors. + * Copyright 2020-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. 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 0d97af4e6f..f5746a3551 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-2023 the original author or authors. + * Copyright 2013-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. 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 db4288565d..51f31b3b25 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-2023 the original author or authors. + * Copyright 2014-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. 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 dd1ce02a68..143996ea54 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-2023 the original author or authors. + * Copyright 2019-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. 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 2b488205d2..73f434999a 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-2023 the original author or authors. + * Copyright 2022-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. 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 e37a0133ff..377ed9063a 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-2023 the original author or authors. + * Copyright 2019-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. 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 2f8485d848..5e07262799 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-2023 the original author or authors. + * 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. 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 cfc36f4561..12ca0e1d22 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-2023 the original author or authors. + * Copyright 2022-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. 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 23fbcfd036..d62a704b7c 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-2023 the original author or authors. + * 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. 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 4d301a5838..e751a40237 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 the original author or authors. + * Copyright 2023-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. diff --git a/src/main/java/org/springframework/data/elasticsearch/aot/ElasticsearchRuntimeHints.java b/src/main/java/org/springframework/data/elasticsearch/aot/ElasticsearchRuntimeHints.java index 049901421d..99b1e93529 100644 --- a/src/main/java/org/springframework/data/elasticsearch/aot/ElasticsearchRuntimeHints.java +++ b/src/main/java/org/springframework/data/elasticsearch/aot/ElasticsearchRuntimeHints.java @@ -1,5 +1,5 @@ /* - * Copyright 2023 the original author or authors. + * Copyright 2023-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. 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 ff802c3aba..f6b098f0dc 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-2023 the original author or authors. + * Copyright 2018-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. 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 beb3097bd6..0b7b0a6600 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-2023 the original author or authors. + * Copyright 2018-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. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/ClientLogger.java b/src/main/java/org/springframework/data/elasticsearch/client/ClientLogger.java index cf314d04f2..3a86776a67 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/ClientLogger.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/ClientLogger.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2023 the original author or authors. + * Copyright 2018-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. 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 599af28e30..d33f3f1be5 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-2023 the original author or authors. + * Copyright 2018-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. 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 a6406dfad2..f422ecded2 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-2023 the original author or authors. + * Copyright 2018-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. 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 a8dc5e13f8..e5d9cd1f2d 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-2023 the original author or authors. + * Copyright 2018-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. 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 4a28d664d0..2487768785 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-2023 the original author or authors. + * Copyright 2018-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. 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 252f5524ec..1268ff3262 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-2023 the original author or authors. + * Copyright 2022-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. 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 bd5a539c51..112a03c783 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-2023 the original author or authors. + * Copyright 2022-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. 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 7e66d9c05c..ab46cad895 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-2023 the original author or authors. + * Copyright 2022-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. 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 d559d4f7c7..d6489ba19c 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-2023 the original author or authors. + * 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. 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 d5c1bcf4c1..633c858d46 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-2023 the original author or authors. + * 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. 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 0454b4a452..44f3f7a51b 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-2023 the original author or authors. + * 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. 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 9b52c375e0..e349db8c7b 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-2023 the original author or authors. + * 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. 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 cdb4e98e4c..2d43553d55 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-2023 the original author or authors. + * 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. 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 5e01e2f81a..2e8dcb6659 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-2023 the original author or authors. + * 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. 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 69e69e61c8..80dfad50a7 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-2023 the original author or authors. + * 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. @@ -138,7 +138,7 @@ public static SearchDocument from(Hit hit, JsonpMapper jsonpMapper) { document.setPrimaryTerm(hit.primaryTerm() != null && hit.primaryTerm() > 0 ? hit.primaryTerm() : 0); float score = hit.score() != null ? hit.score().floatValue() : Float.NaN; - return new SearchDocumentAdapter(document, score, hit.sort().stream().map(TypeUtils::toString).toArray(), + return new SearchDocumentAdapter(document, score, hit.sort().stream().map(TypeUtils::toObject).toArray(), documentFields, highlightFields, innerHits, nestedMetaData, explanation, matchedQueries, hit.routing()); } 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 e98f790467..4a4b442b11 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-2023 the original author or authors. + * Copyright 2022-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. 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 a21d04b1c3..10633a0ece 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-2023 the original author or authors. + * 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. 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 b60b9605ca..9bde4ada1a 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-2023 the original author or authors. + * Copyright 2022-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. 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 65868e5360..d7e2aa10dc 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-2023 the original author or authors. + * Copyright 2022-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. 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 2549d7a17e..1ca8d87886 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-2023 the original author or authors. + * 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. @@ -35,6 +35,9 @@ import java.util.function.Supplier; import java.util.stream.Collectors; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; import org.apache.http.*; import org.apache.http.client.config.RequestConfig; import org.apache.http.entity.ByteArrayEntity; @@ -269,7 +272,14 @@ private static ElasticsearchTransport getElasticsearchTransport(RestClient restC TransportOptions transportOptionsWithHeader = transportOptionsBuilder .addHeader(X_SPRING_DATA_ELASTICSEARCH_CLIENT, clientType).build(); - return new RestClientTransport(restClient, new JacksonJsonpMapper(), transportOptionsWithHeader); + // we need to create our own objectMapper that keeps null values in order to provide the storeNullValue + // functionality. The one Elasticsearch would provide removes the nulls. We remove unwanted nulls before they get + // into this mapper, so we can safely keep them here. + var objectMapper = (new ObjectMapper()) + .configure(SerializationFeature.INDENT_OUTPUT, false) + .setSerializationInclusion(JsonInclude.Include.ALWAYS); + + return new RestClientTransport(restClient, new JacksonJsonpMapper(objectMapper), transportOptionsWithHeader); } private static List formattedHosts(List hosts, boolean useSsl) { 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 2f06eb2a61..965b676469 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-2023 the original author or authors. + * 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. 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 3cdf391762..bda6ad6bc0 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-2023 the original author or authors. + * 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. 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 b6b57f96a5..79ad9dec31 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-2023 the original author or authors. + * 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. 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 c0b53585cf..b014f89ec3 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-2023 the original author or authors. + * 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. 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 fa7ccc9ec0..b26b016bbf 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-2023 the original author or authors. + * Copyright 2022-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. 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 208422adef..fe4a55b49c 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-2023 the original author or authors. + * 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. 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 5c9781b5f5..64697766e7 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-2023 the original author or authors. + * 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. 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 93d3e2f442..880cb7ae08 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-2023 the original author or authors. + * 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. 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 3a831e4bd4..e2eeb49fa4 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-2023 the original author or authors. + * Copyright 2022-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. 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 c7ea1e3728..a0062bb9df 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-2023 the original author or authors. + * Copyright 2022-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. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/elc/QueryBuilders.java b/src/main/java/org/springframework/data/elasticsearch/client/elc/QueryBuilders.java index 27c83c4923..66e58c6c40 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/elc/QueryBuilders.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/elc/QueryBuilders.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 the original author or authors. + * Copyright 2022-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. 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 3f25f7e19b..60e02c1ba7 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-2023 the original author or authors. + * 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. 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 697aa09099..b3b0acda05 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-2023 the original author or authors. + * 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. 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 39131d78dc..7095eb06c9 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-2023 the original author or authors. + * 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. 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 0e5f4b7d25..bbe1177a9f 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-2023 the original author or authors. + * 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. 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 d1feed24b9..235362e81c 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-2023 the original author or authors. + * 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. 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 c5b106a119..f274f7c66b 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-2023 the original author or authors. + * 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. 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 1fdb0b1166..7421ff2dae 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-2023 the original author or authors. + * 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. @@ -642,7 +642,7 @@ public Query idsQuery(List ids) { * * @param */ - interface ClientCallback> { + public interface ClientCallback> { T doWithClient(ReactiveElasticsearchClient client); } 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 d857945b9b..82f21f1072 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-2023 the original author or authors. + * 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. 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 4778bd5949..b1d7a8fbf3 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-2023 the original author or authors. + * 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. @@ -16,18 +16,24 @@ package org.springframework.data.elasticsearch.client.elc; import static org.springframework.data.elasticsearch.client.elc.TypeUtils.*; -import static org.springframework.util.CollectionUtils.isEmpty; - -import co.elastic.clients.elasticsearch._types.*; +import static org.springframework.util.CollectionUtils.*; + +import co.elastic.clients.elasticsearch._types.Conflicts; +import co.elastic.clients.elasticsearch._types.InlineScript; +import co.elastic.clients.elasticsearch._types.OpType; +import co.elastic.clients.elasticsearch._types.SortOptions; +import co.elastic.clients.elasticsearch._types.SortOrder; +import co.elastic.clients.elasticsearch._types.VersionType; +import co.elastic.clients.elasticsearch._types.WaitForActiveShardOptions; import co.elastic.clients.elasticsearch._types.mapping.FieldType; import co.elastic.clients.elasticsearch._types.mapping.RuntimeField; import co.elastic.clients.elasticsearch._types.mapping.RuntimeFieldType; import co.elastic.clients.elasticsearch._types.query_dsl.FieldAndFormat; import co.elastic.clients.elasticsearch._types.query_dsl.Like; -import co.elastic.clients.elasticsearch.cluster.*; import co.elastic.clients.elasticsearch.cluster.DeleteComponentTemplateRequest; import co.elastic.clients.elasticsearch.cluster.ExistsComponentTemplateRequest; import co.elastic.clients.elasticsearch.cluster.GetComponentTemplateRequest; +import co.elastic.clients.elasticsearch.cluster.HealthRequest; import co.elastic.clients.elasticsearch.cluster.PutComponentTemplateRequest; import co.elastic.clients.elasticsearch.core.*; import co.elastic.clients.elasticsearch.core.bulk.BulkOperation; @@ -52,7 +58,12 @@ import java.io.StringReader; import java.nio.charset.StandardCharsets; import java.time.Duration; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import java.util.function.Function; import java.util.stream.Collectors; @@ -528,13 +539,12 @@ public IndexRequest documentIndexRequest(IndexQuery query, IndexCoordinates i Object queryObject = query.getObject(); if (queryObject != null) { - String id = StringUtils.hasText(query.getId()) ? query.getId() : getPersistentEntityId(queryObject); - builder // - .id(id) // + builder + .id(StringUtils.hasText(query.getId()) ? query.getId() : getPersistentEntityId(queryObject)) .document(elasticsearchConverter.mapObject(queryObject)); } else if (query.getSource() != null) { - builder // - .id(query.getId()) // + builder + .id(query.getId()) .document(new DefaultStringObjectMap<>().fromJson(query.getSource())); } else { throw new InvalidDataAccessApiUsageException( @@ -580,12 +590,13 @@ private IndexOperation bulkIndexOperation(IndexQuery query, IndexCoordinates Object queryObject = query.getObject(); if (queryObject != null) { - String id = StringUtils.hasText(query.getId()) ? query.getId() : getPersistentEntityId(queryObject); - builder // - .id(id) // + builder + .id(StringUtils.hasText(query.getId()) ? query.getId() : getPersistentEntityId(queryObject)) .document(elasticsearchConverter.mapObject(queryObject)); } else if (query.getSource() != null) { - builder.document(new DefaultStringObjectMap<>().fromJson(query.getSource())); + builder + .id(query.getId()) + .document(new DefaultStringObjectMap<>().fromJson(query.getSource())); } else { throw new InvalidDataAccessApiUsageException( "object or source is null, failed to index the document [id: " + query.getId() + ']'); @@ -621,12 +632,13 @@ private CreateOperation bulkCreateOperation(IndexQuery query, IndexCoordinate Object queryObject = query.getObject(); if (queryObject != null) { - String id = StringUtils.hasText(query.getId()) ? query.getId() : getPersistentEntityId(queryObject); - builder // - .id(id) // + builder + .id(StringUtils.hasText(query.getId()) ? query.getId() : getPersistentEntityId(queryObject)) .document(elasticsearchConverter.mapObject(queryObject)); } else if (query.getSource() != null) { - builder.document(new DefaultStringObjectMap<>().fromJson(query.getSource())); + builder + .id(query.getId()) + .document(new DefaultStringObjectMap<>().fromJson(query.getSource())); } else { throw new InvalidDataAccessApiUsageException( "object or source is null, failed to index the document [id: " + query.getId() + ']'); @@ -988,7 +1000,7 @@ public DeleteByQueryRequest documentDeleteByQueryRequest(Query query, @Nullable .docAsUpsert(query.getDocAsUpsert()) // .ifSeqNo(query.getIfSeqNo() != null ? Long.valueOf(query.getIfSeqNo()) : null) // .ifPrimaryTerm(query.getIfPrimaryTerm() != null ? Long.valueOf(query.getIfPrimaryTerm()) : null) // - .refresh(refresh(refreshPolicy)) // + .refresh(query.getRefreshPolicy() != null ? refresh(query.getRefreshPolicy()) : refresh(refreshPolicy)) // .retryOnConflict(query.getRetryOnConflict()) // ; @@ -1175,10 +1187,9 @@ public MsearchRequest searchMsearchRequest( } if (!isEmpty(query.getFields())) { - bb.fields(fb -> { - query.getFields().forEach(fb::field); - return fb; - }); + var fieldAndFormats = query.getFields().stream() + .map(field -> FieldAndFormat.of(b -> b.field(field))).toList(); + bb.fields(fieldAndFormats); } if (!isEmpty(query.getStoredFields())) { @@ -1208,8 +1219,7 @@ public MsearchRequest searchMsearchRequest( } if (!isEmpty(query.getSearchAfter())) { - bb.searchAfter(query.getSearchAfter().stream().map(it -> FieldValue.of(it.toString())) - .collect(Collectors.toList())); + bb.searchAfter(query.getSearchAfter().stream().map(TypeUtils::toFieldValue).toList()); } query.getRescorerQueries().forEach(rescorerQuery -> bb.rescore(getRescore(rescorerQuery))); @@ -1233,11 +1243,9 @@ public MsearchRequest searchMsearchRequest( } if (!isEmpty(query.getIndicesBoost())) { - Map boosts = new LinkedHashMap<>(); - query.getIndicesBoost() - .forEach(indexBoost -> boosts.put(indexBoost.getIndexName(), (double) indexBoost.getBoost())); - // noinspection unchecked - bb.indicesBoost(boosts); + bb.indicesBoost(query.getIndicesBoost().stream() + .map(indexBoost -> Map.of(indexBoost.getIndexName(), Double.valueOf(indexBoost.getBoost()))) + .collect(Collectors.toList())); } query.getScriptedFields().forEach(scriptedField -> bb.scriptFields(scriptedField.getFieldName(), @@ -1313,10 +1321,9 @@ private void prepareSearchRequest(Query query, @Nullable String routing, @Nu } if (!isEmpty(query.getFields())) { - builder.fields(fb -> { - query.getFields().forEach(fb::field); - return fb; - }); + var fieldAndFormats = query.getFields().stream() + .map(field -> FieldAndFormat.of(b -> b.field(field))).toList(); + builder.fields(fieldAndFormats); } if (!isEmpty(query.getStoredFields())) { @@ -1335,14 +1342,6 @@ private void prepareSearchRequest(Query query, @Nullable String routing, @Nu builder.minScore((double) query.getMinScore()); } - if (query.getSort() != null) { - List sortOptions = getSortOptions(query.getSort(), persistentEntity); - - if (!sortOptions.isEmpty()) { - builder.sort(sortOptions); - } - } - addHighlight(query, builder); query.getScriptedFields().forEach(scriptedField -> builder.scriptFields(scriptedField.getFieldName(), @@ -1351,6 +1350,15 @@ private void prepareSearchRequest(Query query, @Nullable String routing, @Nu if (query instanceof NativeQuery) { prepareNativeSearch((NativeQuery) query, builder); } + // query.getSort() must be checked after prepareNativeSearch as this already might hav a sort set that must have + // higher priority + if (query.getSort() != null) { + List sortOptions = getSortOptions(query.getSort(), persistentEntity); + + if (!sortOptions.isEmpty()) { + builder.sort(sortOptions); + } + } if (query.getTrackTotalHits() != null) { // logic from the RHLC, choose between -1 and Integer.MAX_VALUE @@ -1365,8 +1373,7 @@ private void prepareSearchRequest(Query query, @Nullable String routing, @Nu } if (!isEmpty(query.getSearchAfter())) { - builder.searchAfter( - query.getSearchAfter().stream().map(it -> FieldValue.of(it.toString())).collect(Collectors.toList())); + builder.searchAfter(query.getSearchAfter().stream().map(TypeUtils::toFieldValue).toList()); } query.getRescorerQueries().forEach(rescorerQuery -> builder.rescore(getRescore(rescorerQuery))); @@ -1399,11 +1406,9 @@ private void prepareSearchRequest(Query query, @Nullable String routing, @Nu } if (!isEmpty(query.getIndicesBoost())) { - Map boosts = new LinkedHashMap<>(); - query.getIndicesBoost() - .forEach(indexBoost -> boosts.put(indexBoost.getIndexName(), (double) indexBoost.getBoost())); - // noinspection unchecked - builder.indicesBoost(boosts); + builder.indicesBoost(query.getIndicesBoost().stream() + .map(indexBoost -> Map.of(indexBoost.getIndexName(), Double.valueOf(indexBoost.getBoost()))) + .collect(Collectors.toList())); } if (!isEmpty(query.getDocValueFields())) { @@ -1477,8 +1482,9 @@ private SortOptions getSortOptions(Sort.Order order, @Nullable ElasticsearchPers return SortOptions.of(so -> so // .geoDistance(gd -> gd // .field(fieldName) // - .location(loc -> loc.latlon(Queries.latLon(geoDistanceOrder.getGeoPoint())))// + .location(loc -> loc.latlon(Queries.latLon(geoDistanceOrder.getGeoPoint()))) // .distanceType(geoDistanceType(geoDistanceOrder.getDistanceType())).mode(sortMode(finalMode)) // + .order(sortOrder(geoDistanceOrder.getDirection())) // .unit(distanceUnit(geoDistanceOrder.getUnit())) // .ignoreUnmapped(geoDistanceOrder.getIgnoreUnmapped()))); } else { @@ -1537,8 +1543,11 @@ private void prepareNativeSearch(NativeQuery query, MultisearchBody.Builder buil builder // .suggest(query.getSuggester()) // .collapse(query.getFieldCollapse()) // - .sort(query.getSortOptions()) // - .knn(query.getKnnQuery()); + .sort(query.getSortOptions()); + + if (query.getKnnQuery() != null) { + builder.knn(query.getKnnQuery()); + } if (!isEmpty(query.getAggregations())) { builder.aggregations(query.getAggregations()); @@ -1585,8 +1594,13 @@ private void addFilter(Query query, SearchRequest.Builder builder) { CriteriaFilterProcessor.createQuery(((CriteriaQuery) query).getCriteria()).ifPresent(builder::postFilter); } else if (query instanceof StringQuery) { // no filter for StringQuery - } else if (query instanceof NativeQuery) { - builder.postFilter(((NativeQuery) query).getFilter()); + } else if (query instanceof NativeQuery nativeQuery) { + + if (nativeQuery.getFilter() != null) { + builder.postFilter(nativeQuery.getFilter()); + } else if (nativeQuery.getSpringDataQuery() != null) { + addFilter(nativeQuery.getSpringDataQuery(), builder); + } } else { throw new IllegalArgumentException("unhandled Query implementation " + query.getClass().getName()); } 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 11bd0fefa6..bb91ab2f8a 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-2023 the original author or authors. + * 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. 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 18f7b7907e..ad84054bac 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-2023 the original author or authors. + * 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. @@ -219,7 +219,8 @@ private static PhraseSuggestion getPhraseSuggestion(String name, List options = new ArrayList<>(); phraseSuggestOptions.forEach(optionES -> options - .add(new PhraseSuggestion.Entry.Option(optionES.text(), optionES.highlighted(), null, null))); + .add(new PhraseSuggestion.Entry.Option(optionES.text(), optionES.highlighted(), optionES.score(), + optionES.collateMatch()))); entries.add(new PhraseSuggestion.Entry(phraseSuggest.text(), phraseSuggest.offset(), phraseSuggest.length(), options, null)); }); 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 ba2ae1c5dc..c4727e2306 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-2023 the original author or authors. + * Copyright 2022-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. @@ -18,8 +18,15 @@ import co.elastic.clients.elasticsearch._types.*; import co.elastic.clients.elasticsearch._types.mapping.FieldType; import co.elastic.clients.elasticsearch._types.mapping.TypeMapping; -import co.elastic.clients.elasticsearch.core.search.*; +import co.elastic.clients.elasticsearch.core.search.BoundaryScanner; +import co.elastic.clients.elasticsearch.core.search.HighlighterEncoder; +import co.elastic.clients.elasticsearch.core.search.HighlighterFragmenter; +import co.elastic.clients.elasticsearch.core.search.HighlighterOrder; +import co.elastic.clients.elasticsearch.core.search.HighlighterTagsSchema; +import co.elastic.clients.elasticsearch.core.search.HighlighterType; +import co.elastic.clients.elasticsearch.core.search.ScoreMode; import co.elastic.clients.elasticsearch.indices.IndexSettings; +import co.elastic.clients.json.JsonData; import java.io.StringReader; import java.time.Duration; @@ -28,10 +35,16 @@ import java.util.Map; import java.util.stream.Collectors; +import org.springframework.data.domain.Sort; import org.springframework.data.elasticsearch.core.RefreshPolicy; import org.springframework.data.elasticsearch.core.document.Document; -import org.springframework.data.elasticsearch.core.query.*; +import org.springframework.data.elasticsearch.core.query.GeoDistanceOrder; +import org.springframework.data.elasticsearch.core.query.IndexQuery; import org.springframework.data.elasticsearch.core.query.IndicesOptions; +import org.springframework.data.elasticsearch.core.query.Order; +import org.springframework.data.elasticsearch.core.query.Query; +import org.springframework.data.elasticsearch.core.query.RescorerQuery; +import org.springframework.data.elasticsearch.core.query.UpdateResponse; import org.springframework.data.elasticsearch.core.reindex.ReindexRequest; import org.springframework.lang.Nullable; @@ -155,6 +168,40 @@ static Object toObject(@Nullable FieldValue fieldValue) { } } + @Nullable + static FieldValue toFieldValue(@Nullable Object fieldValue) { + + if (fieldValue == null) { + return FieldValue.NULL; + } + + if (fieldValue instanceof Boolean b) { + return b ? FieldValue.TRUE : FieldValue.FALSE; + } + + if (fieldValue instanceof String s) { + return FieldValue.of(s); + } + + if (fieldValue instanceof Long l) { + return FieldValue.of(l); + } + + if (fieldValue instanceof Integer i) { + return FieldValue.of((long) i); + } + + if (fieldValue instanceof Double d) { + return FieldValue.of(d); + } + + if (fieldValue instanceof Float f) { + return FieldValue.of((double) f); + } + + return FieldValue.of(JsonData.of(fieldValue)); + } + @Nullable static GeoDistanceType geoDistanceType(GeoDistanceOrder.DistanceType distanceType) { @@ -165,6 +212,20 @@ static GeoDistanceType geoDistanceType(GeoDistanceOrder.DistanceType distanceTyp } + @Nullable + static SortOrder sortOrder(@Nullable Sort.Direction direction) { + + if (direction == null) { + return null; + } + + return switch (direction) { + case ASC -> SortOrder.Asc; + case DESC -> SortOrder.Desc; + }; + + } + @Nullable static HighlighterFragmenter highlighterFragmenter(@Nullable String value) { 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 48a5be5aa2..bbaf17c924 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 the original author or authors. + * Copyright 2023-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. 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 ab8646f0a9..2b9dc4c08a 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-2023 the original author or authors. + * Copyright 2022-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. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/AbstractElasticsearchConfiguration.java b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/AbstractElasticsearchConfiguration.java index 2a32f48fd0..25a2d3cdc2 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/AbstractElasticsearchConfiguration.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/AbstractElasticsearchConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2023 the original author or authors. + * Copyright 2018-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. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/AbstractReactiveElasticsearchConfiguration.java b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/AbstractReactiveElasticsearchConfiguration.java index 053f8815b6..1ff466838f 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/AbstractReactiveElasticsearchConfiguration.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/AbstractReactiveElasticsearchConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2023 the original author or authors. + * Copyright 2018-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. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/CriteriaFilterProcessor.java b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/CriteriaFilterProcessor.java index b867a287d4..e445b21dbd 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/CriteriaFilterProcessor.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/CriteriaFilterProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2023 the original author or authors. + * Copyright 2013-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. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/CriteriaQueryProcessor.java b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/CriteriaQueryProcessor.java index bd001c2677..2a2d89eb0a 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/CriteriaQueryProcessor.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/CriteriaQueryProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2023 the original author or authors. + * Copyright 2013-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. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/DefaultClusterOperations.java b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/DefaultClusterOperations.java index dfe2fc2146..20fbc65c83 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/DefaultClusterOperations.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/DefaultClusterOperations.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2023 the original author or authors. + * 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. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/DefaultReactiveClusterOperations.java b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/DefaultReactiveClusterOperations.java index 8852719ad6..78f8738957 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/DefaultReactiveClusterOperations.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/DefaultReactiveClusterOperations.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2023 the original author or authors. + * 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. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/DefaultReactiveElasticsearchClient.java b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/DefaultReactiveElasticsearchClient.java index fab8252ebf..13dc1996c9 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/DefaultReactiveElasticsearchClient.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/DefaultReactiveElasticsearchClient.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2023 the original author or authors. + * Copyright 2018-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. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/DefaultRequestCreator.java b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/DefaultRequestCreator.java index f7e151bce6..a202441e5c 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/DefaultRequestCreator.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/DefaultRequestCreator.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2023 the original author or authors. + * 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. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/DefaultWebClientProvider.java b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/DefaultWebClientProvider.java index 0a7518a057..50e4fb3c62 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/DefaultWebClientProvider.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/DefaultWebClientProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2023 the original author or authors. + * Copyright 2018-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. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/DocumentAdapters.java b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/DocumentAdapters.java index 443a0ce3ca..69f392ec72 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/DocumentAdapters.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/DocumentAdapters.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2023 the original author or authors. + * Copyright 2019-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. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/ElasticsearchAggregation.java b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/ElasticsearchAggregation.java index e86d6204c6..10ba6bc2e4 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/ElasticsearchAggregation.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/ElasticsearchAggregation.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2023 the original author or authors. + * 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. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/ElasticsearchAggregations.java b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/ElasticsearchAggregations.java index da4c4f0481..10dc41bc42 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/ElasticsearchAggregations.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/ElasticsearchAggregations.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2023 the original author or authors. + * 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. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/ElasticsearchClusterOperations.java b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/ElasticsearchClusterOperations.java index 229df5f604..e9b69a1bd4 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/ElasticsearchClusterOperations.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/ElasticsearchClusterOperations.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2023 the original author or authors. + * 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. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/ElasticsearchExceptionTranslator.java b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/ElasticsearchExceptionTranslator.java index 1940d0aade..2911e967b6 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/ElasticsearchExceptionTranslator.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/ElasticsearchExceptionTranslator.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2023 the original author or authors. + * Copyright 2018-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. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/ElasticsearchRestTemplate.java b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/ElasticsearchRestTemplate.java index 327d69f988..f21abb7158 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/ElasticsearchRestTemplate.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/ElasticsearchRestTemplate.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2023 the original author or authors. + * Copyright 2013-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. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/HighlightQueryBuilder.java b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/HighlightQueryBuilder.java index b7b73c4e05..8bf9734b6c 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/HighlightQueryBuilder.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/HighlightQueryBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2020-2023 the original author or authors. + * Copyright 2020-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. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/HostProvider.java b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/HostProvider.java index b936b28f34..4a0d7b6a71 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/HostProvider.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/HostProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2023 the original author or authors. + * Copyright 2018-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. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/MultiNodeHostProvider.java b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/MultiNodeHostProvider.java index 43b5535388..94c25b9a2a 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/MultiNodeHostProvider.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/MultiNodeHostProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2023 the original author or authors. + * Copyright 2018-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. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/NamedXContents.java b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/NamedXContents.java index dd6ca7ed04..8a7e1c788c 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/NamedXContents.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/NamedXContents.java @@ -1,5 +1,5 @@ /* - * Copyright 2020-2023 the original author or authors. + * Copyright 2020-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. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/NativeSearchQuery.java b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/NativeSearchQuery.java index 9fedd80cf9..844a5f92e6 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/NativeSearchQuery.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/NativeSearchQuery.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2023 the original author or authors. + * Copyright 2013-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. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/NativeSearchQueryBuilder.java b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/NativeSearchQueryBuilder.java index 3bbe3447cf..5929cd2bd8 100755 --- a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/NativeSearchQueryBuilder.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/NativeSearchQueryBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2023 the original author or authors. + * Copyright 2013-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. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/RawActionResponse.java b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/RawActionResponse.java index 57ece9e92b..7d044b254c 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/RawActionResponse.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/RawActionResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2023 the original author or authors. + * Copyright 2018-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. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/ReactiveElasticsearchClient.java b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/ReactiveElasticsearchClient.java index 3cee16c2f6..36c10cf998 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/ReactiveElasticsearchClient.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/ReactiveElasticsearchClient.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2023 the original author or authors. + * Copyright 2018-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. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/ReactiveElasticsearchTemplate.java b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/ReactiveElasticsearchTemplate.java index d297379934..6bf0a7c779 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/ReactiveElasticsearchTemplate.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/ReactiveElasticsearchTemplate.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2023 the original author or authors. + * Copyright 2018-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. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/ReactiveIndexTemplate.java b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/ReactiveIndexTemplate.java index c44bfffdac..889d9514a7 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/ReactiveIndexTemplate.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/ReactiveIndexTemplate.java @@ -1,5 +1,5 @@ /* - * Copyright 2020-2023 the original author or authors. + * Copyright 2020-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. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/ReactiveRestClients.java b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/ReactiveRestClients.java index e7752ed18d..d7c848c61d 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/ReactiveRestClients.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/ReactiveRestClients.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2023 the original author or authors. + * Copyright 2018-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. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/RequestBodyEncodingException.java b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/RequestBodyEncodingException.java index 48f9d12a5b..c1578c0b80 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/RequestBodyEncodingException.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/RequestBodyEncodingException.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2023 the original author or authors. + * Copyright 2018-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. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/RequestConverters.java b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/RequestConverters.java index 6f7d6eabe4..e8542a40ad 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/RequestConverters.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/RequestConverters.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2023 the original author or authors. + * Copyright 2018-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. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/RequestCreator.java b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/RequestCreator.java index 5a3837661d..9312e607a9 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/RequestCreator.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/RequestCreator.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2023 the original author or authors. + * 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. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/RequestFactory.java b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/RequestFactory.java index 1e29f0b6c8..9ba62f280c 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/RequestFactory.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/RequestFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2023 the original author or authors. + * Copyright 2019-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. @@ -348,8 +348,8 @@ public PutIndexTemplateRequest putIndexTemplateRequest(PutTemplateRequest putTem for (String aliasName : parametersAliases) { Alias alias = new Alias(aliasName); - //noinspection DuplicatedCode - if (parameters.getRouting() != null) { + // noinspection DuplicatedCode + if (parameters.getRouting() != null) { alias.routing(parameters.getRouting()); } @@ -526,7 +526,8 @@ public org.elasticsearch.index.reindex.ReindexRequest reindexRequest(ReindexRequ // endregion // region delete - public DeleteByQueryRequest deleteByQueryRequest(Query query, @Nullable String routing, Class clazz, IndexCoordinates index) { + public DeleteByQueryRequest deleteByQueryRequest(Query query, @Nullable String routing, Class clazz, + IndexCoordinates index) { SearchRequest searchRequest = searchRequest(query, routing, clazz, index); DeleteByQueryRequest deleteByQueryRequest = new DeleteByQueryRequest(index.getIndexNames()) // .setQuery(searchRequest.source().query()) // @@ -754,10 +755,11 @@ public SearchRequest searchRequest(SuggestBuilder suggestion, IndexCoordinates i return searchRequest; } - public SearchRequest searchRequest(Query query, @Nullable String routing, @Nullable Class clazz, IndexCoordinates index) { + public SearchRequest searchRequest(Query query, @Nullable String routing, @Nullable Class clazz, + IndexCoordinates index) { elasticsearchConverter.updateQuery(query, clazz); - SearchRequest searchRequest = prepareSearchRequest(query, routing,clazz, index); + SearchRequest searchRequest = prepareSearchRequest(query, routing, clazz, index); QueryBuilder elasticsearchQuery = getQuery(query); QueryBuilder elasticsearchFilter = getFilter(query); @@ -771,7 +773,8 @@ public SearchRequest searchRequest(Query query, @Nullable String routing, @Nulla } - private SearchRequest prepareSearchRequest(Query query, @Nullable String routing, @Nullable Class clazz, IndexCoordinates indexCoordinates) { + private SearchRequest prepareSearchRequest(Query query, @Nullable String routing, @Nullable Class clazz, + IndexCoordinates indexCoordinates) { String[] indexNames = indexCoordinates.getIndexNames(); Assert.notNull(indexNames, "No index defined for Query"); @@ -968,6 +971,8 @@ private SortBuilder getSortBuilder(Sort.Order order, @Nullable ElasticsearchP sort.ignoreUnmapped(geoDistanceOrder.getIgnoreUnmapped()); } + sort.order(order.isAscending() ? SortOrder.ASC : SortOrder.DESC); + return sort; } else { FieldSortBuilder sort = SortBuilders // diff --git a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/ResponseConverter.java b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/ResponseConverter.java index 81a514a155..a7f04efbff 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/ResponseConverter.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/ResponseConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2023 the original author or authors. + * 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. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/RestClients.java b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/RestClients.java index 61bd3f4a3c..cacadbc16e 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/RestClients.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/RestClients.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2023 the original author or authors. + * Copyright 2018-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. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/RestHighLevelClientBeanDefinitionParser.java b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/RestHighLevelClientBeanDefinitionParser.java index f50993bd0d..ad96e87039 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/RestHighLevelClientBeanDefinitionParser.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/RestHighLevelClientBeanDefinitionParser.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2023 the original author or authors. + * Copyright 2018-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. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/RestHighLevelClientFactoryBean.java b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/RestHighLevelClientFactoryBean.java index 9b1dfa59ae..79560a7795 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/RestHighLevelClientFactoryBean.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/RestHighLevelClientFactoryBean.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2023 the original author or authors. + * Copyright 2018-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. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/RestIndexTemplate.java b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/RestIndexTemplate.java index b9a309003e..7f5a96e61e 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/RestIndexTemplate.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/RestIndexTemplate.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2023 the original author or authors. + * Copyright 2019-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. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/ScriptField.java b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/ScriptField.java index ebb27b04db..384a1c0c91 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/ScriptField.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/ScriptField.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2023 the original author or authors. + * 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. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/SearchDocumentResponseBuilder.java b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/SearchDocumentResponseBuilder.java index 22156ecd4e..788ed4b65c 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/SearchDocumentResponseBuilder.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/SearchDocumentResponseBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 the original author or authors. + * Copyright 2022-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. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/SearchHitsUtil.java b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/SearchHitsUtil.java index c82479e668..22d649f7e0 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/SearchHitsUtil.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/SearchHitsUtil.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2023 the original author or authors. + * Copyright 2019-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. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/SingleNodeHostProvider.java b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/SingleNodeHostProvider.java index 3678057756..e46442428d 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/SingleNodeHostProvider.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/SingleNodeHostProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2023 the original author or authors. + * Copyright 2018-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. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/WebClientProvider.java b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/WebClientProvider.java index e8ce2f66a5..3a356059bd 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/WebClientProvider.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/WebClientProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2023 the original author or authors. + * Copyright 2018-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. diff --git a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/package-info.java b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/package-info.java index 5fa79bdc30..37ed488fc6 100644 --- a/src/main/java/org/springframework/data/elasticsearch/client/erhlc/package-info.java +++ b/src/main/java/org/springframework/data/elasticsearch/client/erhlc/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 the original author or authors. + * Copyright 2022-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. 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 c4ed1f942a..ddb7151ce0 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-2023 the original author or authors. + * Copyright 2020-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. 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 838f1b7a6d..a730003aef 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-2023 the original author or authors. + * Copyright 2020-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. 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 dc0ca6d63d..018079155c 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-2023 the original author or authors. + * Copyright 2020-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. 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 064a9a65af..c210a192f1 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-2023 the original author or authors. + * Copyright 2018-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. 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 1dbc8fe87d..9cc4ea4618 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-2023 the original author or authors. + * Copyright 2013-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. 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 7b4825bfb1..0290025aea 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-2023 the original author or authors. + * Copyright 2020-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. 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 0646637c74..e5cbaea27b 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-2023 the original author or authors. + * Copyright 2020-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. 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 7b24d5b819..5a87309869 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-2023 the original author or authors. + * Copyright 2020-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. 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 7abb4d33e4..cecb2fe742 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-2023 the original author or authors. + * Copyright 2020-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. 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 7ff8d6f48b..198cce4f7f 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-2023 the original author or authors. + * Copyright 2019-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. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/AbstractIndexTemplate.java b/src/main/java/org/springframework/data/elasticsearch/core/AbstractIndexTemplate.java index ad863e5551..4ad4bda7f9 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/AbstractIndexTemplate.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/AbstractIndexTemplate.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2023 the original author or authors. + * Copyright 2019-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. 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 0a77504c83..6a54f0ec15 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-2023 the original author or authors. + * 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. @@ -225,42 +225,42 @@ public Flux save(Flux entities, IndexCoordinates index, int bulkSize) return Flux.defer(() -> { Sinks.Many sink = Sinks.many().unicast().onBackpressureBuffer(); - entities // - .bufferTimeout(bulkSize, Duration.ofMillis(200)) // - .subscribe(new Subscriber>() { - private Subscription subscription; - private AtomicBoolean upstreamComplete = new AtomicBoolean(false); - - @Override - public void onSubscribe(Subscription subscription) { - this.subscription = subscription; - subscription.request(1); - } - - @Override - public void onNext(List entityList) { - saveAll(entityList, index) // - .map(sink::tryEmitNext) // - .doOnComplete(() -> { - if (!upstreamComplete.get()) { - subscription.request(1); - } else { - sink.tryEmitComplete(); - } - }).subscribe(); - } - - @Override - public void onError(Throwable throwable) { - subscription.cancel(); - sink.tryEmitError(throwable); - } - - @Override - public void onComplete() { - upstreamComplete.set(true); - } - }); + entities.window(bulkSize) // + .concatMap(flux -> flux.collectList()) // + .subscribe(new Subscriber>() { + private Subscription subscription; + private AtomicBoolean upstreamComplete = new AtomicBoolean(false); + + @Override + public void onSubscribe(Subscription subscription) { + this.subscription = subscription; + subscription.request(1); + } + + @Override + public void onNext(List entityList) { + saveAll(entityList, index) // + .map(sink::tryEmitNext) // + .doOnComplete(() -> { + if (!upstreamComplete.get()) { + subscription.request(1); + } else { + sink.tryEmitComplete(); + } + }).subscribe(); + } + + @Override + public void onError(Throwable throwable) { + subscription.cancel(); + sink.tryEmitError(throwable); + } + + @Override + public void onComplete() { + upstreamComplete.set(true); + } + }); return sink.asFlux(); }); @@ -748,6 +748,12 @@ public ElasticsearchPersistentEntity getPersistentEntityFor(@Nullable Class getClusterVersion(); + @Nullable + public String getEntityRouting(Object entity) { + return entityOperations.forEntity(entity, converter.getConversionService(), routingResolver) + .getRouting(); + } + /** * Value class to capture client independent information from a response to an index request. */ 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 359c69b436..4751c9322d 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-2023 the original author or authors. + * 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. 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 fc33d5e8e4..fa35a78d8b 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-2023 the original author or authors. + * 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. 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 7e2ad40c8b..e6e3d0d731 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-2023 the original author or authors. + * 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. 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 a51bc911b4..04e147007b 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-2023 the original author or authors. + * Copyright 2019-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. 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 1624c66e19..78f6f25881 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-2023 the original author or authors. + * Copyright 2013-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. 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 fdf701c7c0..78b8cb1c09 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-2023 the original author or authors. + * Copyright 2018-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. 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 d27703f15a..f6ed2269a8 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-2023 the original author or authors. + * 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. 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 4caa3c68bb..d09fb3861f 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-2023 the original author or authors. + * Copyright 2019-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. 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 1c7d95f4dd..1b4e34ad9e 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-2023 the original author or authors. + * Copyright 2020-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. 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 b06ace378b..827ea83acf 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-2023 the original author or authors. + * 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. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/Range.java b/src/main/java/org/springframework/data/elasticsearch/core/Range.java index bb3959ced0..3b943f9122 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/Range.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/Range.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2023 the original author or authors. + * 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. 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 65aec898db..5aef1bc2f5 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-2023 the original author or authors. + * Copyright 2019-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. 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 8cc95a8253..2a7f678271 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-2023 the original author or authors. + * Copyright 2018-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. @@ -117,6 +117,17 @@ public interface ReactiveElasticsearchOperations ReactiveClusterOperations cluster(); // region routing + /** + * gets the routing for an entity. + * + * @param entity the entity + * @return the routing, may be null if not set. + * @since 5.2 + */ + @Nullable + String getEntityRouting(Object entity); + + // region customizations /** * Returns a copy of this instance with the same configuration, but that uses a different {@link RoutingResolver} to * obtain routing information. 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 ad5d219514..a4cc50c222 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-2023 the original author or authors. + * Copyright 2020-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. 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 66cf014f1e..56671cd059 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-2023 the original author or authors. + * Copyright 2020-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. 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 60af99c9cf..f8d84b7434 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-2023 the original author or authors. + * 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. 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 94d536296a..d382cc0e77 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-2023 the original author or authors. + * 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. 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 c84a83c57c..84c25d776e 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-2023 the original author or authors. + * 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. 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 2b44d2aa15..3a71cdfa50 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-2023 the original author or authors. + * Copyright 2019-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. 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 5d6a059250..5112dd14b5 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-2023 the original author or authors. + * Copyright 2020-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. 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 dd2c5f4d55..83184645bd 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-2023 the original author or authors. + * Copyright 2019-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. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/RuntimeField.java b/src/main/java/org/springframework/data/elasticsearch/core/RuntimeField.java index a2302e7c5e..9dd232f1ce 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/RuntimeField.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/RuntimeField.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2023 the original author or authors. + * 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. diff --git a/src/main/java/org/springframework/data/elasticsearch/core/ScriptType.java b/src/main/java/org/springframework/data/elasticsearch/core/ScriptType.java index f10f72d5bc..8ec21f980e 100644 --- a/src/main/java/org/springframework/data/elasticsearch/core/ScriptType.java +++ b/src/main/java/org/springframework/data/elasticsearch/core/ScriptType.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2023 the original author or authors. + * 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. 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 caf4d63b71..a811d6f093 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-2023 the original author or authors. + * Copyright 2019-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. 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 8c5d176581..b2ac50cce2 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-2023 the original author or authors. + * Copyright 2020-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. 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 b6fa455c7f..18a553ce0c 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-2023 the original author or authors. + * Copyright 2019-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. 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 9356808798..bb29ab8559 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-2023 the original author or authors. + * Copyright 2020-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. 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 e80f1e3c76..a63a1a24d5 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-2023 the original author or authors. + * Copyright 2019-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. 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 3f92a2157e..5246903f4a 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-2023 the original author or authors. + * Copyright 2020-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. 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 7a9c29a803..606cbd85a5 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-2023 the original author or authors. + * Copyright 2019-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. 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 76f54ddad4..fd07115aa0 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-2023 the original author or authors. + * Copyright 2020-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. 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 fefdddd4d0..463ddf6b55 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-2023 the original author or authors. + * Copyright 2020-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. 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 d414099f0f..d1603dc976 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-2023 the original author or authors. + * Copyright 2019-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. 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 b3fb9cff20..c82520223b 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-2023 the original author or authors. + * Copyright 2020-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. 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 e30e55248e..8d79e1df4b 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-2023 the original author or authors. + * 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. 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 ff7ba80550..aa535d76ad 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-2023 the original author or authors. + * 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. 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 03108f6297..279a4be763 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-2023 the original author or authors. + * 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. 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 3bc05849d4..08f8b52d8a 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-2023 the original author or authors. + * 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. 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 64660d2ad5..fb05f4cb35 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-2023 the original author or authors. + * 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. @@ -32,9 +32,19 @@ public abstract class AbstractRangePropertyValueConverter extends AbstractPro protected static final String LTE_FIELD = "lte"; protected static final String GT_FIELD = "gt"; protected static final String GTE_FIELD = "gte"; + private final Class genericType; - public AbstractRangePropertyValueConverter(PersistentProperty property) { + /** + * @param property the property this convertrer belongs to + * @param genericType the generic type of the Range + */ + public AbstractRangePropertyValueConverter(PersistentProperty property, Class genericType) { super(property); + this.genericType = genericType; + } + + public Class getGenericType() { + return genericType; } @Override @@ -117,10 +127,6 @@ public Object write(Object value) { protected abstract String format(T value); - protected Class getGenericType() { - return getProperty().getTypeInformation().getTypeArguments().get(0).getType(); - } - protected abstract T parse(String value); } 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 13f640c402..a626fbbe97 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-2023 the original author or authors. + * Copyright 2019-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. 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 7f742e1c3a..c163b31cd0 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-2023 the original author or authors. + * 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. 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 bc35e8cae7..0af0cfa78f 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-2023 the original author or authors. + * 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. 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 32989a015d..11c84f3ee0 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-2023 the original author or authors. + * 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. @@ -33,9 +33,9 @@ public class DateRangePropertyValueConverter extends AbstractRangePropertyValueC private final List dateConverters; public DateRangePropertyValueConverter(PersistentProperty property, - List dateConverters) { + Class genericType, List dateConverters) { - super(property); + super(property, genericType); this.dateConverters = dateConverters; } 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 35365b8d28..a2ab473c25 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-2023 the original author or authors. + * Copyright 2019-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. 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 0fa49f0352..323253a7f5 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-2023 the original author or authors. + * Copyright 2013-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. 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 dbf197f69f..1e36cbadc0 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-2023 the original author or authors. + * Copyright 2018-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. 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 e0d8acf6a3..4545871dc8 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-2023 the original author or authors. + * Copyright 2019-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. 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 3de9df6254..331c6ac1c1 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-2023 the original author or authors. + * Copyright 2019-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. 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 1156de1b1c..33c1059f29 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-2023 the original author or authors. + * Copyright 2019-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. 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 47e55867fa..003fa9fd96 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-2023 the original author or authors. + * Copyright 2013-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. @@ -919,7 +919,7 @@ private List writeCollectionInternal(Collection source, @Nullable Typ Class elementType = element == null ? null : element.getClass(); - if (elementType == null || conversions.isSimpleType(elementType)) { + if (elementType == null || isSimpleType(elementType)) { collection.add(getPotentiallyConvertedSimpleWrite(element, componentType != null ? componentType.getType() : Object.class)); } else if (element instanceof Collection || elementType.isArray()) { 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 4f9df40c69..412efc6cf8 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-2023 the original author or authors. + * 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. @@ -23,8 +23,12 @@ */ public class NumberRangePropertyValueConverter extends AbstractRangePropertyValueConverter { - public NumberRangePropertyValueConverter(PersistentProperty property) { - super(property); + /** + * @param property the property this convertrer belongs to + * @param genericType the generic type of the Range + */ + public NumberRangePropertyValueConverter(PersistentProperty property, Class genericType) { + super(property, genericType); } @Override 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 5bcc88d84a..079f036ea6 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-2023 the original author or authors. + * 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. 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 d1cdaa154d..b0d9cc853e 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-2023 the original author or authors. + * 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. @@ -34,9 +34,9 @@ public class TemporalRangePropertyValueConverter extends AbstractRangePropertyVa private final List dateConverters; public TemporalRangePropertyValueConverter(PersistentProperty property, - List dateConverters) { + Class genericType, List dateConverters) { - super(property); + super(property, genericType); Assert.notEmpty(dateConverters, "dateConverters must not be empty."); this.dateConverters = dateConverters; 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 8ea130ac68..d365e9cb2c 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-2023 the original author or authors. + * Copyright 2019-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. 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 c8ca1cfea6..15d9fa55c3 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-2023 the original author or authors. + * 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. 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 2041a37871..522e26c2cf 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-2023 the original author or authors. + * Copyright 2019-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. 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 e835f14aba..46cfd1ef85 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-2023 the original author or authors. + * Copyright 2020-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. 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 0dc459e91d..4e22d45b3d 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-2023 the original author or authors. + * Copyright 2019-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. 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 faf06e95e3..557667504b 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-2023 the original author or authors. + * 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. 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 adac6231e0..8fa304a11e 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-2023 the original author or authors. + * Copyright 2019-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. 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 06c009e9ce..27ce209d09 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-2023 the original author or authors. + * Copyright 2020-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. 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 7827a30128..bae1adec6c 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-2023 the original author or authors. + * 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. 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 542cee3e91..361b8ab176 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-2023 the original author or authors. + * Copyright 2020-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. 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 1dc73c2eb4..f42bdcd6ae 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-2023 the original author or authors. + * Copyright 2020-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. 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 6f0f3d19b1..e08c920907 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-2023 the original author or authors. + * Copyright 2020-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. 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 57382c33d4..309b116c71 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-2023 the original author or authors. + * Copyright 2020-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. 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 fe716d9362..a0ee6784fd 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-2023 the original author or authors. + * 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. 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 cfd6fde952..bfcbe2eca3 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-2023 the original author or authors. + * Copyright 2020-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. 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 3bdec2eac9..bc2f9d752a 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-2023 the original author or authors. + * Copyright 2020-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. 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 1f9928fe3b..cfc12503cd 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-2023 the original author or authors. + * Copyright 2020-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. 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 030c8f3d11..27200b0ec3 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-2023 the original author or authors. + * Copyright 2013-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. 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 a400ff710f..2f9b6f3f46 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-2023 the original author or authors. + * Copyright 2015-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. 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 256498a27f..6bb232e4ca 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-2023 the original author or authors. + * Copyright 2015-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. 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 abb942d46e..56ce8c1276 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-2023 the original author or authors. + * Copyright 2020-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. 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 d6f255bf0d..7be2ab9a6f 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-2023 the original author or authors. + * Copyright 2015-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. 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 56f5334886..06e2a72012 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-2023 the original author or authors. + * Copyright 2015-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. 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 3158a27973..e7aee528f3 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-2023 the original author or authors. + * Copyright 2015-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. 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 2b855273f8..33e34460a9 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-2023 the original author or authors. + * Copyright 2015-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. 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 7b7a7d190e..bb873d4e74 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-2023 the original author or authors. + * Copyright 2015-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. 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 96609bbf05..57a5a01560 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-2023 the original author or authors. + * Copyright 2013-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. 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 b373acefd1..2269e13d37 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-2023 the original author or authors. + * Copyright 2020-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. 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 b8af9906a9..9db8473d20 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-2023 the original author or authors. + * Copyright 2020-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. 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 2a18b46555..7270244f3d 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-2023 the original author or authors. + * Copyright 2020-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. 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 4a43686e28..924deb691e 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-2023 the original author or authors. + * Copyright 2020-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. 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 ca0ab6d411..47fa323d4c 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 the original author or authors. + * Copyright 2023-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. 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 a1d4b94a98..c586f16a49 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 the original author or authors. + * Copyright 2023-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. 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 866e60c975..71545fd969 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 the original author or authors. + * Copyright 2023-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. 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 9341148153..5b89f442f2 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-2023 the original author or authors. + * Copyright 2020-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. 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 fee29bf7f9..134a739eb5 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 the original author or authors. + * Copyright 2023-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. 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 f20dbfa1e1..0933be08f7 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 the original author or authors. + * Copyright 2023-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. 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 7bd99e21af..b13c2457aa 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-2023 the original author or authors. + * Copyright 2020-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. 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 04136442d2..d175caef10 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-2023 the original author or authors. + * Copyright 2020-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. 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 a737c38ffe..4c9efe49c3 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 the original author or authors. + * Copyright 2023-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. 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 08fb51bd63..0217dc2bf9 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 the original author or authors. + * Copyright 2023-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. 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 59d343be93..c9de016252 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-2023 the original author or authors. + * Copyright 2020-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. 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 6a3cddc536..f6e235997a 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-2023 the original author or authors. + * Copyright 2014-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. 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 fcd15ebe08..bf8e4aa46f 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-2023 the original author or authors. + * Copyright 2019-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. @@ -332,6 +332,8 @@ public void writeTypeAndParametersTo(ObjectNode objectNode) throws IOException { if (!Similarity.Default.equals(similarity)) { objectNode.put(FIELD_PARAM_SIMILARITY, similarity); + // similarity must have index explicitly set, otherwise Elasticsearch returns an error + objectNode.put(FIELD_PARAM_INDEX, index); } if (termVector != TermVector.none) { 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 8fdbf409c3..5693e668b1 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 the original author or authors. + * Copyright 2023-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. 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 0783c050db..01c3a77d17 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 the original author or authors. + * Copyright 2023-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. 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 fa4e0d455e..f010a50a64 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-2023 the original author or authors. + * Copyright 2020-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. 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 47f1aa35c1..983cfcb2c2 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-2023 the original author or authors. + * 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. 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 dfe73c4933..e3b096e07e 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-2023 the original author or authors. + * 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. 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 eb45bf608e..bc780f41dc 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-2023 the original author or authors. + * Copyright 2020-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. 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 0ed58e4f76..8a942d427b 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 the original author or authors. + * Copyright 2023-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. 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 925a6f59c0..e90ade22fa 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 the original author or authors. + * Copyright 2023-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. 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 08faa94a3b..2b1832b27d 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-2023 the original author or authors. + * Copyright 2020-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. 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 c8a03d8b0f..d09dbbedae 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-2023 the original author or authors. + * Copyright 2013-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. 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 e8aa672db5..33df161b28 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-2023 the original author or authors. + * Copyright 2013-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. 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 472af4f611..3d03f178f3 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-2023 the original author or authors. + * Copyright 2019-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. 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 97a6716970..25333ca3b2 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-2023 the original author or authors. + * Copyright 2019-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. 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 fe3d937162..bf23033189 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-2023 the original author or authors. + * Copyright 2019-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. 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 13f2472343..79ab431387 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-2023 the original author or authors. + * Copyright 2019-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. 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 a09cd08dc6..2564a51efb 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-2023 the original author or authors. + * Copyright 2013-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. 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 396f379afb..d62a072be7 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-2023 the original author or authors. + * Copyright 2013-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. 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 f63b734d42..a8e2a491bc 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-2023 the original author or authors. + * Copyright 2013-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. @@ -20,6 +20,7 @@ import java.util.Arrays; import java.util.Date; import java.util.List; +import java.util.function.Supplier; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -56,6 +57,7 @@ import org.springframework.data.mapping.model.Property; import org.springframework.data.mapping.model.PropertyNameFieldNamingStrategy; import org.springframework.data.mapping.model.SimpleTypeHolder; +import org.springframework.data.util.TypeInformation; import org.springframework.lang.Nullable; import org.springframework.util.StringUtils; @@ -168,6 +170,18 @@ private void initPropertyValueConverter() { return; } + Supplier> getGenericType = () -> { + TypeInformation typeInformation = getTypeInformation(); + + if (typeInformation.isCollectionLike()) { + // we have a collection of Range + typeInformation = typeInformation.getComponentType(); + } + + Class genericType = typeInformation.getTypeArguments().get(0).getType(); + return genericType; + }; + switch (field.type()) { case Date: case Date_Nanos: { @@ -197,11 +211,11 @@ private void initPropertyValueConverter() { return; } - Class genericType = getTypeInformation().getTypeArguments().get(0).getType(); + var genericType = getGenericType.get(); if (TemporalAccessor.class.isAssignableFrom(genericType)) { - propertyValueConverter = new TemporalRangePropertyValueConverter(this, dateConverters); + propertyValueConverter = new TemporalRangePropertyValueConverter(this, genericType, dateConverters); } else if (Date.class.isAssignableFrom(genericType)) { - propertyValueConverter = new DateRangePropertyValueConverter(this, dateConverters); + propertyValueConverter = new DateRangePropertyValueConverter(this, genericType, dateConverters); } else { LOGGER.warn( String.format("Unsupported generic type '{%s' for date range property '%s'.", genericType, getName())); @@ -216,7 +230,7 @@ private void initPropertyValueConverter() { return; } - Class genericType = getTypeInformation().getTypeArguments().get(0).getType(); + var genericType = getGenericType.get(); if ((field.type() == FieldType.Integer_Range && !Integer.class.isAssignableFrom(genericType)) || (field.type() == FieldType.Float_Range && !Float.class.isAssignableFrom(genericType)) || (field.type() == FieldType.Long_Range && !Long.class.isAssignableFrom(genericType)) @@ -226,7 +240,7 @@ private void initPropertyValueConverter() { return; } - propertyValueConverter = new NumberRangePropertyValueConverter(this); + propertyValueConverter = new NumberRangePropertyValueConverter(this, genericType); break; } case Ip_Range: { 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 832150a02a..59b86e04e1 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-2023 the original author or authors. + * Copyright 2013-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. @@ -74,7 +74,7 @@ public class BaseQuery implements Query { protected List rescorerQueries = new ArrayList<>(); @Nullable protected Boolean requestCache; protected List idsWithRouting = Collections.emptyList(); - protected final List runtimeFields = new ArrayList<>(); + protected List runtimeFields = new ArrayList<>(); @Nullable protected PointInTime pointInTime; private boolean queryIsUpdatedByConverter = false; @Nullable private Integer reactiveBatchSize = null; @@ -117,6 +117,7 @@ public > BaseQuery(BaseQue this.expandWildcards = builder.getExpandWildcards(); this.docValueFields = builder.getDocValueFields(); this.scriptedFields = builder.getScriptedFields(); + this.runtimeFields = builder.getRuntimeFields(); } /** 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 c6b0e8d025..04fa2b0078 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-2023 the original author or authors. + * Copyright 2022-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. 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 c696705a10..41837acbb1 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-2023 the original author or authors. + * Copyright 2019-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. 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 ed4368f0ff..84db334b46 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-2023 the original author or authors. + * 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. 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 0fab5c5e92..f93aae0811 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-2023 the original author or authors. + * Copyright 2013-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. 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 3b09c70758..86afa20503 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-2023 the original author or authors. + * Copyright 2013-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. 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 bc820ff719..fd67cc3bed 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-2023 the original author or authors. + * Copyright 2022-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. 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 71ad09e9e7..84be12c43b 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 the original author or authors. + * Copyright 2023-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. 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 18b79a1f72..748762da1c 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-2023 the original author or authors. + * Copyright 2016-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. 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 e6a1666210..501f380046 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-2023 the original author or authors. + * Copyright 2016-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. 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 321b8e2f47..eb20dec05d 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-2023 the original author or authors. + * Copyright 2013-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. 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 2c06c7ad98..d047dc1bf7 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-2023 the original author or authors. + * Copyright 2020-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. 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 0bc6e2a4bb..379a972134 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-2023 the original author or authors. + * Copyright 2020-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. 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 587198afd8..7888cde2f4 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-2023 the original author or authors. + * Copyright 2016-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. 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 89d7938aca..29c7b3ad4b 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-2023 the original author or authors. + * Copyright 2013-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. 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 68b2df4690..43720b85a6 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-2023 the original author or authors. + * Copyright 2014-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. 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 30980329e6..2e8474f59c 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-2023 the original author or authors. + * 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. 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 da1f2761da..4bc503b7ae 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-2023 the original author or authors. + * Copyright 2013-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. 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 6c5fbdff54..4bcf1be5f7 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-2023 the original author or authors. + * 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. 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 d2fec076d3..6f3153f9fd 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-2023 the original author or authors. + * Copyright 2013-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. 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 0071479740..791582626c 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-2023 the original author or authors. + * 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. 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 045265b69a..03c0916103 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-2023 the original author or authors. + * Copyright 2022-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. 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 ffa31762a9..ab28358aee 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-2023 the original author or authors. + * Copyright 2022-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. 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 7403877ee1..9255461fb3 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-2023 the original author or authors. + * Copyright 2022-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. 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 3665e1bb66..a2b55fa8be 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-2023 the original author or authors. + * Copyright 2022-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. 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 d034e2b352..d47b074054 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-2023 the original author or authors. + * Copyright 2020-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. 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 c151275876..a0cad3961c 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-2023 the original author or authors. + * Copyright 2013-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. 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 7351244389..286a8da801 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-2023 the original author or authors. + * Copyright 2016-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. 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 803a346a1a..e5a07d0f83 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-2023 the original author or authors. + * Copyright 2013-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. 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 e19ccaf1e3..90e40de43f 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-2023 the original author or authors. + * Copyright 2022-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. 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 777a4c7931..78ae0f7aa4 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-2023 the original author or authors. + * Copyright 2013-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. 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 14531af801..e35ff82e8d 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-2023 the original author or authors. + * Copyright 2020-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. 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 97f6eb5c49..104a725a95 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-2023 the original author or authors. + * 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. 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 6261fb1de8..a54127248f 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-2023 the original author or authors. + * 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. 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 9b5f21f2bc..1b8cf0d990 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-2023 the original author or authors. + * 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. 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 6b06b9068b..0e7103d102 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-2023 the original author or authors. + * 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. 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 453e5489fa..4878182989 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-2023 the original author or authors. + * 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. 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 627f01b901..5e4366ac41 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-2023 the original author or authors. + * 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. 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 9d36a4539f..b3582639ea 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-2023 the original author or authors. + * Copyright 2022-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. 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 3fd65cdacc..baa7e9d217 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-2023 the original author or authors. + * Copyright 2022-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. 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 4a7388475b..82ff011d1e 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-2023 the original author or authors. + * Copyright 2022-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. 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 58a52387a4..2939a43505 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-2023 the original author or authors. + * Copyright 2022-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. 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 b7a538348f..b5bdb560e4 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-2023 the original author or authors. + * Copyright 2022-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. 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 e8e6c9a9e4..185fcc1347 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-2023 the original author or authors. + * Copyright 2022-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. 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 19c0c3f131..918c2bf3ed 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-2023 the original author or authors. + * 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. 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 06274cb14e..a5e6b99f60 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-2023 the original author or authors. + * 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. 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 ff57cd5670..6f9c05934c 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-2023 the original author or authors. + * 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. 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 c38ec154c0..e437ec05c7 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-2023 the original author or authors. + * 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. 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 1b6bab7ebf..f377bb365a 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-2023 the original author or authors. + * 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. 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 0af01b0e5b..03cec7b150 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-2023 the original author or authors. + * 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. 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 03e6ebe7ef..b2aef3f22a 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-2023 the original author or authors. + * 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. 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 01e55ea103..86f8ccd0df 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-2023 the original author or authors. + * Copyright 2013-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. 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 d152c3d341..15ecdd3b98 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-2023 the original author or authors. + * Copyright 2019-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. 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 8de8ca0098..35b8caf27f 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 the original author or authors. + * Copyright 2023-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. 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 ed5e831ca5..255ed2dc1b 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-2023 the original author or authors. + * Copyright 2013-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. 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 7a329f632e..7bc97fa726 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-2023 the original author or authors. + * Copyright 2013-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. 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 2273855637..5f1d2f5841 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-2023 the original author or authors. + * Copyright 2013-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. 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 fa7b429ce0..a30137ca9e 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-2023 the original author or authors. + * Copyright 2013-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. 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 240559a3ba..8109e8a717 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-2023 the original author or authors. + * Copyright 2013-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. 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 de99afc698..b56b27470a 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-2023 the original author or authors. + * Copyright 2019-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. 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 601edbbd24..d834115f05 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-2023 the original author or authors. + * Copyright 2019-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. 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 afa141e7d5..5079290a40 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-2023 the original author or authors. + * Copyright 2019-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. 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 2c417e9efb..64355aad89 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-2023 the original author or authors. + * Copyright 2013-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. 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 1bd7f652c0..c98e5dd59b 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-2023 the original author or authors. + * Copyright 2019-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. 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 d8e074d70e..2b6c9b4280 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-2023 the original author or authors. + * Copyright 2019-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. 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 88328c0c88..3b01e97057 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-2023 the original author or authors. + * Copyright 2019-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. 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 78503880a4..73abc1b561 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-2023 the original author or authors. + * Copyright 2019-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. 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 d7107c51a0..27f2619750 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-2023 the original author or authors. + * Copyright 2019-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. 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 72cb292dea..2fee079668 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-2023 the original author or authors. + * Copyright 2013-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. 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 bad23c8a7f..9fdfe9c8a6 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-2023 the original author or authors. + * Copyright 2013-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. 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 581e963621..e26b28ad9a 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-2023 the original author or authors. + * Copyright 2013-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. 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 d43073dc19..5b72cf21b5 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-2023 the original author or authors. + * Copyright 2019-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. 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 3566c6e298..dab654c601 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-2023 the original author or authors. + * Copyright 2019-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. 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 1c03d0b148..44319483ea 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-2023 the original author or authors. + * Copyright 2019-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. 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 9df6435149..6ac03a8cec 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-2023 the original author or authors. + * Copyright 2019-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. 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 0e77d72711..254bc54ae2 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-2023 the original author or authors. + * Copyright 2019-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. 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 65b3a0b113..3ba461f122 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-2023 the original author or authors. + * Copyright 2019-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. 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 c8079922b6..3505da5093 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-2023 the original author or authors. + * Copyright 2013-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. 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 77e1d98859..58d30d919e 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-2023 the original author or authors. + * Copyright 2013-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. 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 af53315524..151699db8a 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-2023 the original author or authors. + * Copyright 2013-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. 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 12fedba921..122770bc98 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-2023 the original author or authors. + * Copyright 2013-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. 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 a8e56c0530..7b5f82771f 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-2023 the original author or authors. + * Copyright 2013-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. 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 ce28b8a126..87d7f7bec6 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-2023 the original author or authors. + * Copyright 2013-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. 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 c43b3637ff..5f1a8e4416 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-2023 the original author or authors. + * Copyright 2020-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. 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 e6b85cb04b..6d106ab5c6 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-2023 the original author or authors. + * Copyright 2013-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. 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 226f2e2c90..e3f31093cd 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-2023 the original author or authors. + * Copyright 2019-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. 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 72421b9132..de810586f4 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-2023 the original author or authors. + * Copyright 2019-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. 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 9b063ce426..2950975473 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-2023 the original author or authors. + * Copyright 2020-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. 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 763929e351..40f07461cc 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-2023 the original author or authors. + * Copyright 2013-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. @@ -39,6 +39,7 @@ import org.springframework.data.elasticsearch.core.query.BaseQuery; import org.springframework.data.elasticsearch.core.query.MoreLikeThisQuery; import org.springframework.data.elasticsearch.core.query.Query; +import org.springframework.data.elasticsearch.core.routing.RoutingResolver; import org.springframework.data.elasticsearch.repository.ElasticsearchRepository; import org.springframework.data.util.StreamUtils; import org.springframework.data.util.Streamable; @@ -223,7 +224,7 @@ public void deleteById(ID id) { Assert.notNull(id, "Cannot delete entity with id 'null'."); - doDelete(id, getIndexCoordinates()); + doDelete(id, null, getIndexCoordinates()); } @Override @@ -231,7 +232,7 @@ public void delete(T entity) { Assert.notNull(entity, "Cannot delete 'null' entity."); - doDelete(extractIdFromBean(entity), getIndexCoordinates()); + doDelete(extractIdFromBean(entity), operations.getEntityRouting(entity), getIndexCoordinates()); } @Override @@ -271,10 +272,14 @@ public void deleteAll(Iterable entities) { deleteAllById(ids); } - private void doDelete(@Nullable ID id, IndexCoordinates indexCoordinates) { + private void doDelete(@Nullable ID id, @Nullable String routing, IndexCoordinates indexCoordinates) { if (id != null) { - executeAndRefresh(operations -> operations.delete(stringIdRepresentation(id), indexCoordinates)); + executeAndRefresh(operations -> { + var ops = routing != null ? operations.withRouting(RoutingResolver.just(routing)) : operations; + // noinspection DataFlowIssue + return ops.delete(stringIdRepresentation(id), indexCoordinates); + }); } } 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 b0279e4cfe..78c784be76 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-2023 the original author or authors. + * Copyright 2019-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. @@ -31,6 +31,7 @@ import org.springframework.data.elasticsearch.core.mapping.IndexCoordinates; import org.springframework.data.elasticsearch.core.query.BaseQuery; import org.springframework.data.elasticsearch.core.query.Query; +import org.springframework.data.elasticsearch.core.routing.RoutingResolver; import org.springframework.data.elasticsearch.repository.ReactiveElasticsearchRepository; import org.springframework.util.Assert; @@ -196,7 +197,10 @@ public Mono deleteById(Publisher id) { public Mono delete(T entity) { Assert.notNull(entity, "Entity must not be null!"); - return operations.delete(entity, entityInformation.getIndexCoordinates()) // + + var routing = operations.getEntityRouting(entity); + var ops = routing != null ? operations.withRouting(RoutingResolver.just(routing)) : operations; + return ops.delete(entity, entityInformation.getIndexCoordinates()) // .then(doRefresh()); } diff --git a/src/main/java/org/springframework/data/elasticsearch/repository/support/StringQueryUtil.java b/src/main/java/org/springframework/data/elasticsearch/repository/support/StringQueryUtil.java index e2301754f8..489a9450c8 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/support/StringQueryUtil.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/support/StringQueryUtil.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2023 the original author or authors. + * 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. 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 45ad8d0ba1..91332e4080 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 the original author or authors. + * Copyright 2023-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. 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 c64c8faf32..9001a888c5 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 the original author or authors. + * Copyright 2023-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. 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 37eade7b3d..1dffcf85dc 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 the original author or authors. + * Copyright 2023-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. 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 ba8f56ed46..568ff151dc 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-2023 the original author or authors. + * 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. 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 3bac853ba0..22c4729e07 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-2023 the original author or authors. + * 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. 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 8dedf0d6b5..61f01e5d81 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-2023 the original author or authors. + * Copyright 2022-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. 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 680970a253..d52090d2c6 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-2023 the original author or authors. + * 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. 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 566cbbc4de..ecf92303e7 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-2023 the original author or authors. + * 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. 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 5761982bb4..a4506e5040 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-2023 the original author or authors. + * 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. 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 6ecc716096..5d9255ff01 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-2023 the original author or authors. + * Copyright 2020-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. diff --git a/src/main/resources/notice.txt b/src/main/resources/notice.txt index cafc1f9892..f6efff8383 100644 --- a/src/main/resources/notice.txt +++ b/src/main/resources/notice.txt @@ -1,4 +1,4 @@ -Spring Data Elasticsearch 5.1 GA (2023.0.0) +Spring Data Elasticsearch 5.1.12 (2023.0.12) Copyright (c) [2013-2022] Pivotal Software, Inc. This product is licensed to you under the Apache License, Version 2.0 (the "License"). @@ -13,3 +13,15 @@ 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 73305d7363..8db87b0d64 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-2023 the original author or authors. + * Copyright 2018-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/DocumentUnitTests.java b/src/test/java/org/springframework/data/elasticsearch/DocumentUnitTests.java index 0c2fd9fc49..279cb7467f 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-2023 the original author or authors. + * Copyright 2019-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/ELCQueries.java b/src/test/java/org/springframework/data/elasticsearch/ELCQueries.java index 8824271d7c..aa776ccc34 100644 --- a/src/test/java/org/springframework/data/elasticsearch/ELCQueries.java +++ b/src/test/java/org/springframework/data/elasticsearch/ELCQueries.java @@ -1,5 +1,5 @@ /* -// * Copyright 2022-2023 the original author or authors. +// * Copyright 2022-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/JUnit5ClusterConnectionTests.java b/src/test/java/org/springframework/data/elasticsearch/JUnit5ClusterConnectionTests.java index 2a17ad218c..72433075c7 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-2023 the original author or authors. + * Copyright 2019-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/JUnit5SampleElasticsearchTemplateTests.java b/src/test/java/org/springframework/data/elasticsearch/JUnit5SampleElasticsearchTemplateTests.java index e152685091..b48148fd3a 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-2023 the original author or authors. + * 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. diff --git a/src/test/java/org/springframework/data/elasticsearch/JUnit5SampleReactiveELCTests.java b/src/test/java/org/springframework/data/elasticsearch/JUnit5SampleReactiveELCTests.java index 5008eb3e57..53c6e5b7e2 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-2023 the original author or authors. + * 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. diff --git a/src/test/java/org/springframework/data/elasticsearch/JUnit5SampleReactiveERHLCTests.java b/src/test/java/org/springframework/data/elasticsearch/JUnit5SampleReactiveERHLCTests.java index 01cbc75141..bd90b1c626 100644 --- a/src/test/java/org/springframework/data/elasticsearch/JUnit5SampleReactiveERHLCTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/JUnit5SampleReactiveERHLCTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2020-2023 the original author or authors. + * Copyright 2020-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/JUnit5SampleRestTemplateTests.java b/src/test/java/org/springframework/data/elasticsearch/JUnit5SampleRestTemplateTests.java index da81dd26a3..ea85cab126 100644 --- a/src/test/java/org/springframework/data/elasticsearch/JUnit5SampleRestTemplateTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/JUnit5SampleRestTemplateTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2023 the original author or authors. + * Copyright 2019-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/NestedObjectELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/NestedObjectELCIntegrationTests.java index 9353999725..3c29d8d3d6 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-2023 the original author or authors. + * Copyright 2022-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/NestedObjectERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/NestedObjectERHLCIntegrationTests.java index 45f13a0c86..a8a49793a2 100644 --- a/src/test/java/org/springframework/data/elasticsearch/NestedObjectERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/NestedObjectERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 the original author or authors. + * Copyright 2022-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/NestedObjectIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/NestedObjectIntegrationTests.java index 7594bb23a6..72c63ab98b 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-2023 the original author or authors. + * Copyright 2013-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/NewElasticsearchClientDevelopment.java b/src/test/java/org/springframework/data/elasticsearch/NewElasticsearchClientDevelopment.java index 4b8a43d090..23c1264175 100644 --- a/src/test/java/org/springframework/data/elasticsearch/NewElasticsearchClientDevelopment.java +++ b/src/test/java/org/springframework/data/elasticsearch/NewElasticsearchClientDevelopment.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2023 the original author or authors. + * 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. 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 e1647bcbb4..70aa904bce 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-2023 the original author or authors. + * Copyright 2020-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/blockhound/BlockHoundIntegrationCustomizer.java b/src/test/java/org/springframework/data/elasticsearch/blockhound/BlockHoundIntegrationCustomizer.java index 0c20785124..a475720caf 100644 --- a/src/test/java/org/springframework/data/elasticsearch/blockhound/BlockHoundIntegrationCustomizer.java +++ b/src/test/java/org/springframework/data/elasticsearch/blockhound/BlockHoundIntegrationCustomizer.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2023 the original author or authors. + * 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. diff --git a/src/test/java/org/springframework/data/elasticsearch/blockhound/BlockHoundTests.java b/src/test/java/org/springframework/data/elasticsearch/blockhound/BlockHoundTests.java index dd99d735dc..2e10327d45 100644 --- a/src/test/java/org/springframework/data/elasticsearch/blockhound/BlockHoundTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/blockhound/BlockHoundTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2023 the original author or authors. + * 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. 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 0a35453e69..9e04a926ea 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-2023 the original author or authors. + * Copyright 2018-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. 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 f138ffa077..8e3a56c86d 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-2023 the original author or authors. + * Copyright 2018-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. 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 51ddd00538..2889b859db 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-2023 the original author or authors. + * Copyright 2019-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. 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 18d632320c..83ae05750c 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-2023 the original author or authors. + * 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. 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 adb51c257b..092aed4f14 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-2023 the original author or authors. + * Copyright 2019-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. 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 7307fdb098..45ce2ee924 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-2023 the original author or authors. + * Copyright 2020-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. 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 49a7d8c04f..bcb707cc23 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-2023 the original author or authors. + * 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. 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 37f800ad83..cb0af89f8e 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-2023 the original author or authors. + * 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. 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 new file mode 100644 index 0000000000..c397f9044e --- /dev/null +++ b/src/test/java/org/springframework/data/elasticsearch/client/elc/ELCWiremockTests.java @@ -0,0 +1,140 @@ +/* + * Copyright 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.client.elc; + +import static com.github.tomakehurst.wiremock.client.WireMock.*; +import static com.github.tomakehurst.wiremock.core.WireMockConfiguration.*; + +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.junit.jupiter.api.extension.RegisterExtension; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Configuration; +import org.springframework.data.annotation.Id; +import org.springframework.data.elasticsearch.annotations.Document; +import org.springframework.data.elasticsearch.annotations.Field; +import org.springframework.data.elasticsearch.client.ClientConfiguration; +import org.springframework.data.elasticsearch.core.ElasticsearchOperations; +import org.springframework.lang.Nullable; +import org.springframework.test.context.junit.jupiter.SpringExtension; + +import com.github.tomakehurst.wiremock.junit5.WireMockExtension; + +/** + * Tests that need to check the data produced by the Elasticsearch client + * @author Peter-Josef Meisch + */ +@ExtendWith(SpringExtension.class) +public class ELCWiremockTests { + + @RegisterExtension static WireMockExtension wireMock = WireMockExtension.newInstance() + .options(wireMockConfig() + .dynamicPort() + // needed, otherwise Wiremock goes to test/resources/mappings + .usingFilesUnderDirectory("src/test/resources/wiremock-mappings")) + .build(); + + @Configuration + static class Config extends ElasticsearchConfiguration { + @Override + public ClientConfiguration clientConfiguration() { + return ClientConfiguration.builder() + .connectedTo("localhost:" + wireMock.getPort()) + .build(); + } + } + + @Autowired ElasticsearchOperations operations; + + @Test // #2839 + @DisplayName("should store null values if configured") + void shouldStoreNullValuesIfConfigured() { + + wireMock.stubFor(put(urlPathEqualTo("/null-fields/_doc/42")) + .withRequestBody(equalToJson(""" + { + "_class": "org.springframework.data.elasticsearch.client.elc.ELCWiremockTests$EntityWithNullFields", + "id": "42", + "field1": null + } + """)) + .willReturn( + aResponse() + .withStatus(200) + .withHeader("X-elastic-product", "Elasticsearch") + .withHeader("content-type", "application/vnd.elasticsearch+json;compatible-with=8") + .withBody(""" + { + "_index": "null-fields", + "_id": "42", + "_version": 1, + "result": "created", + "forced_refresh": true, + "_shards": { + "total": 2, + "successful": 1, + "failed": 0 + }, + "_seq_no": 1, + "_primary_term": 1 + } + """))); + + var entity = new EntityWithNullFields(); + entity.setId("42"); + + operations.save(entity); + // no need to assert anything, if the field1:null is not sent, we run into a 404 error + } + + @Document(indexName = "null-fields") + static class EntityWithNullFields { + @Nullable + @Id private String id; + @Nullable + @Field(storeNullValue = true) private String field1; + @Nullable + @Field private String field2; + + @Nullable + public String getId() { + return id; + } + + public void setId(@Nullable String id) { + this.id = id; + } + + @Nullable + public String getField1() { + return field1; + } + + public void setField1(@Nullable String field1) { + this.field1 = field1; + } + + @Nullable + public String getField2() { + return field2; + } + + public void setField2(@Nullable String field2) { + this.field2 = field2; + } + } +} 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 6fe225e94c..94a9136a7b 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-2023 the original author or authors. + * Copyright 2022-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. 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 3a63cb109b..d64c2aa91f 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-2023 the original author or authors. + * 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. 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 c20ab8da8f..a0f47305f7 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 the original author or authors. + * Copyright 2023-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. 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 new file mode 100644 index 0000000000..18581f8276 --- /dev/null +++ b/src/test/java/org/springframework/data/elasticsearch/client/elc/SearchDocumentResponseBuilderUnitTests.java @@ -0,0 +1,111 @@ +/* + * Copyright 2023-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.client.elc; + +import co.elastic.clients.elasticsearch.core.search.HitsMetadata; +import co.elastic.clients.elasticsearch.core.search.Suggestion; +import co.elastic.clients.elasticsearch.core.search.TotalHitsRelation; +import co.elastic.clients.json.jackson.JacksonJsonpMapper; + +import java.util.ArrayList; +import java.util.List; + +import org.assertj.core.api.SoftAssertions; +import org.json.JSONException; +import org.junit.jupiter.api.Test; +import org.springframework.data.elasticsearch.core.document.SearchDocumentResponse; + +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; + +/** + * Tests for the factory class to create {@link SearchDocumentResponse} instances. + * + * @author Sébastien Comeau + * @since 5.2 + */ +class SearchDocumentResponseBuilderUnitTests { + + private JacksonJsonpMapper jsonpMapper = new JacksonJsonpMapper(); + + @Test // #2681 + void shouldGetPhraseSuggestion() throws JSONException { + // arrange + final var hitsMetadata = new HitsMetadata.Builder() + .total(total -> total + .value(0) + .relation(TotalHitsRelation.Eq)) + .hits(new ArrayList<>()) + .build(); + + final var suggestionTest = new Suggestion.Builder() + .phrase(phrase -> phrase + .text("National") + .offset(0) + .length(8) + .options(option -> option + .text("nations") + .highlighted("highlighted-nations") + .score(0.11480146) + .collateMatch(false)) + .options(option -> option + .text("national") + .highlighted("highlighted-national") + .score(0.08063514) + .collateMatch(false))) + .build(); + + final var sortProperties = ImmutableMap.>> builder() + .put("suggestionTest", ImmutableList.of(suggestionTest)) + .build(); + + // act + final var actual = SearchDocumentResponseBuilder.from(hitsMetadata, null, null, null, sortProperties, null, + jsonpMapper); + + // assert + SoftAssertions softly = new SoftAssertions(); + + softly.assertThat(actual).isNotNull(); + softly.assertThat(actual.getSuggest()).isNotNull(); + softly.assertThat(actual.getSuggest().getSuggestions()).isNotNull().hasSize(1); + + final var actualSuggestion = actual.getSuggest().getSuggestions().get(0); + softly.assertThat(actualSuggestion.getName()).isEqualTo("suggestionTest"); + softly.assertThat(actualSuggestion.getEntries()).isNotNull().hasSize(1); + + final var actualEntry = actualSuggestion.getEntries().get(0); + softly.assertThat(actualEntry).isNotNull(); + softly.assertThat(actualEntry.getText()).isEqualTo("National"); + softly.assertThat(actualEntry.getOffset()).isEqualTo(0); + softly.assertThat(actualEntry.getLength()).isEqualTo(8); + softly.assertThat(actualEntry.getOptions()).isNotNull().hasSize(2); + + final var actualOption1 = actualEntry.getOptions().get(0); + softly.assertThat(actualOption1.getText()).isEqualTo("nations"); + softly.assertThat(actualOption1.getHighlighted()).isEqualTo("highlighted-nations"); + softly.assertThat(actualOption1.getScore()).isEqualTo(0.11480146); + softly.assertThat(actualOption1.getCollateMatch()).isEqualTo(false); + + final var actualOption2 = actualEntry.getOptions().get(1); + softly.assertThat(actualOption2.getText()).isEqualTo("national"); + softly.assertThat(actualOption2.getHighlighted()).isEqualTo("highlighted-national"); + softly.assertThat(actualOption2.getScore()).isEqualTo(0.08063514); + softly.assertThat(actualOption2.getCollateMatch()).isEqualTo(false); + + softly.assertAll(); + } +} diff --git a/src/test/java/org/springframework/data/elasticsearch/client/erhlc/CriteriaQueryMappingUnitTests.java b/src/test/java/org/springframework/data/elasticsearch/client/erhlc/CriteriaQueryMappingUnitTests.java index 305c72673b..f943209d31 100644 --- a/src/test/java/org/springframework/data/elasticsearch/client/erhlc/CriteriaQueryMappingUnitTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/client/erhlc/CriteriaQueryMappingUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2023 the original author or authors. + * Copyright 2019-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/client/erhlc/CriteriaQueryProcessorUnitTests.java b/src/test/java/org/springframework/data/elasticsearch/client/erhlc/CriteriaQueryProcessorUnitTests.java index 114387cf09..c0ef587fd6 100644 --- a/src/test/java/org/springframework/data/elasticsearch/client/erhlc/CriteriaQueryProcessorUnitTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/client/erhlc/CriteriaQueryProcessorUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2020-2023 the original author or authors. + * Copyright 2020-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/client/erhlc/DefaultReactiveElasticsearchClientTest.java b/src/test/java/org/springframework/data/elasticsearch/client/erhlc/DefaultReactiveElasticsearchClientTest.java index 11875c515f..8cccefc197 100644 --- a/src/test/java/org/springframework/data/elasticsearch/client/erhlc/DefaultReactiveElasticsearchClientTest.java +++ b/src/test/java/org/springframework/data/elasticsearch/client/erhlc/DefaultReactiveElasticsearchClientTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020-2023 the original author or authors. + * Copyright 2020-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/client/erhlc/DefaultWebClientProviderUnitTests.java b/src/test/java/org/springframework/data/elasticsearch/client/erhlc/DefaultWebClientProviderUnitTests.java index 9e701bc563..d71d698a7e 100644 --- a/src/test/java/org/springframework/data/elasticsearch/client/erhlc/DefaultWebClientProviderUnitTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/client/erhlc/DefaultWebClientProviderUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2023 the original author or authors. + * Copyright 2018-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/client/erhlc/ElasticsearchERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/client/erhlc/ElasticsearchERHLCIntegrationTests.java index 9a1466a1b1..cdf4598b5a 100644 --- a/src/test/java/org/springframework/data/elasticsearch/client/erhlc/ElasticsearchERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/client/erhlc/ElasticsearchERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2023 the original author or authors. + * Copyright 2014-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/client/erhlc/ElasticsearchExceptionTranslatorTests.java b/src/test/java/org/springframework/data/elasticsearch/client/erhlc/ElasticsearchExceptionTranslatorTests.java index f548af9db6..02a0922082 100644 --- a/src/test/java/org/springframework/data/elasticsearch/client/erhlc/ElasticsearchExceptionTranslatorTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/client/erhlc/ElasticsearchExceptionTranslatorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2020-2023 the original author or authors. + * Copyright 2020-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/client/erhlc/ElasticsearchPartQueryERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/client/erhlc/ElasticsearchPartQueryERHLCIntegrationTests.java index eff0f2bb41..0ffebffadb 100644 --- a/src/test/java/org/springframework/data/elasticsearch/client/erhlc/ElasticsearchPartQueryERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/client/erhlc/ElasticsearchPartQueryERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 the original author or authors. + * Copyright 2022-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/client/erhlc/MultiNodeHostProviderUnitTests.java b/src/test/java/org/springframework/data/elasticsearch/client/erhlc/MultiNodeHostProviderUnitTests.java index 79fd6a713a..e1b5a1ebcd 100644 --- a/src/test/java/org/springframework/data/elasticsearch/client/erhlc/MultiNodeHostProviderUnitTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/client/erhlc/MultiNodeHostProviderUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2023 the original author or authors. + * Copyright 2018-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/client/erhlc/ReactiveElasticsearchClientIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/client/erhlc/ReactiveElasticsearchClientIntegrationTests.java index 2c7732f945..316d4505aa 100644 --- a/src/test/java/org/springframework/data/elasticsearch/client/erhlc/ReactiveElasticsearchClientIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/client/erhlc/ReactiveElasticsearchClientIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2023 the original author or authors. + * Copyright 2018-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/client/erhlc/ReactiveElasticsearchClientUnitTests.java b/src/test/java/org/springframework/data/elasticsearch/client/erhlc/ReactiveElasticsearchClientUnitTests.java index 8505588cc7..435994dbe9 100644 --- a/src/test/java/org/springframework/data/elasticsearch/client/erhlc/ReactiveElasticsearchClientUnitTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/client/erhlc/ReactiveElasticsearchClientUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2023 the original author or authors. + * Copyright 2018-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/client/erhlc/ReactiveMockClientTestsUtils.java b/src/test/java/org/springframework/data/elasticsearch/client/erhlc/ReactiveMockClientTestsUtils.java index b4fc61b21b..1c64f1abc8 100644 --- a/src/test/java/org/springframework/data/elasticsearch/client/erhlc/ReactiveMockClientTestsUtils.java +++ b/src/test/java/org/springframework/data/elasticsearch/client/erhlc/ReactiveMockClientTestsUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2023 the original author or authors. + * Copyright 2018-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/client/erhlc/RequestConvertersTest.java b/src/test/java/org/springframework/data/elasticsearch/client/erhlc/RequestConvertersTest.java index a30398d693..cb4ffc51ad 100644 --- a/src/test/java/org/springframework/data/elasticsearch/client/erhlc/RequestConvertersTest.java +++ b/src/test/java/org/springframework/data/elasticsearch/client/erhlc/RequestConvertersTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2023 the original author or authors. + * Copyright 2018-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/client/erhlc/RequestFactoryTests.java b/src/test/java/org/springframework/data/elasticsearch/client/erhlc/RequestFactoryTests.java index ac6b23b6ed..48641aead0 100644 --- a/src/test/java/org/springframework/data/elasticsearch/client/erhlc/RequestFactoryTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/client/erhlc/RequestFactoryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2020-2023 the original author or authors. + * Copyright 2020-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/client/erhlc/SingleNodeHostProviderUnitTests.java b/src/test/java/org/springframework/data/elasticsearch/client/erhlc/SingleNodeHostProviderUnitTests.java index 8848f7d06f..7d4efd85a6 100644 --- a/src/test/java/org/springframework/data/elasticsearch/client/erhlc/SingleNodeHostProviderUnitTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/client/erhlc/SingleNodeHostProviderUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2023 the original author or authors. + * Copyright 2018-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. 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 5339419a6c..b6dc4719ec 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-2023 the original author or authors. + * Copyright 2020-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. 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 29df44ecd4..fca9ec464c 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-2023 the original author or authors. + * 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. diff --git a/src/test/java/org/springframework/data/elasticsearch/config/AuditingERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/config/AuditingERHLCIntegrationTests.java index 27537e09cb..9de06f4270 100644 --- a/src/test/java/org/springframework/data/elasticsearch/config/AuditingERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/config/AuditingERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2020-2023 the original author or authors. + * Copyright 2020-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. 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 6958e47dbf..0552cad34b 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-2023 the original author or authors. + * Copyright 2020-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. 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 c7b4084c67..8c0b2f509d 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-2023 the original author or authors. + * 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. diff --git a/src/test/java/org/springframework/data/elasticsearch/config/AuditingReactiveERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/config/AuditingReactiveERHLCIntegrationTests.java index 981183673a..1150b682a7 100644 --- a/src/test/java/org/springframework/data/elasticsearch/config/AuditingReactiveERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/config/AuditingReactiveERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2023 the original author or authors. + * 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. 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 028a87642a..cd6e477a0b 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-2023 the original author or authors. + * Copyright 2020-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. 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 b4a015aa8e..226afc603e 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-2023 the original author or authors. + * Copyright 2020-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. 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 a0f046ca8e..3cda4720ea 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-2023 the original author or authors. + * Copyright 2018-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. 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 bff694c154..38e8567ec5 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-2023 the original author or authors. + * 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. diff --git a/src/test/java/org/springframework/data/elasticsearch/config/configuration/ElasticsearchConfigurationERHLCTests.java b/src/test/java/org/springframework/data/elasticsearch/config/configuration/ElasticsearchConfigurationERHLCTests.java index eca4687d8f..d04c1ae07c 100644 --- a/src/test/java/org/springframework/data/elasticsearch/config/configuration/ElasticsearchConfigurationERHLCTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/config/configuration/ElasticsearchConfigurationERHLCTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2023 the original author or authors. + * Copyright 2019-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. 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 7184be35fc..6b5a8d9e46 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-2023 the original author or authors. + * Copyright 2019-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/config/configuration/ReactiveElasticsearchConfigurationERHLCTests.java b/src/test/java/org/springframework/data/elasticsearch/config/configuration/ReactiveElasticsearchConfigurationERHLCTests.java index 4e67e58c1f..c7241848eb 100644 --- a/src/test/java/org/springframework/data/elasticsearch/config/configuration/ReactiveElasticsearchConfigurationERHLCTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/config/configuration/ReactiveElasticsearchConfigurationERHLCTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2023 the original author or authors. + * Copyright 2019-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. 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 c154b88536..1989a601a3 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-2023 the original author or authors. + * Copyright 2013-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. 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 e5655dc1c9..e546210d74 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-2023 the original author or authors. + * 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. diff --git a/src/test/java/org/springframework/data/elasticsearch/config/nested/EnableNestedRepositoriesERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/config/nested/EnableNestedRepositoriesERHLCIntegrationTests.java index 5a41431531..8c32b87037 100644 --- a/src/test/java/org/springframework/data/elasticsearch/config/nested/EnableNestedRepositoriesERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/config/nested/EnableNestedRepositoriesERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2023 the original author or authors. + * Copyright 2019-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. 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 1785a40bf7..31651a0cc5 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-2023 the original author or authors. + * Copyright 2015-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. 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 c9569be983..e83a6fd2f5 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-2023 the original author or authors. + * 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. diff --git a/src/test/java/org/springframework/data/elasticsearch/config/notnested/EnableRepositoriesERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/config/notnested/EnableRepositoriesERHLCIntegrationTests.java index 07980520f0..55ca52b0cc 100644 --- a/src/test/java/org/springframework/data/elasticsearch/config/notnested/EnableRepositoriesERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/config/notnested/EnableRepositoriesERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2020-2023 the original author or authors. + * Copyright 2020-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. 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 d228be8b51..818c2aeb2b 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-2023 the original author or authors. + * Copyright 2013-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. 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 60cd657a50..87241dadf1 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-2023 the original author or authors. + * Copyright 2013-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. 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 a4d33aedc5..ae95501dd9 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-2023 the original author or authors. + * Copyright 2018-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. 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 a373afcd65..9985b854ab 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-2023 the original author or authors. + * Copyright 2022-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. 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 d5f659a268..ade24250af 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-2023 the original author or authors. + * Copyright 2014-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/ElasticsearchRestTemplateCallbackTests.java b/src/test/java/org/springframework/data/elasticsearch/core/ElasticsearchRestTemplateCallbackTests.java index a91f57b114..3c7c6bfa43 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/ElasticsearchRestTemplateCallbackTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/ElasticsearchRestTemplateCallbackTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2020-2023 the original author or authors. + * Copyright 2020-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/ElasticsearchTemplateCallbackTests.java b/src/test/java/org/springframework/data/elasticsearch/core/ElasticsearchTemplateCallbackTests.java index 16c62b7278..02c1f9416e 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/ElasticsearchTemplateCallbackTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/ElasticsearchTemplateCallbackTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2020-2023 the original author or authors. + * Copyright 2020-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. 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 662493cb67..d16ce907b2 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-2023 the original author or authors. + * Copyright 2019-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. 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 82e27ecb83..c0219db262 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-2023 the original author or authors. + * Copyright 2020-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/InnerHitsERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/InnerHitsERHLCIntegrationTests.java index 022387c6f3..623ac993b8 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/InnerHitsERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/InnerHitsERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2020-2023 the original author or authors. + * Copyright 2020-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. 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 50a9dede02..8ea2991adc 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-2023 the original author or authors. + * Copyright 2020-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. 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 78223049de..186cf39dad 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-2023 the original author or authors. + * 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. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/LogEntityERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/LogEntityERHLCIntegrationTests.java index f0ceb33240..675daaac02 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/LogEntityERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/LogEntityERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2023 the original author or authors. + * Copyright 2019-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. 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 df006a05ec..10905363ee 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-2023 the original author or authors. + * Copyright 2014-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. 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 9ddf9f78c5..d74ab54725 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-2023 the original author or authors. +/* Copyright 2019-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. 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 f36913c3cc..3a3674dc4a 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-2023 the original author or authors. + * Copyright 2022-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/PointInTimeERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/PointInTimeERHLCIntegrationTests.java index b2bb1c166f..7c7e8fd4cb 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/PointInTimeERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/PointInTimeERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 the original author or authors. + * Copyright 2022-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. 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 2cba61f150..dff56565b1 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-2023 the original author or authors. + * Copyright 2022-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/RangeUnitTests.java b/src/test/java/org/springframework/data/elasticsearch/core/RangeUnitTests.java index e8ecebdb7a..3a99768eaa 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/RangeUnitTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/RangeUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2023 the original author or authors. + * 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. 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 127c23d6bb..548c87ac68 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-2023 the original author or authors. + * Copyright 2022-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. @@ -18,6 +18,7 @@ import static org.assertj.core.api.Assertions.*; import static org.springframework.data.elasticsearch.client.elc.Queries.*; +import co.elastic.clients.elasticsearch._types.SortOrder; import co.elastic.clients.elasticsearch._types.aggregations.Aggregate; import co.elastic.clients.elasticsearch._types.aggregations.Buckets; import co.elastic.clients.elasticsearch._types.aggregations.StringTermsAggregate; @@ -27,9 +28,12 @@ import java.util.List; import java.util.concurrent.atomic.AtomicInteger; +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.elasticsearch.client.elc.Aggregation; import org.springframework.data.elasticsearch.client.elc.ElasticsearchAggregation; import org.springframework.data.elasticsearch.client.elc.NativeQuery; @@ -48,6 +52,51 @@ @ContextConfiguration(classes = ReactiveElasticsearchELCIntegrationTests.Config.class) public class ReactiveElasticsearchELCIntegrationTests extends ReactiveElasticsearchIntegrationTests { + @Test // #2745 + @DisplayName("should use sort defined in native unbounded query") + void shouldUseSortDefinedInNativeUnboundedQuery() { + var entity1 = randomEntity(null); + entity1.setRate(7); + var entity2 = randomEntity(null); + entity2.setRate(5); + var entity3 = randomEntity(null); + entity3.setRate(11); + + operations.saveAll(List.of(entity1, entity2, entity3), SampleEntity.class).blockLast(); + + var query = NativeQuery.builder() + .withQuery(qb -> qb + .matchAll(m -> m)) + .withSort(sob -> sob + .field(f -> f + .field("rate") + .order(SortOrder.Asc))) + .withPageable(Pageable.unpaged()) + .build(); + + var rates = operations.search(query, SampleEntity.class) + .map(SearchHit::getContent) + .map(SampleEntity::getRate) + .collectList().block(); + assertThat(rates).containsExactly(5, 7, 11); + + query = NativeQuery.builder() + .withQuery(qb -> qb + .matchAll(m -> m)) + .withSort(sob -> sob + .field(f -> f + .field("rate") + .order(SortOrder.Desc))) + .withPageable(Pageable.unpaged()) + .build(); + + rates = operations.search(query, SampleEntity.class) + .map(SearchHit::getContent) + .map(SampleEntity::getRate) + .collectList().block(); + assertThat(rates).containsExactly(11, 7, 5); + } + @Configuration @Import({ ReactiveElasticsearchTemplateConfiguration.class }) static class Config { diff --git a/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchERHLCIntegrationTests.java index 8d08372550..c9c667e0db 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 the original author or authors. + * Copyright 2022-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. 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 80712d7b2e..4c1677768d 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-2023 the original author or authors. + * Copyright 2018-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. @@ -28,6 +28,7 @@ import java.lang.Integer; import java.lang.Long; import java.lang.Object; +import java.time.Duration; import java.time.LocalDate; import java.time.format.DateTimeFormatter; import java.util.ArrayList; @@ -98,7 +99,7 @@ @SpringIntegrationTest public abstract class ReactiveElasticsearchIntegrationTests { - @Autowired private ReactiveElasticsearchOperations operations; + @Autowired protected ReactiveElasticsearchOperations operations; @Autowired private IndexNameProvider indexNameProvider; // region Setup @@ -1181,7 +1182,7 @@ void shouldWorkWithReadonlyId() { }).verifyComplete(); } - @Test // #2496 + @Test // #2496, #2576 @DisplayName("should save data from Flux and return saved data in a flux") void shouldSaveDataFromFluxAndReturnSavedDataInAFlux() { @@ -1190,9 +1191,11 @@ void shouldSaveDataFromFluxAndReturnSavedDataInAFlux() { .mapToObj(SampleEntity::of) // .collect(Collectors.toList()); - var entityFlux = Flux.fromIterable(entityList); + // we add a random delay to make suure the underlying implementation handles irregular incoming data + var entities = Flux.fromIterable(entityList).concatMap( + entity -> Mono.just(entity).delay(Duration.ofMillis((long) (Math.random() * 10))).thenReturn(entity)); - operations.save(entityFlux, SampleEntity.class).collectList() // + operations.save(entities, SampleEntity.class).collectList() // .as(StepVerifier::create) // .consumeNextWith(savedEntities -> { assertThat(savedEntities).isEqualTo(entityList); @@ -1202,7 +1205,7 @@ void shouldSaveDataFromFluxAndReturnSavedDataInAFlux() { // endregion // region Helper functions - private SampleEntity randomEntity(String message) { + protected SampleEntity randomEntity(@Nullable String message) { SampleEntity entity = new SampleEntity(); entity.setId(UUID.randomUUID().toString()); diff --git a/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchTemplateCallbackTests.java b/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchTemplateCallbackTests.java index 07871b19ab..c3489476ff 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchTemplateCallbackTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchTemplateCallbackTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2023 the original author or authors. + * Copyright 2018-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchTemplateUnitTests.java b/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchTemplateUnitTests.java index 348e8dc940..9b50710720 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchTemplateUnitTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/ReactiveElasticsearchTemplateUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2023 the original author or authors. + * Copyright 2018-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. 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 b898ae4961..4232a7ffcc 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-2023 the original author or authors. + * Copyright 2022-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/ReactivePointInTimeERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/ReactivePointInTimeERHLCIntegrationTests.java index b01c7c9d4e..3b9bb99b84 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/ReactivePointInTimeERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/ReactivePointInTimeERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 the original author or authors. + * Copyright 2022-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. 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 0a1addf4f8..a6a6df2d7d 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-2023 the original author or authors. + * Copyright 2022-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. 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 e92d0a0822..7034417dbb 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-2023 the original author or authors. + * Copyright 2022-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/ReactiveReindexERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/ReactiveReindexERHLCIntegrationTests.java index e45883c946..4877c1c164 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/ReactiveReindexERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/ReactiveReindexERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 the original author or authors. + * Copyright 2022-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. 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 acd6b88bb5..2d68b2f02d 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-2023 the original author or authors. + * Copyright 2022-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. 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 250a43f63e..9ba6f5b5c7 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-2023 the original author or authors. + * Copyright 2020-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. 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 f0b49c1eb5..118790de54 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-2023 the original author or authors. + * Copyright 2022-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. 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 1a8f57369d..33402c38dd 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-2023 the original author or authors. + * Copyright 2022-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. 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 91d69ec2c2..c66c94073d 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-2023 the original author or authors. + * Copyright 2022-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/ReindexERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/ReindexERHLCIntegrationTests.java index fbc17c98a0..460ff15721 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/ReindexERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/ReindexERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 the original author or authors. + * Copyright 2022-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. 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 92633654d3..1499455abd 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-2023 the original author or authors. + * Copyright 2022-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/RuntimeFieldTest.java b/src/test/java/org/springframework/data/elasticsearch/core/RuntimeFieldTest.java index cbe0f560a8..b192dc0f42 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/RuntimeFieldTest.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/RuntimeFieldTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 the original author or authors. + * Copyright 2022-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/RuntimeFieldsELCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/RuntimeFieldsELCIntegrationTests.java index 99d458aea8..4a5c3a0e33 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/RuntimeFieldsELCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/RuntimeFieldsELCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2023 the original author or authors. + * 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. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/RuntimeFieldsERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/RuntimeFieldsERHLCIntegrationTests.java index 51e6a348b7..01bf0f66dc 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/RuntimeFieldsERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/RuntimeFieldsERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2023 the original author or authors. + * 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. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/RuntimeFieldsIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/RuntimeFieldsIntegrationTests.java index 3dafead198..e68392bb53 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/RuntimeFieldsIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/RuntimeFieldsIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2023 the original author or authors. + * 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. @@ -31,6 +31,7 @@ import org.springframework.data.elasticsearch.annotations.Field; import org.springframework.data.elasticsearch.annotations.FieldType; import org.springframework.data.elasticsearch.annotations.Mapping; +import org.springframework.data.elasticsearch.annotations.ScriptedField; import org.springframework.data.elasticsearch.core.mapping.IndexCoordinates; import org.springframework.data.elasticsearch.core.query.Criteria; import org.springframework.data.elasticsearch.core.query.CriteriaQuery; @@ -95,6 +96,88 @@ void shouldUseRuntimeFieldWithoutScript() { assertThat(searchHits.getSearchHit(0).getId()).isEqualTo("1"); } + @Test // #2727 + @DisplayName("should return runtime fields values") + void shouldReturnRuntimeFieldsValues() { + + var entity = new SAREntity(); + entity.setId("42"); + entity.setValue(3); + + operations.save(entity); + + var runtimeField1 = getRuntimeField("scriptedValue1", 2); + var runtimeField2 = getRuntimeField("scriptedValue2", 3); + + var query = CriteriaQuery.builder(Criteria.where("value").is(3)).build(); + query.addRuntimeField(runtimeField1); + query.addRuntimeField(runtimeField2); + query.addSourceFilter(new FetchSourceFilterBuilder().withIncludes("*").build()); + query.addFields("scriptedValue1", "scriptedValue2"); + var searchHits = operations.search(query, SAREntity.class); + + assertThat(searchHits.getTotalHits()).isEqualTo(1); + var foundEntity = searchHits.getSearchHit(0).getContent(); + assertThat(foundEntity.value).isEqualTo(3); + assertThat(foundEntity.getScriptedValue1()).isEqualTo(6); + assertThat(foundEntity.getScriptedValue2()).isEqualTo(9); + } + + @Document(indexName = "#{@indexNameProvider.indexName()}-sar") + public static class SAREntity { + @Nullable private String id; + @Field(type = FieldType.Integer) + @Nullable Integer value; + @ScriptedField + @Nullable Integer scriptedValue1; + @ScriptedField + @Nullable Integer scriptedValue2; + // getter and setter omitted + + @Nullable + public String getId() { + return id; + } + + public void setId(@Nullable String id) { + this.id = id; + } + + @Nullable + public Integer getValue() { + return value; + } + + public void setValue(@Nullable Integer value) { + this.value = value; + } + + @Nullable + public Integer getScriptedValue1() { + return scriptedValue1; + } + + public void setScriptedValue1(@Nullable Integer scriptedValue1) { + this.scriptedValue1 = scriptedValue1; + } + + @Nullable + public Integer getScriptedValue2() { + return scriptedValue2; + } + + public void setScriptedValue2(@Nullable Integer scriptedValue2) { + this.scriptedValue2 = scriptedValue2; + } + } + + private static RuntimeField getRuntimeField(String fieldName, int factor) { + return new RuntimeField( + fieldName, + "long", + String.format("emit(doc['value'].size() > 0 ? doc['value'].value * %d : 0)", factor)); + } + @Test // #2431 @DisplayName("should return value from runtime field defined in mapping") void shouldReturnValueFromRuntimeFieldDefinedInMapping() { 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 3e3b31ce9a..ad89eabafb 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-2023 the original author or authors. + * Copyright 2022-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/SearchAsYouTypeERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/SearchAsYouTypeERHLCIntegrationTests.java index e4b3a78206..c862e41d46 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/SearchAsYouTypeERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/SearchAsYouTypeERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 the original author or authors. + * Copyright 2022-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. 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 6591fd1632..cb8d938b66 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-2023 the original author or authors. + * Copyright 2020-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. 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 fcbef6b9a3..623e76f25e 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-2023 the original author or authors. + * Copyright 2020-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. 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 a0a980207c..1d346fa124 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-2023 the original author or authors. + * Copyright 2022-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. 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 0284ee2a4f..29b1ddd254 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-2023 the original author or authors. + * Copyright 2022-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. 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 ec940509ab..d96039851f 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-2023 the original author or authors. + * 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. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/SourceFilterERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/SourceFilterERHLCIntegrationTests.java index cb9cf17538..c22d5b5672 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/SourceFilterERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/SourceFilterERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2023 the original author or authors. + * 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. 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 d0c405fe57..bf5118f0ba 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-2023 the original author or authors. + * 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. 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 7bcbd93cf2..ce23e7cc78 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-2023 the original author or authors. + * Copyright 2020-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. 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 420d943cd1..36141e41d5 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-2023 the original author or authors. + * Copyright 2019-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationERHLCIntegrationTests.java index cdc561f58a..96f30271e7 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/aggregation/AggregationERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2023 the original author or authors. + * Copyright 2019-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. 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 2d201192cd..f087c6f58c 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-2023 the original author or authors. + * Copyright 2013-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. 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 68734f62ad..e8705ca4c4 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-2023 the original author or authors. + * 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. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/cluster/ClusterOperationsERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/cluster/ClusterOperationsERHLCIntegrationTests.java index dbf37283ad..d95750be39 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/cluster/ClusterOperationsERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/cluster/ClusterOperationsERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2023 the original author or authors. + * 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. 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 acc2c5ded1..ff3de066c0 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-2023 the original author or authors. + * 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. 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 f69f9eeb77..045d671c62 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-2023 the original author or authors. + * 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. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/cluster/ClusterOperationsReactiveERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/cluster/ClusterOperationsReactiveERHLCIntegrationTests.java index 7d61bd23ce..1539c4e0e0 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/cluster/ClusterOperationsReactiveERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/cluster/ClusterOperationsReactiveERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2023 the original author or authors. + * 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. 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 a189302e1c..9cceacd9ad 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-2023 the original author or authors. + * 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. 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 a21f1ef0da..ef9b222dd6 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-2023 the original author or authors. + * Copyright 2020-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. 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 ef5a193649..41f382385a 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-2023 the original author or authors. + * Copyright 2020-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. 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 b01e7baf82..a9afd8e377 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-2023 the original author or authors. + * Copyright 2019-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. @@ -909,22 +909,109 @@ void shouldWriteNullValueIfConfigured() throws JSONException { assertEquals(expected, document.toJson(), false); } + @Test // #2627 + @DisplayName("should write Map containing collection containing map") + void shouldWriteMapContainingCollectionContainingMap() throws JSONException { + + class EntityWithMapCollectionMap { + Map map; + } + class InnerEntity { + String prop1; + + String prop2; + + public InnerEntity() {} + + public InnerEntity(String prop1, String prop2) { + this.prop1 = prop1; + this.prop2 = prop2; + } + + } + + var entity = new EntityWithMapCollectionMap(); + entity.map = Collections.singletonMap("collection", + Collections.singletonList(Collections.singletonMap("destination", new InnerEntity("prop1", "prop2")))); + + var expected = """ + { + "_class": "org.springframework.data.elasticsearch.core.convert.MappingElasticsearchConverterUnitTests$1EntityWithMapCollectionMap", + "map": { + "collection": [ + { + "destination": { + "_class": "org.springframework.data.elasticsearch.core.convert.MappingElasticsearchConverterUnitTests$1InnerEntity", + "prop1": "prop1", + "prop2": "prop2" + } + } + ] + } + } + """; + + Document document = Document.create(); + + mappingElasticsearchConverter.write(entity, document); + + assertEquals(expected, document.toJson(), false); + } + @Nested class RangeTests { - static final String JSON = "{" - + "\"_class\":\"org.springframework.data.elasticsearch.core.convert.MappingElasticsearchConverterUnitTests$RangeTests$RangeEntity\"," - + "\"integerRange\":{\"gt\":\"1\",\"lt\":\"10\"}," // - + "\"floatRange\":{\"gte\":\"1.2\",\"lte\":\"2.5\"}," // - + "\"longRange\":{\"gt\":\"2\",\"lte\":\"5\"}," // - + "\"doubleRange\":{\"gte\":\"3.2\",\"lt\":\"7.4\"}," // - + "\"dateRange\":{\"gte\":\"1970-01-01T00:00:00.000Z\",\"lte\":\"1970-01-01T01:00:00.000Z\"}," // - + "\"localDateRange\":{\"gte\":\"2021-07-06\"}," // - + "\"localTimeRange\":{\"gte\":\"00:30:00.000\",\"lt\":\"02:30:00.000\"}," // - + "\"localDateTimeRange\":{\"gt\":\"2021-01-01T00:30:00.000\",\"lt\":\"2021-01-01T02:30:00.000\"}," // - + "\"offsetTimeRange\":{\"gte\":\"00:30:00.000+02:00\",\"lt\":\"02:30:00.000+02:00\"}," // - + "\"zonedDateTimeRange\":{\"gte\":\"2021-01-01T00:30:00.000+02:00\",\"lte\":\"2021-01-01T00:30:00.000+02:00\"}," // - + "\"nullRange\":null}"; + static final String JSON = """ + { + "_class": "org.springframework.data.elasticsearch.core.convert.MappingElasticsearchConverterUnitTests$RangeTests$RangeEntity", + "integerRange": { + "gt": "1", + "lt": "10" + }, + "floatRange": { + "gte": "1.2", + "lte": "2.5" + }, + "longRange": { + "gt": "2", + "lte": "5" + }, + "doubleRange": { + "gte": "3.2", + "lt": "7.4" + }, + "dateRange": { + "gte": "1970-01-01T00:00:00.000Z", + "lte": "1970-01-01T01:00:00.000Z" + }, + "localDateRange": { + "gte": "2021-07-06" + }, + "localTimeRange": { + "gte": "00:30:00.000", + "lt": "02:30:00.000" + }, + "localDateTimeRange": { + "gt": "2021-01-01T00:30:00.000", + "lt": "2021-01-01T02:30:00.000" + }, + "offsetTimeRange": { + "gte": "00:30:00.000+02:00", + "lt": "02:30:00.000+02:00" + }, + "zonedDateTimeRange": { + "gte": "2021-01-01T00:30:00.000+02:00", + "lte": "2021-01-01T00:30:00.000+02:00" + }, + "nullRange": null, + "integerRangeList": [ + { + "gte": "2", + "lte": "5" + } + ] + } + """; @Test public void shouldReadRanges() throws JSONException { @@ -955,6 +1042,7 @@ public void shouldReadRanges() throws JSONException { assertThat(e.getZonedDateTimeRange()).isEqualTo( Range.just(ZonedDateTime.of(LocalDate.of(2021, 1, 1), LocalTime.of(0, 30), ZoneOffset.ofHours(2)))); assertThat(e.getNullRange()).isNull(); + assertThat(e.getIntegerRangeList()).containsExactly(Range.closed(2, 5)); }); } @@ -978,8 +1066,7 @@ public void shouldWriteRanges() throws JSONException { entity.setZonedDateTimeRange( Range.just(ZonedDateTime.of(LocalDate.of(2021, 1, 1), LocalTime.of(0, 30), ZoneOffset.ofHours(2)))); entity.setNullRange(null); - - // when + entity.setIntegerRangeList(List.of(Range.closed(2, 5))); Document document = mappingElasticsearchConverter.mapObject(entity); // then @@ -1004,6 +1091,8 @@ class RangeEntity { @Field(type = FieldType.Date_Range) private Range zonedDateTimeRange; @Field(type = FieldType.Date_Range, storeNullValue = true) private Range nullRange; + @Field(type = FieldType.Integer_Range) private List> integerRangeList; + public String getId() { return id; } @@ -1100,6 +1189,13 @@ public void setNullRange(Range nullRange) { this.nullRange = nullRange; } + public List> getIntegerRangeList() { + return integerRangeList; + } + + public void setIntegerRangeList(List> integerRangeList) { + this.integerRangeList = integerRangeList; + } } } @@ -1953,12 +2049,12 @@ void shouldWriteEntityWithDottedFieldName() throws JSONException { @Language("JSON") var expected = """ - { - "_class": "org.springframework.data.elasticsearch.core.convert.MappingElasticsearchConverterUnitTests$FieldNameDotsEntity", - "id": "42", - "dotted.field": "dotted field" - } - """; + { + "_class": "org.springframework.data.elasticsearch.core.convert.MappingElasticsearchConverterUnitTests$FieldNameDotsEntity", + "id": "42", + "dotted.field": "dotted field" + } + """; var entity = new FieldNameDotsEntity(); entity.setId("42"); entity.setDottedField("dotted field"); @@ -3192,6 +3288,7 @@ public void setMapToNotWriteWhenEmpty(@Nullable Map mapToNotWrit this.mapToNotWriteWhenEmpty = mapToNotWriteWhenEmpty; } } + static class FieldNameDotsEntity { @Id @Nullable private String id; 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 cbb53b58b5..15c5dea5ce 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-2023 the original author or authors. + * 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. @@ -63,13 +63,14 @@ static Stream propertyValueConverters() { converters.add(new DatePropertyValueConverter(persistentProperty, Collections.singletonList(ElasticsearchDateConverter.of(DateFormat.basic_date)))); + Class genericType = Object.class; converters.add(new DateRangePropertyValueConverter(persistentProperty, - Collections.singletonList(ElasticsearchDateConverter.of(DateFormat.basic_date)))); - converters.add(new NumberRangePropertyValueConverter(persistentProperty)); + genericType, Collections.singletonList(ElasticsearchDateConverter.of(DateFormat.basic_date)))); + converters.add(new NumberRangePropertyValueConverter(persistentProperty, genericType)); converters.add(new TemporalPropertyValueConverter(persistentProperty, Collections.singletonList(ElasticsearchDateConverter.of(DateFormat.basic_date)))); converters.add(new TemporalRangePropertyValueConverter(persistentProperty, - Collections.singletonList(ElasticsearchDateConverter.of(DateFormat.basic_date)))); + genericType, Collections.singletonList(ElasticsearchDateConverter.of(DateFormat.basic_date)))); return converters.stream().map(propertyValueConverter -> arguments( Named.of(propertyValueConverter.getClass().getSimpleName(), propertyValueConverter))); diff --git a/src/test/java/org/springframework/data/elasticsearch/core/document/DocumentAdaptersUnitTests.java b/src/test/java/org/springframework/data/elasticsearch/core/document/DocumentAdaptersUnitTests.java index 497cc26161..44222dabc6 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/document/DocumentAdaptersUnitTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/document/DocumentAdaptersUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2023 the original author or authors. + * Copyright 2019-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. 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 151e9064f1..d9e2bc3057 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-2023 the original author or authors. + * Copyright 2020-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. 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 a164d6d6fb..7bf62117d2 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-2023 the original author or authors. + * Copyright 2020-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/event/CallbackERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/event/CallbackERHLCIntegrationTests.java index 1a3995c53b..06d8d84682 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/event/CallbackERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/event/CallbackERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2020-2023 the original author or authors. + * Copyright 2020-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. 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 34a48629ea..70c194e2a9 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-2023 the original author or authors. + * Copyright 2020-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. 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 11ab5d8f87..4cd3728853 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-2023 the original author or authors. + * Copyright 2020-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. 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 7ea5b1de80..913a8fb365 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-2023 the original author or authors. + * 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. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/event/ReactiveCallbackERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/event/ReactiveCallbackERHLCIntegrationTests.java index 687614e072..385420dd41 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/event/ReactiveCallbackERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/event/ReactiveCallbackERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2023 the original author or authors. + * 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. 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 6f4eca31d7..a7b9e39e46 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-2023 the original author or authors. + * Copyright 2020-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. 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 4179db6772..a9a7484a0c 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-2023 the original author or authors. + * Copyright 2019-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/geo/GeoERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/geo/GeoERHLCIntegrationTests.java index 811145ea65..3f79bd2d62 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/geo/GeoERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/geo/GeoERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2023 the original author or authors. + * Copyright 2019-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. 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 4ba985c30d..ce4fce797f 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-2023 the original author or authors. + * Copyright 2013-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. 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 0480efc363..ec492b873a 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-2023 the original author or authors. + * Copyright 2022-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/geo/GeoJsonERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/geo/GeoJsonERHLCIntegrationTests.java index 5a096c13a7..3fcfaab5c4 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/geo/GeoJsonERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/geo/GeoJsonERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2020-2023 the original author or authors. + * Copyright 2020-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. 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 3cfc2aa8a9..e6c1b61482 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-2023 the original author or authors. + * Copyright 2020-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. 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 75f0893aa7..e0ea07eaac 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-2023 the original author or authors. + * Copyright 2020-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. 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 8385427ddf..c6dd7f8cdc 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-2023 the original author or authors. + * Copyright 2020-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. 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 cee8394b4f..6c54f3330b 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-2023 the original author or authors. + * Copyright 2020-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. 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 9c0df0cd35..65f1682287 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-2023 the original author or authors. + * Copyright 2020-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. 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 e3ae508b30..eeebe06a80 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-2023 the original author or authors. + * Copyright 2020-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. 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 ec634d39d6..ffa458a895 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-2023 the original author or authors. + * Copyright 2020-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. 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 1712b3faa8..b8606e7bf9 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-2023 the original author or authors. + * Copyright 2020-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. 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 01d5ba2931..f8175479e6 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-2023 the original author or authors. + * 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. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/index/IndexOperationsERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/index/IndexOperationsERHLCIntegrationTests.java index 5571c05b85..1411d60048 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/index/IndexOperationsERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/index/IndexOperationsERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2023 the original author or authors. + * 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. 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 0ef0358150..eb65d0ac9d 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-2023 the original author or authors. + * 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. 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 f0bac0ef3f..dd12049e7f 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-2023 the original author or authors. + * Copyright 2022-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/index/IndexTemplateERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/index/IndexTemplateERHLCIntegrationTests.java index 475c7a40cd..8d270d3073 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/index/IndexTemplateERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/index/IndexTemplateERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2020-2023 the original author or authors. + * Copyright 2020-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. 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 8d16126de5..c9fcac4ca0 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-2023 the original author or authors. + * Copyright 2020-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. 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 1477f3a125..7211eb256e 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-2023 the original author or authors. + * 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. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/index/MappingBuilderERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/index/MappingBuilderERHLCIntegrationTests.java index 7a907ececa..66fd8a50fd 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/index/MappingBuilderERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/index/MappingBuilderERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2020-2023 the original author or authors. + * Copyright 2020-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. 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 5d7c4670ea..8d69c332d4 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-2023 the original author or authors. + * Copyright 2013-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. @@ -287,6 +287,12 @@ void shouldWriteMappingWithFieldNameWithDots() { indexOps.createWithMapping(); } + @Test // #2659 + @DisplayName("should write correct mapping for dense vector property") + void shouldWriteCorrectMappingForDenseVectorProperty() { + operations.indexOps(SimilarityEntity.class).createWithMapping(); + } + // region Entities @Document(indexName = "#{@indexNameProvider.indexName()}") static class Book { @@ -916,5 +922,14 @@ private static class FieldNameDotsEntity { @Nullable @Field(name = "dotted.field", type = Text) private String dottedField; } + + @Document(indexName = "#{@indexNameProvider.indexName()}") + static class SimilarityEntity { + @Nullable + @Id private String id; + + @Field(type = FieldType.Dense_Vector, dims = 42, similarity = "cosine") private double[] denseVector; + } + // endregion } 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 c931a3ffbd..37a03518a8 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-2023 the original author or authors. + * Copyright 2013-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. 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 7a460bba43..a51c69a25b 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-2023 the original author or authors. + * Copyright 2018-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/index/ReactiveIndexOperationsERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/index/ReactiveIndexOperationsERHLCIntegrationTests.java index 23e0bedd8e..5f4785289b 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/index/ReactiveIndexOperationsERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/index/ReactiveIndexOperationsERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2023 the original author or authors. + * Copyright 2018-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. 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 17385558ae..da93c54df9 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-2023 the original author or authors. + * Copyright 2018-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. 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 8062c9dd2c..9a9d611466 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 the original author or authors. + * Copyright 2023-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/index/ReactiveIndexTemplateERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/index/ReactiveIndexTemplateERHLCIntegrationTests.java index a1981e05ab..2c25ff65c3 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/index/ReactiveIndexTemplateERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/index/ReactiveIndexTemplateERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2023 the original author or authors. + * Copyright 2023-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. 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 fdd2501bfa..69abbac32f 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-2023 the original author or authors. + * Copyright 2018-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. 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 b54a9be05c..e7a193b030 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-2023 the original author or authors. + * 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. 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 7029b00d3e..8b150a33a7 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-2023 the original author or authors. + * 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. 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 2277fe29a8..db9b5dbfb7 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-2023 the original author or authors. + * Copyright 2018-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. 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 bd0fe7f8d2..0363a307f9 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-2023 the original author or authors. + * Copyright 2013-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. 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 8bc9920957..e3c949d095 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-2023 the original author or authors. + * Copyright 2022-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/mapping/EntityCustomConversionERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/mapping/EntityCustomConversionERHLCIntegrationTests.java index d799415505..524af96495 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/mapping/EntityCustomConversionERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/mapping/EntityCustomConversionERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 the original author or authors. + * Copyright 2022-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. 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 a3e64921dd..cf483256e6 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-2023 the original author or authors. + * 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. 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 86bb11f28a..44c84440a0 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-2023 the original author or authors. + * Copyright 2022-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/mapping/FieldNamingStrategyERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/mapping/FieldNamingStrategyERHLCIntegrationTests.java index ac81bf5f41..eb78213706 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/mapping/FieldNamingStrategyERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/mapping/FieldNamingStrategyERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2023 the original author or authors. + * 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. 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 161acde163..92a87cce75 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-2023 the original author or authors. + * 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. 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 cda3043647..08afd793da 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-2023 the original author or authors. + * Copyright 2022-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/mapping/ReactiveFieldNamingStrategyERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/mapping/ReactiveFieldNamingStrategyERHLCIntegrationTests.java index 6356e0acb0..9682519786 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/mapping/ReactiveFieldNamingStrategyERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/mapping/ReactiveFieldNamingStrategyERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 the original author or authors. + * Copyright 2022-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. 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 131fbcf818..443691f5f1 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-2023 the original author or authors. + * 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. 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 9051aad29c..c06f7666da 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-2023 the original author or authors. + * Copyright 2013-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. 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 a4ea914861..96c9510c37 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-2023 the original author or authors. + * Copyright 2018-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. 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 52298999d6..9814139546 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-2023 the original author or authors. + * Copyright 2022-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/paginating/ReactiveSearchAfterERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/paginating/ReactiveSearchAfterERHLCIntegrationTests.java index 3904aaa956..f9266c629a 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/paginating/ReactiveSearchAfterERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/paginating/ReactiveSearchAfterERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 the original author or authors. + * Copyright 2022-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. 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 637b4385d4..a95d8d3a1c 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-2023 the original author or authors. + * 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. 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 52cec4990f..05123918c5 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-2023 the original author or authors. + * 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. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/paginating/SearchAfterERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/paginating/SearchAfterERHLCIntegrationTests.java index 3d3fa96dd4..327b7905a4 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/paginating/SearchAfterERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/paginating/SearchAfterERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2023 the original author or authors. + * 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. 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 de3c54a607..2e0eca3747 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-2023 the original author or authors. + * 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. @@ -62,7 +62,7 @@ public void before() { @Test @Order(java.lang.Integer.MAX_VALUE) void cleanup() { - operations.indexOps(IndexCoordinates.of(indexNameProvider.getPrefix() + "*")).delete(); + operations.indexOps(IndexCoordinates.of(indexNameProvider.getPrefix() + '*')).delete(); } @Test // #1143 @@ -85,11 +85,11 @@ void shouldReadPagesWithSearchAfter() { query.setSearchAfter(searchAfter); SearchHits searchHits = operations.search(query, Entity.class); - if (searchHits.getSearchHits().size() == 0) { + if (searchHits.getSearchHits().isEmpty()) { break; } - foundEntities.addAll(searchHits.stream().map(SearchHit::getContent).collect(Collectors.toList())); - searchAfter = searchHits.getSearchHit((int) (searchHits.getSearchHits().size() - 1)).getSortValues(); + foundEntities.addAll(searchHits.stream().map(SearchHit::getContent).toList()); + searchAfter = searchHits.getSearchHit(searchHits.getSearchHits().size() - 1).getSortValues(); if (++loop > 10) { fail("loop not terminating"); @@ -99,16 +99,69 @@ void shouldReadPagesWithSearchAfter() { assertThat(foundEntities).containsExactlyElementsOf(entities); } + @Test // #2678 + @DisplayName("should be able to handle different search after type values including null") + void shouldBeAbleToHandleDifferentSearchAfterTypeValuesIncludingNull() { + + List entities = IntStream.rangeClosed(1, 10) + .mapToObj(i -> { + var message = (i % 2 == 0) ? null : "message " + i; + var value = (i % 3 == 0) ? null : (long) i; + return new Entity((long) i, message, value); + }) + .collect(Collectors.toList()); + operations.save(entities); + + Query query = Query.findAll(); + query.setPageable(PageRequest.of(0, 3)); + query.addSort(Sort.by(Sort.Direction.ASC, "id")); + query.addSort(Sort.by(Sort.Direction.ASC, "keyword")); + query.addSort(Sort.by(Sort.Direction.ASC, "value")); + + List searchAfter = null; + List foundEntities = new ArrayList<>(); + + int loop = 0; + do { + query.setSearchAfter(searchAfter); + SearchHits searchHits = operations.search(query, Entity.class); + + if (searchHits.getSearchHits().isEmpty()) { + break; + } + foundEntities.addAll(searchHits.stream().map(SearchHit::getContent).toList()); + searchAfter = searchHits.getSearchHit(searchHits.getSearchHits().size() - 1).getSortValues(); + + if (++loop > 10) { + fail("loop not terminating"); + } + } while (true); + + assertThat(foundEntities).containsExactlyElementsOf(entities); + } + + @SuppressWarnings("unused") @Document(indexName = "#{@indexNameProvider.indexName()}") private static class Entity { @Nullable @Id private Long id; @Nullable - @Field(type = FieldType.Text) private String message; + @Field(type = FieldType.Keyword) private String keyword; + + @Nullable + @Field(type = FieldType.Long) private Long value; + + public Entity() {} - public Entity(@Nullable Long id, @Nullable String message) { + public Entity(@Nullable Long id, @Nullable String keyword) { this.id = id; - this.message = message; + this.keyword = keyword; + } + + public Entity(@Nullable Long id, @Nullable String keyword, @Nullable Long value) { + this.id = id; + this.keyword = keyword; + this.value = value; } @Nullable @@ -121,30 +174,44 @@ public void setId(@Nullable Long id) { } @Nullable - public String getMessage() { - return message; + public String getKeyword() { + return keyword; + } + + public void setKeyword(@Nullable String keyword) { + this.keyword = keyword; + } + + @Nullable + public Long getValue() { + return value; } - public void setMessage(@Nullable String message) { - this.message = message; + public void setValue(@Nullable Long value) { + this.value = value; } @Override public boolean equals(Object o) { if (this == o) return true; - if (!(o instanceof Entity entity)) + if (o == null || getClass() != o.getClass()) return false; + Entity entity = (Entity) o; + if (!Objects.equals(id, entity.id)) return false; - return Objects.equals(message, entity.message); + if (!Objects.equals(keyword, entity.keyword)) + return false; + return Objects.equals(value, entity.value); } @Override public int hashCode() { int result = id != null ? id.hashCode() : 0; - result = 31 * result + (message != null ? message.hashCode() : 0); + result = 31 * result + (keyword != null ? keyword.hashCode() : 0); + result = 31 * result + (value != null ? value.hashCode() : 0); return result; } } 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 adb3e9792b..6c66817ad8 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-2023 the original author or authors. + * Copyright 2019-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/query/CriteriaQueryERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/query/CriteriaQueryERHLCIntegrationTests.java index 532d917f62..21f3669939 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/query/CriteriaQueryERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/query/CriteriaQueryERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2023 the original author or authors. + * Copyright 2019-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. 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 245adaf01d..8f8ca8f83a 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-2023 the original author or authors. + * Copyright 2013-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. 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 944c533c16..b41eee4743 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-2023 the original author or authors. + * Copyright 2020-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/query/HighlightQueryBuilderTests.java b/src/test/java/org/springframework/data/elasticsearch/core/query/HighlightQueryBuilderTests.java index 7155854963..082a6a2fb3 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/query/HighlightQueryBuilderTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/query/HighlightQueryBuilderTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2020-2023 the original author or authors. + * Copyright 2020-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. 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 eecab3f898..81e7b714f2 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 the original author or authors. + * Copyright 2023-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. 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 cfe2acbc2e..46fa0958ba 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 the original author or authors. + * Copyright 2023-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. @@ -28,6 +28,7 @@ import org.springframework.data.elasticsearch.annotations.FieldType; import org.springframework.data.elasticsearch.client.elc.NativeQuery; import org.springframework.data.elasticsearch.core.ElasticsearchOperations; +import org.springframework.data.elasticsearch.core.geo.GeoPoint; import org.springframework.data.elasticsearch.core.mapping.IndexCoordinates; import org.springframework.data.elasticsearch.junit.jupiter.SpringIntegrationTest; import org.springframework.data.elasticsearch.utils.IndexNameProvider; @@ -50,7 +51,7 @@ public void before() { @Test @Order(java.lang.Integer.MAX_VALUE) void cleanup() { - operations.indexOps(IndexCoordinates.of(indexNameProvider.getPrefix() + "*")).delete(); + operations.indexOps(IndexCoordinates.of(indexNameProvider.getPrefix() + '*')).delete(); } @Test // #2391 @@ -75,6 +76,28 @@ void shouldBeAbleToUseCriteriaQueryInANativeQuery() { assertThat(searchHits.getSearchHit(0).getId()).isEqualTo(entity.getId()); } + @Test // #2840 + @DisplayName("should be able to use CriteriaQuery with filter arguments in a NativeQuery") + void shouldBeAbleToUseCriteriaQueryWithFilterArgumentsInANativeQuery() { + var entity1 = new SampleEntity(); + entity1.setId("60"); + var location1 = new GeoPoint(60.0, 60.0); + entity1.setLocation(location1); + var entity2 = new SampleEntity(); + entity2.setId("70"); + var location70 = new GeoPoint(70.0, 70.0); + entity2.setLocation(location70); + operations.save(entity1, entity2); + + var criteriaQuery = new CriteriaQuery(Criteria.where("location").within(location1, "10km")); + var nativeQuery = NativeQuery.builder().withQuery(criteriaQuery).build(); + + var searchHits = operations.search(nativeQuery, SampleEntity.class); + + assertThat(searchHits.getTotalHits()).isEqualTo(1); + assertThat(searchHits.getSearchHit(0).getId()).isEqualTo(entity1.getId()); + } + @Test // #2391 @DisplayName("should be able to use StringQuery in a NativeQuery") void shouldBeAbleToUseStringQueryInANativeQuery() { @@ -112,6 +135,14 @@ void shouldBeAbleToUseStringQueryInANativeQuery() { @Document(indexName = "#{@indexNameProvider.indexName()}") static class SampleEntity { + @Nullable + @Id private String id; + + @Nullable + @Field(type = FieldType.Text) private String text; + + @Nullable private GeoPoint location; + @Nullable public String getId() { return id; @@ -121,6 +152,7 @@ public void setId(@Nullable String id) { this.id = id; } + @Nullable public String getText() { return text; } @@ -130,8 +162,12 @@ public void setText(String text) { } @Nullable - @Id private String id; + public GeoPoint getLocation() { + return location; + } - @Field(type = FieldType.Text) private String text; + public void setLocation(GeoPoint location) { + this.location = location; + } } } diff --git a/src/test/java/org/springframework/data/elasticsearch/core/query/NativeSearchQueryBuilderTests.java b/src/test/java/org/springframework/data/elasticsearch/core/query/NativeSearchQueryBuilderTests.java index 9abfcb5886..7c001b8cb6 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/query/NativeSearchQueryBuilderTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/query/NativeSearchQueryBuilderTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 the original author or authors. + * Copyright 2022-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. 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 f110e6bde7..e128c7b05c 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-2023 the original author or authors. + * Copyright 2020-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. 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 21d39bfb4a..6a4b3c3a10 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-2023 the original author or authors. + * Copyright 2022-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/routing/ReactiveRoutingERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/routing/ReactiveRoutingERHLCIntegrationTests.java index 9b27bc29be..ea181fa9c8 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/routing/ReactiveRoutingERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/routing/ReactiveRoutingERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 the original author or authors. + * Copyright 2022-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. 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 ae15608ee7..d122766285 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-2023 the original author or authors. + * Copyright 2019-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionERHLCIntegrationTests.java index 37ff425c23..bc56ecc686 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2023 the original author or authors. + * Copyright 2019-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. 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 4bf70ad05b..9f8e9bbb36 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-2023 the original author or authors. + * Copyright 2013-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. 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 50dbc45244..4056841e4e 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-2023 the original author or authors. + * Copyright 2013-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionWithContextsRestTemplateIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionWithContextsRestTemplateIntegrationTests.java index 44a2c5a450..afb2cb52ec 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionWithContextsRestTemplateIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/suggest/CompletionWithContextsRestTemplateIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2023 the original author or authors. + * Copyright 2019-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. 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 1d4414fd73..8bd4e614ab 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-2023 the original author or authors. + * Copyright 2022-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/core/suggest/ReactiveSuggestERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/core/suggest/ReactiveSuggestERHLCIntegrationTests.java index ddbc6beebc..145032c84f 100644 --- a/src/test/java/org/springframework/data/elasticsearch/core/suggest/ReactiveSuggestERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/core/suggest/ReactiveSuggestERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 the original author or authors. + * Copyright 2022-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. 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 c6ef422969..b36688a2ab 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-2023 the original author or authors. + * 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. 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 46ebbe5192..bf22e425f5 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-2023 the original author or authors. + * Copyright 2022-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/immutable/ImmutableRepositoryERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/immutable/ImmutableRepositoryERHLCIntegrationTests.java index b623632c04..db10c803a0 100644 --- a/src/test/java/org/springframework/data/elasticsearch/immutable/ImmutableRepositoryERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/immutable/ImmutableRepositoryERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 the original author or authors. + * Copyright 2022-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. 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 4af74ad2ef..bea3b44fc9 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-2023 the original author or authors. + * Copyright 2016-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. 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 a92939f838..34247bfe9d 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-2023 the original author or authors. + * Copyright 2019-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. 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 611df2ba0c..bf68703a63 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-2023 the original author or authors. + * Copyright 2019-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. 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 b5a1c83dc0..1f440520e6 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-2023 the original author or authors. + * Copyright 2019-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/junit/jupiter/ElasticsearchRestTemplateConfiguration.java b/src/test/java/org/springframework/data/elasticsearch/junit/jupiter/ElasticsearchRestTemplateConfiguration.java index c7dbf2bed1..cb65aa14e9 100644 --- a/src/test/java/org/springframework/data/elasticsearch/junit/jupiter/ElasticsearchRestTemplateConfiguration.java +++ b/src/test/java/org/springframework/data/elasticsearch/junit/jupiter/ElasticsearchRestTemplateConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2023 the original author or authors. + * Copyright 2019-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. 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 b86561eb3d..20e3e5629a 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-2023 the original author or authors. + * 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. 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 81078ae6f0..c0e619ce7c 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-2023 the original author or authors. + * Copyright 2019-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. 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 89b5129c6a..8aa1cfa1f8 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-2023 the original author or authors. + * 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. diff --git a/src/test/java/org/springframework/data/elasticsearch/junit/jupiter/ReactiveElasticsearchRestTemplateConfiguration.java b/src/test/java/org/springframework/data/elasticsearch/junit/jupiter/ReactiveElasticsearchRestTemplateConfiguration.java index 2d0b0d8eea..e24f2cb566 100644 --- a/src/test/java/org/springframework/data/elasticsearch/junit/jupiter/ReactiveElasticsearchRestTemplateConfiguration.java +++ b/src/test/java/org/springframework/data/elasticsearch/junit/jupiter/ReactiveElasticsearchRestTemplateConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2020-2023 the original author or authors. + * Copyright 2020-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. 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 45b10a553e..0a9362a1f4 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-2023 the original author or authors. + * 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. 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 834c806fc3..f477615109 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-2023 the original author or authors. + * Copyright 2019-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. 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 6f3b759575..1c97cf6013 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-2023 the original author or authors. + * Copyright 2019-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. 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 6bd763b4ab..f5a9c3ab4b 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-2023 the original author or authors. + * Copyright 2020-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. 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 f59d97ba67..da84e2ef90 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-2023 the original author or authors. + * Copyright 2014-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. 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 1700727982..3782b34635 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-2023 the original author or authors. + * Copyright 2014-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. 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 280d5522f0..569ad7a35d 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-2023 the original author or authors. + * Copyright 2014-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. 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 d15e7547ea..3d4b3c9c48 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-2023 the original author or authors. + * Copyright 2014-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. 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 4bce75577c..45a2e4d440 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-2023 the original author or authors. + * Copyright 2016-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. 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 a775ec118d..d772a662e6 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-2023 the original author or authors. + * Copyright 2016-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. 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 16436ecd38..1b91fc9335 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-2023 the original author or authors. + * Copyright 2016-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. 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 21d584bcd8..5b29e7f1d1 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-2023 the original author or authors. + * Copyright 2014-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. 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 7be2a18b3d..fefcfd4c47 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-2023 the original author or authors. + * Copyright 2014-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. 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 c096d3b537..cfea0c9608 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-2023 the original author or authors. + * Copyright 2014-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. 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 937f2668c0..ea1e08b1cb 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-2023 the original author or authors. + * Copyright 2019-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/repositories/complex/custommethod/autowiring/ComplexCustomMethodRepositoryERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repositories/complex/custommethod/autowiring/ComplexCustomMethodRepositoryERHLCIntegrationTests.java index 6d52ddafd5..e2ad83a49f 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/complex/custommethod/autowiring/ComplexCustomMethodRepositoryERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/complex/custommethod/autowiring/ComplexCustomMethodRepositoryERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2023 the original author or authors. + * Copyright 2019-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. 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 610bcf53d2..95def7d675 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-2023 the original author or authors. + * Copyright 2013-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. 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 0fc9b8e4e0..974ef17003 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-2023 the original author or authors. + * Copyright 2013-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. 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 580b4ddc33..b040249979 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-2023 the original author or authors. + * Copyright 2014-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. 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 4b08a22a7d..a0a179ec10 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-2023 the original author or authors. + * Copyright 2019-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/repositories/complex/custommethod/manualwiring/ComplexCustomMethodRepositoryManualWiringERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repositories/complex/custommethod/manualwiring/ComplexCustomMethodRepositoryManualWiringERHLCIntegrationTests.java index ec49dfe31b..f141220651 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/complex/custommethod/manualwiring/ComplexCustomMethodRepositoryManualWiringERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/complex/custommethod/manualwiring/ComplexCustomMethodRepositoryManualWiringERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2023 the original author or authors. + * Copyright 2019-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. 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 02dbc729fe..182e6b76ac 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-2023 the original author or authors. + * Copyright 2013-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. 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 4bf569f9d3..57eb30f66c 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-2023 the original author or authors. + * Copyright 2013-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. 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 13771f6dd9..eb9b0ce5b5 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-2023 the original author or authors. + * Copyright 2014-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. 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 c52a2fb9c7..c26c2fb082 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-2023 the original author or authors. + * Copyright 2018-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/repositories/custommethod/CustomMethodRepositoryERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repositories/custommethod/CustomMethodRepositoryERHLCIntegrationTests.java index aa9a6b9b43..72ed6b4bf7 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/custommethod/CustomMethodRepositoryERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/custommethod/CustomMethodRepositoryERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2023 the original author or authors. + * Copyright 2018-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. 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 d481ee9c7a..4d20e31111 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-2023 the original author or authors. + * Copyright 2013-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. @@ -1590,6 +1590,41 @@ void shouldUseGeoSortParameter() { assertThat(searchHits.getSearchHit(2).getId()).isEqualTo("oslo"); } + @Test // #2601 + void shouldUseGeoSortReverseParameter() { + GeoPoint munich = new GeoPoint(48.137154, 11.5761247); + GeoPoint berlin = new GeoPoint(52.520008, 13.404954); + GeoPoint vienna = new GeoPoint(48.20849, 16.37208); + GeoPoint oslo = new GeoPoint(59.9127, 10.7461); + + List entities = new ArrayList<>(); + + SampleEntity entity1 = new SampleEntity(); + entity1.setId("berlin"); + entity1.setLocation(berlin); + entities.add(entity1); + + SampleEntity entity2 = new SampleEntity(); + entity2.setId("vienna"); + entity2.setLocation(vienna); + entities.add(entity2); + + SampleEntity entity3 = new SampleEntity(); + entity3.setId("oslo"); + entity3.setLocation(oslo); + entities.add(entity3); + + repository.saveAll(entities); + + SearchHits searchHits = repository + .searchBy(Sort.by(new GeoDistanceOrder("location", munich).with(Sort.Direction.DESC))); + + assertThat(searchHits.getTotalHits()).isEqualTo(3); + assertThat(searchHits.getSearchHit(0).getId()).isEqualTo("oslo"); + assertThat(searchHits.getSearchHit(1).getId()).isEqualTo("berlin"); + assertThat(searchHits.getSearchHit(2).getId()).isEqualTo("vienna"); + } + @Test // DATAES-749 void shouldReturnSearchPage() { List entities = createSampleEntities("abc", 20); 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 3e0a738ef1..a563571628 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-2023 the original author or authors. + * Copyright 2022-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/repositories/doubleid/DoubleIDRepositoryERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repositories/doubleid/DoubleIDRepositoryERHLCIntegrationTests.java index 8005e69e94..46d6a6eb28 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/doubleid/DoubleIDRepositoryERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/doubleid/DoubleIDRepositoryERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2023 the original author or authors. + * Copyright 2019-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. 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 688159f770..1b7a1de71b 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-2023 the original author or authors. + * Copyright 2013-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. 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 7f4131ef41..79b7e47802 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-2023 the original author or authors. + * Copyright 2022-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/repositories/dynamicindex/DynamicIndexEntityERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repositories/dynamicindex/DynamicIndexEntityERHLCIntegrationTests.java index b9298d226d..0170ca84b8 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/dynamicindex/DynamicIndexEntityERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/dynamicindex/DynamicIndexEntityERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2023 the original author or authors. + * Copyright 2019-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. 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 4d6002a5f3..7d8d0c42fa 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-2023 the original author or authors. + * Copyright 2019-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. 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 4e154b5e16..652fe28fad 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-2023 the original author or authors. + * Copyright 2022-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/repositories/geo/GeoRepositoryERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repositories/geo/GeoRepositoryERHLCIntegrationTests.java index d5b22b5e25..40ee583a69 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/geo/GeoRepositoryERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/geo/GeoRepositoryERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2023 the original author or authors. + * Copyright 2019-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. 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 214876eb88..de031541cf 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-2023 the original author or authors. + * Copyright 2016-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. 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 5c49356ca8..876c43c22a 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-2023 the original author or authors. + * Copyright 2022-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/repositories/integer/IntegerIDRepositoryERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repositories/integer/IntegerIDRepositoryERHLCIntegrationTests.java index 9b4925f505..94ec7364d9 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/integer/IntegerIDRepositoryERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/integer/IntegerIDRepositoryERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2023 the original author or authors. + * Copyright 2019-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. 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 54f7e8cb6d..215c8fc803 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-2023 the original author or authors. + * Copyright 2013-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/repositories/nestedobject/InnerObjectERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repositories/nestedobject/InnerObjectERHLCIntegrationTests.java index d59baa9c80..bd334d1f6c 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/nestedobject/InnerObjectERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/nestedobject/InnerObjectERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2023 the original author or authors. + * Copyright 2019-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. 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 2881089f5a..0ddfeb47d6 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-2023 the original author or authors. + * Copyright 2014-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. 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 aed063b98f..2e5b985c51 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-2023 the original author or authors. + * Copyright 2022-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/repositories/setting/dynamic/DynamicSettingAndMappingEntityRepositoryERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repositories/setting/dynamic/DynamicSettingAndMappingEntityRepositoryERHLCIntegrationTests.java index bef07f2548..59a38df9f0 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/setting/dynamic/DynamicSettingAndMappingEntityRepositoryERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/setting/dynamic/DynamicSettingAndMappingEntityRepositoryERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2023 the original author or authors. + * Copyright 2019-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. 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 5714085d1e..b310777efe 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-2023 the original author or authors. + * Copyright 2014-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. 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 96c5b44f62..bfba0e65d9 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-2023 the original author or authors. + * Copyright 2022-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/repositories/setting/fielddynamic/FieldDynamicMappingEntityRepositoryERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repositories/setting/fielddynamic/FieldDynamicMappingEntityRepositoryERHLCIntegrationTests.java index fdb41f0a18..2cf4a6495a 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/setting/fielddynamic/FieldDynamicMappingEntityRepositoryERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/setting/fielddynamic/FieldDynamicMappingEntityRepositoryERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2023 the original author or authors. + * Copyright 2019-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. 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 2af4337de7..0cfebd4615 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-2023 the original author or authors. + * Copyright 2014-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. 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 a7bc1d0477..51cc216482 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-2023 the original author or authors. + * Copyright 2022-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/repositories/spel/SpELEntityERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repositories/spel/SpELEntityERHLCIntegrationTests.java index 6bfa0475d2..6b5a3f6bd7 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/spel/SpELEntityERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/spel/SpELEntityERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2023 the original author or authors. + * Copyright 2019-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. 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 1c81ec80e0..6b0791d567 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-2023 the original author or authors. + * Copyright 2014-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. 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 e4ef24e91f..1cbe7e7080 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-2023 the original author or authors. + * Copyright 2022-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/repositories/synonym/SynonymRepositoryERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repositories/synonym/SynonymRepositoryERHLCIntegrationTests.java index 8427542460..1273760d6f 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/synonym/SynonymRepositoryERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/synonym/SynonymRepositoryERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2023 the original author or authors. + * Copyright 2019-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. 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 ec727bc37c..12939f6366 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-2023 the original author or authors. + * Copyright 2014-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. 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 c0d328de6d..b145b0c4b4 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-2023 the original author or authors. + * Copyright 2022-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/repositories/uuidkeyed/UUIDElasticsearchRepositoryERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repositories/uuidkeyed/UUIDElasticsearchRepositoryERHLCIntegrationTests.java index 7aadbf0ea4..af90d5b390 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repositories/uuidkeyed/UUIDElasticsearchRepositoryERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repositories/uuidkeyed/UUIDElasticsearchRepositoryERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2023 the original author or authors. + * Copyright 2019-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. 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 cf7c74cde2..93d474f941 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-2023 the original author or authors. + * Copyright 2013-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. 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 58226af0b9..8154b08c85 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-2023 the original author or authors. + * Copyright 2019-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. 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 ad59df818c..1793705d0c 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-2023 the original author or authors. + * Copyright 2019-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. 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 4c46626963..441cf1e80e 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-2023 the original author or authors. + * 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. 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 454700a0d2..5bd221b5d0 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-2023 the original author or authors. + * 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. 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 14931f3249..b7e9e84a36 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-2023 the original author or authors. + * Copyright 2019-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. 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 af5c911a53..b352432716 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-2023 the original author or authors. + * Copyright 2019-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. 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 20747b986c..f400f39040 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-2023 the original author or authors. + * Copyright 2019-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/repository/query/StubParameterAccessor.java b/src/test/java/org/springframework/data/elasticsearch/repository/query/StubParameterAccessor.java index 69c35f0c14..12177a2838 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repository/query/StubParameterAccessor.java +++ b/src/test/java/org/springframework/data/elasticsearch/repository/query/StubParameterAccessor.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2023 the original author or authors. + * Copyright 2019-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. 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 9f7d2ec7ec..36d49f60ec 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-2023 the original author or authors. + * Copyright 2022-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/repository/query/keywords/QueryKeywordsERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repository/query/keywords/QueryKeywordsERHLCIntegrationTests.java index a367c68b3d..2289a38546 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repository/query/keywords/QueryKeywordsERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repository/query/keywords/QueryKeywordsERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2023 the original author or authors. + * Copyright 2019-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. 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 321d9f4407..d5e2fac6c3 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-2023 the original author or authors. + * Copyright 2016-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. 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 d108368bae..e06d8e0f57 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-2023 the original author or authors. + * Copyright 2022-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/repository/query/keywords/ReactiveQueryKeywordsERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repository/query/keywords/ReactiveQueryKeywordsERHLCIntegrationTests.java index b8d50d9b65..36ef00996d 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repository/query/keywords/ReactiveQueryKeywordsERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repository/query/keywords/ReactiveQueryKeywordsERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 the original author or authors. + * Copyright 2022-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. 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 8a754a4a1d..f4b0d7e78f 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-2023 the original author or authors. + * 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. 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 6cc35425a8..6f4b75c814 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-2023 the original author or authors. + * Copyright 2022-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/repository/query/valueconverter/ReactiveValueConverterERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repository/query/valueconverter/ReactiveValueConverterERHLCIntegrationTests.java index bade7afb39..56f979d95c 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repository/query/valueconverter/ReactiveValueConverterERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repository/query/valueconverter/ReactiveValueConverterERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 the original author or authors. + * Copyright 2022-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. 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 4c48cadbac..c896ff5391 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-2023 the original author or authors. + * Copyright 2022-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. 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 838c060a52..f2c19956b1 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-2023 the original author or authors. + * Copyright 2022-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/repository/query/valueconverter/ValueConverterERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repository/query/valueconverter/ValueConverterERHLCIntegrationTests.java index c1a2a440d9..1edc486ff4 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repository/query/valueconverter/ValueConverterERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repository/query/valueconverter/ValueConverterERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 the original author or authors. + * Copyright 2022-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. 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 01109e8d7a..42802a4d07 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-2023 the original author or authors. + * Copyright 2022-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. 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 76f5d0d216..1e74e478e8 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-2023 the original author or authors. + * Copyright 2014-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. 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 3b65ea37b3..43fdee7b4a 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-2023 the original author or authors. + * Copyright 2022-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchRepositoryERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchRepositoryERHLCIntegrationTests.java index a2b6efd3ba..932a0e3c69 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchRepositoryERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repository/support/ElasticsearchRepositoryERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 the original author or authors. + * Copyright 2022-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. 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 6b0f391936..44346332ee 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-2023 the original author or authors. + * Copyright 2013-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. 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 ff21a21769..eaef4cba41 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-2023 the original author or authors. + * Copyright 2022-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepositoryERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepositoryERHLCIntegrationTests.java index 0d0763ce5b..78a01a4d17 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepositoryERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repository/support/SimpleReactiveElasticsearchRepositoryERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 the original author or authors. + * Copyright 2022-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. 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 69d64f4e64..a5099ed28c 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-2023 the original author or authors. + * Copyright 2019-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. 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 e9358052d8..2e359bc2e9 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 the original author or authors. + * Copyright 2023-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/repository/support/querybyexample/QueryByExampleElasticsearchExecutorERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repository/support/querybyexample/QueryByExampleElasticsearchExecutorERHLCIntegrationTests.java index 4001d13472..a79a798219 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repository/support/querybyexample/QueryByExampleElasticsearchExecutorERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repository/support/querybyexample/QueryByExampleElasticsearchExecutorERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2023 the original author or authors. + * Copyright 2023-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. 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 d56c78ec49..040c2ba84f 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 the original author or authors. + * Copyright 2023-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. 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 68227cca42..9f12e4eec9 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 the original author or authors. + * Copyright 2023-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/repository/support/querybyexample/ReactiveQueryByExampleElasticsearchExecutorERHLCIntegrationTests.java b/src/test/java/org/springframework/data/elasticsearch/repository/support/querybyexample/ReactiveQueryByExampleElasticsearchExecutorERHLCIntegrationTests.java index 96b904a635..f0e7f6904b 100644 --- a/src/test/java/org/springframework/data/elasticsearch/repository/support/querybyexample/ReactiveQueryByExampleElasticsearchExecutorERHLCIntegrationTests.java +++ b/src/test/java/org/springframework/data/elasticsearch/repository/support/querybyexample/ReactiveQueryByExampleElasticsearchExecutorERHLCIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2023 the original author or authors. + * Copyright 2023-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. 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 02764938de..b2a2a960d1 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 the original author or authors. + * Copyright 2023-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. 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 85f6899ea0..841e82b69b 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-2023 the original author or authors. + * 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. 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 a236c98d15..9465491d8b 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-2023 the original author or authors. + * Copyright 2022-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. 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 09c6ba69e7..5e3231c140 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-2023 the original author or authors. + * 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. 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 781a75a801..5104564a4f 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-2023 the original author or authors. + * 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. 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 ef450e1698..002681ff2e 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-2023 the original author or authors. + * Copyright 2020-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/utils/IndexInitializer.java b/src/test/java/org/springframework/data/elasticsearch/utils/IndexInitializer.java index a145fa1fed..c7638639e4 100644 --- a/src/test/java/org/springframework/data/elasticsearch/utils/IndexInitializer.java +++ b/src/test/java/org/springframework/data/elasticsearch/utils/IndexInitializer.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2023 the original author or authors. + * Copyright 2019-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. 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 7df66a4a07..9bd784c836 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-2023 the original author or authors. + * 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. diff --git a/src/test/java/org/springframework/data/elasticsearch/utils/geohash/BitUtil.java b/src/test/java/org/springframework/data/elasticsearch/utils/geohash/BitUtil.java index 8666ef062a..85ad21bf47 100644 --- a/src/test/java/org/springframework/data/elasticsearch/utils/geohash/BitUtil.java +++ b/src/test/java/org/springframework/data/elasticsearch/utils/geohash/BitUtil.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 the original author or authors. + * Copyright 2022-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/utils/geohash/Geohash.java b/src/test/java/org/springframework/data/elasticsearch/utils/geohash/Geohash.java index b1c1eff16f..8631bc9f57 100644 --- a/src/test/java/org/springframework/data/elasticsearch/utils/geohash/Geohash.java +++ b/src/test/java/org/springframework/data/elasticsearch/utils/geohash/Geohash.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 the original author or authors. + * Copyright 2022-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/utils/geohash/Geometry.java b/src/test/java/org/springframework/data/elasticsearch/utils/geohash/Geometry.java index 3cb9735f85..d53b572ba1 100644 --- a/src/test/java/org/springframework/data/elasticsearch/utils/geohash/Geometry.java +++ b/src/test/java/org/springframework/data/elasticsearch/utils/geohash/Geometry.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 the original author or authors. + * Copyright 2022-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/utils/geohash/GeometryValidator.java b/src/test/java/org/springframework/data/elasticsearch/utils/geohash/GeometryValidator.java index 0e5fb71aaa..2a866f454c 100644 --- a/src/test/java/org/springframework/data/elasticsearch/utils/geohash/GeometryValidator.java +++ b/src/test/java/org/springframework/data/elasticsearch/utils/geohash/GeometryValidator.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 the original author or authors. + * Copyright 2022-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/utils/geohash/GeometryVisitor.java b/src/test/java/org/springframework/data/elasticsearch/utils/geohash/GeometryVisitor.java index a8035c0aba..43429505bb 100644 --- a/src/test/java/org/springframework/data/elasticsearch/utils/geohash/GeometryVisitor.java +++ b/src/test/java/org/springframework/data/elasticsearch/utils/geohash/GeometryVisitor.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 the original author or authors. + * Copyright 2022-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/utils/geohash/Point.java b/src/test/java/org/springframework/data/elasticsearch/utils/geohash/Point.java index 47014c9d2f..8a849b0762 100644 --- a/src/test/java/org/springframework/data/elasticsearch/utils/geohash/Point.java +++ b/src/test/java/org/springframework/data/elasticsearch/utils/geohash/Point.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 the original author or authors. + * Copyright 2022-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/utils/geohash/Rectangle.java b/src/test/java/org/springframework/data/elasticsearch/utils/geohash/Rectangle.java index 8bfe0aa206..af187bb88b 100644 --- a/src/test/java/org/springframework/data/elasticsearch/utils/geohash/Rectangle.java +++ b/src/test/java/org/springframework/data/elasticsearch/utils/geohash/Rectangle.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 the original author or authors. + * Copyright 2022-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/utils/geohash/ShapeType.java b/src/test/java/org/springframework/data/elasticsearch/utils/geohash/ShapeType.java index d0472af342..ad0597258f 100644 --- a/src/test/java/org/springframework/data/elasticsearch/utils/geohash/ShapeType.java +++ b/src/test/java/org/springframework/data/elasticsearch/utils/geohash/ShapeType.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 the original author or authors. + * Copyright 2022-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/utils/geohash/StandardValidator.java b/src/test/java/org/springframework/data/elasticsearch/utils/geohash/StandardValidator.java index cc0430bd79..a2b909a312 100644 --- a/src/test/java/org/springframework/data/elasticsearch/utils/geohash/StandardValidator.java +++ b/src/test/java/org/springframework/data/elasticsearch/utils/geohash/StandardValidator.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 the original author or authors. + * Copyright 2022-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/utils/geohash/WellKnownText.java b/src/test/java/org/springframework/data/elasticsearch/utils/geohash/WellKnownText.java index 8a9638ce5d..742f4e2b9f 100644 --- a/src/test/java/org/springframework/data/elasticsearch/utils/geohash/WellKnownText.java +++ b/src/test/java/org/springframework/data/elasticsearch/utils/geohash/WellKnownText.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 the original author or authors. + * Copyright 2022-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. diff --git a/src/test/java/org/springframework/data/elasticsearch/utils/geohash/package-info.java b/src/test/java/org/springframework/data/elasticsearch/utils/geohash/package-info.java index ec82a9f5d0..0f9a90ec4b 100644 --- a/src/test/java/org/springframework/data/elasticsearch/utils/geohash/package-info.java +++ b/src/test/java/org/springframework/data/elasticsearch/utils/geohash/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright 2022-2023 the original author or authors. + * Copyright 2022-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. diff --git a/src/test/resources/testcontainers-elasticsearch.properties b/src/test/resources/testcontainers-elasticsearch.properties index 1580194bc0..8b09f26443 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.7.0 +sde.testcontainers.image-version=8.7.1 # # # 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