Compare commits

...

71 Commits
main ... 5.2.11

Author SHA1 Message Date
Mark Paluch
737650ac54
Release version 5.2.11 (2023.1.11).
See #2980
2024-10-18 10:14:33 +02:00
Mark Paluch
b3f21736b6
Prepare 5.2.11 (2023.1.11).
See #2980
2024-10-18 10:14:17 +02:00
Mark Paluch
fbed601efa
Consistently run all CI steps with the same user.
See #2982
2024-10-09 09:27:26 +02:00
Jens Schauder
5f2d71ef32
After release cleanups.
See #2965
2024-09-13 10:53:00 +02:00
Jens Schauder
2904427e9b
Prepare next development iteration.
See #2965
2024-09-13 10:52:59 +02:00
Jens Schauder
167f2246d3
Release version 5.2.10 (2023.1.10).
See #2965
2024-09-13 10:50:08 +02:00
Jens Schauder
f09ce87f0e
Prepare 5.2.10 (2023.1.10).
See #2965
2024-09-13 10:49:51 +02:00
Peter-Josef Meisch
1d5c78a06a
Remove Blockhound
Original Pull Request #2978
Closes #2977

(cherry picked from commit d06c122fd55e55b8886b1d3a3389516b08066784)
(cherry picked from commit 8117e5a174c6d1b4ad52995744368291acb5c191)
2024-09-04 18:19:22 +02:00
Peter-Josef Meisch
5a2dcd3b01
Add excludeFromSource handling to multifield.
Original Pull Request #2975
Closes #2971

(cherry picked from commit 555b5702467a904ecd40bac486d3ba4bdb71a744)
(cherry picked from commit a179dd06431ce7457d24c13902ba65477f7a92af)
2024-08-31 21:36:11 +02:00
Jens Schauder
74b05d21b5
After release cleanups.
See #2938
2024-08-16 09:01:34 +02:00
Jens Schauder
1895219322
Prepare next development iteration.
See #2938
2024-08-16 09:01:33 +02:00
Jens Schauder
bd62128b52
Release version 5.2.9 (2023.1.9).
See #2938
2024-08-16 08:58:34 +02:00
Jens Schauder
16eb208d77
Prepare 5.2.9 (2023.1.9).
See #2938
2024-08-16 08:58:12 +02:00
Mark Paluch
0575323975
Update CI properties.
See #2938
2024-08-08 10:17:45 +02:00
Mark Paluch
4289f73b24
Upgrade to Maven Wrapper 3.9.8.
See #2957
2024-08-08 10:17:24 +02:00
Eric Haag
7f246724d2
Migrate build to Spring Develocity Conventions extension.
* Migrate build to Spring Develocity Conventions extension.

* Adopt Develocity environment variables.

Closes #2944
2024-08-01 14:54:29 +02:00
Mark Paluch
ce6b4d853f
Bundle Javadoc with Antora documentation site.
Closes #2948.
2024-07-31 14:53:30 +02:00
Jens Schauder
c87d106074
After release cleanups.
See #2931
2024-07-12 13:36:35 +02:00
Jens Schauder
bf21b697ca
Prepare next development iteration.
See #2931
2024-07-12 13:36:34 +02:00
Jens Schauder
eead581ff0
Release version 5.2.8 (2023.1.8).
See #2931
2024-07-12 13:33:06 +02:00
Jens Schauder
aef71db320
Prepare 5.2.8 (2023.1.8).
See #2931
2024-07-12 13:32:46 +02:00
Mark Paluch
452c76fb12
Switch to Broadcom docker proxy.
Closes #2934
2024-06-20 11:21:14 +02:00
Mark Paluch
c9a47997b9
After release cleanups.
See #2912
2024-06-14 10:06:43 +02:00
Mark Paluch
4a42c673ce
Prepare next development iteration.
See #2912
2024-06-14 10:06:42 +02:00
Mark Paluch
4729b9cfdc
Release version 5.2.7 (2023.1.7).
See #2912
2024-06-14 10:04:22 +02:00
Mark Paluch
aa16c0c5ab
Prepare 5.2.7 (2023.1.7).
See #2912
2024-06-14 10:04:05 +02:00
Peter-Josef Meisch
5e507fa163
Fix max dim value for dense vector.
Closes #2911

(cherry picked from commit e997b39f68bc0967c06c27a43e52b83afdb0b522)
(cherry picked from commit ba9edf8ec85f05cf2f1bdc3ead6598b3df3d04db)
2024-05-18 18:27:59 +02:00
Mark Paluch
a355537d78
After release cleanups.
See #2895
2024-05-17 11:24:38 +02:00
Mark Paluch
4fbf9f8b5a
Prepare next development iteration.
See #2895
2024-05-17 11:24:37 +02:00
Mark Paluch
2cb27c26d7
Release version 5.2.6 (2023.1.6).
See #2895
2024-05-17 11:22:24 +02:00
Mark Paluch
c322797eab
Prepare 5.2.6 (2023.1.6).
See #2895
2024-05-17 11:22:00 +02:00
Peter-Josef Meisch
c81958f62d
Fix implementation of explicit refresh policy.
Original Pull Request #2908
Closes #2907

(cherry picked from commit 94a40a7a752b6cf797d3e75fffe128f77f1c8468)
2024-05-10 09:35:20 +02:00
Peter-Josef Meisch
ed18be6f1c
Fix parameter in Order constructor.
Closes #2897

(cherry picked from commit ad66510e9e660577a2b8dff9e458d507e4351a42)
2024-04-15 21:11:35 +02:00
Mark Paluch
b3a21fbb7c
After release cleanups.
See #2873
2024-04-12 10:17:29 +02:00
Mark Paluch
d874b9d000
Prepare next development iteration.
See #2873
2024-04-12 10:17:28 +02:00
Mark Paluch
36e6a4b328
Release version 5.2.5 (2023.1.5).
See #2873
2024-04-12 10:15:11 +02:00
Mark Paluch
3710e47abd
Prepare 5.2.5 (2023.1.5).
See #2873
2024-04-12 10:14:56 +02:00
Mark Paluch
c40abc267b
After release cleanups.
See #2850
2024-03-15 10:20:09 +01:00
Mark Paluch
b479184d83
Prepare next development iteration.
See #2850
2024-03-15 10:20:08 +01:00
Mark Paluch
f2370bc7df
Release version 5.2.4 (2023.1.4).
See #2850
2024-03-15 10:17:49 +01:00
Mark Paluch
5f045d104e
Prepare 5.2.4 (2023.1.4).
See #2850
2024-03-15 10:17:30 +01:00
Peter-Josef Meisch
b52e8d1431
Fix setting setting id in bulkrequest.
Original Pull Request #2862
Closes #2861

(cherry picked from commit debf04b4996d4bebf67aef36d3927ad55731903c)
2024-02-28 21:45:49 +01:00
Mark Paluch
e86bb771be
After release cleanups.
See #2825
2024-02-16 13:53:53 +01:00
Mark Paluch
c9fbc17109
Prepare next development iteration.
See #2825
2024-02-16 13:53:51 +01:00
Mark Paluch
397e155d5e
Release version 5.2.3 (2023.1.3).
See #2825
2024-02-16 13:50:30 +01:00
Mark Paluch
4e52594d12
Prepare 5.2.3 (2023.1.3).
See #2825
2024-02-16 13:50:02 +01:00
Peter-Josef Meisch
310f0ed567
Fix criteria filter in native query.
Original Pull Request #2846
Closes #2840

(cherry picked from commit e9ecebd9efbe852249e1b2afea4733bb6ea5daee)
2024-02-06 21:23:50 +01:00
Peter-Josef Meisch
dab0be04db
Fix store null values implementation.
Original Pull Request #2842

(cherry picked from commit 0a1e20579ecd767fa161c5dd5a3988c38fa62225)
2024-01-31 17:32:41 +01:00
Mark Paluch
e8f269d9ec
Refine Artifactory build name.
See #2772
2024-01-31 15:13:58 +01:00
Peter-Josef Meisch
1e9824ae2d
Upgrade to Elasticsearch 8.11.4.
Original Pull Request #2829
Closes #2827
2024-01-19 07:18:40 +01:00
Mark Paluch
c9b8b3f33d
After release cleanups.
See #2804
2024-01-12 10:54:33 +01:00
Mark Paluch
a806553169
Prepare next development iteration.
See #2804
2024-01-12 10:54:32 +01:00
Mark Paluch
27011d382b
Release version 5.2.2 (2023.1.2).
See #2804
2024-01-12 10:51:32 +01:00
Mark Paluch
489a2605b4
Prepare 5.2.2 (2023.1.2).
See #2804
2024-01-12 10:50:44 +01:00
Peter-Josef Meisch
953f840d7c
Upgrade to Elasticsearch 8.11.3.
Original Pull Request #2823
Closes #2821
2024-01-06 17:37:27 +01:00
Mark Paluch
d905a4b25f
Extend license header copyright years to 2024.
See #2818
2024-01-02 13:54:48 +01:00
Peter-Josef Meisch
e2e6b5005b
Make org.springframework.data.elasticsearch.client.elc.ReactiveElasticsearchTemplate.ClientCallback public.
Original Pull Request #2815
Closes #2814

(cherry picked from commit 260dadd4d648b87dda5d18cc90ae457cce497735)
2023-12-29 13:57:56 +01:00
Peter-Josef Meisch
0d4e8ad6eb
Upgrade to Elasticsearch 8.11.2.
Original Pull Request #2809
2023-12-24 14:31:20 +01:00
Mark Paluch
a9bacd23b0
After release cleanups.
See #2771
2023-12-15 14:15:21 +01:00
Mark Paluch
031f7c8c78
Prepare next development iteration.
See #2771
2023-12-15 14:15:19 +01:00
Mark Paluch
76187a4934
Release version 5.2.1 (2023.1.1).
See #2771
2023-12-15 14:11:53 +01:00
Mark Paluch
b693494e17
Prepare 5.2.1 (2023.1.1).
See #2771
2023-12-15 14:11:23 +01:00
Mark Paluch
b324935d22
Update CI properties.
See #2771
2023-12-14 08:49:56 +01:00
Mark Paluch
920f7c029f
Upgrade to Maven Wrapper 3.9.6.
See #2799
2023-12-14 08:34:15 +01:00
Peter-Josef Meisch
051777ee25
Removed junk characters from code.
(cherry picked from commit 415d5e0385fa00709fcc599b0087a77c80a79270)
2023-11-30 20:44:26 +01:00
Peter-Josef Meisch
0fb98eda39
Fix type of returned sort values.
Original Pull Request #2786
Closes #2777

(cherry picked from commit 3833975a1ad76ef9c90b1260b090ff1eb9af523c)
2023-11-30 20:44:25 +01:00
Mark Paluch
df76b43cb4
Introduce property for Jenkins user and Artifactory server details.
Closes #2781
2023-11-27 14:23:49 +01:00
Runbing
b681197d0f
Fixed the URL for the Spring Data Commons documentation.
I fixed broken links in the Spring Data Elasticsearch documentation for Spring Data Commons.

Closes #2776
2023-11-20 11:31:58 +01:00
Mark Paluch
8a1323c11a
Update CI trigger versions.
See #2737
2023-11-17 14:53:43 +01:00
Mark Paluch
033d71ccb6
After release cleanups.
See #2737
2023-11-17 14:33:56 +01:00
Mark Paluch
0ae2a52de8
Prepare next development iteration.
See #2737
2023-11-17 14:33:54 +01:00
575 changed files with 993 additions and 915 deletions

3
.gitignore vendored
View File

@ -30,7 +30,6 @@ target
build/ build/
node_modules node_modules
node node
package.json
package-lock.json package-lock.json
.mvn/.gradle-enterprise .mvn/.develocity

View File

@ -1,13 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<extensions> <extensions>
<extension> <extension>
<groupId>com.gradle</groupId> <groupId>io.spring.develocity.conventions</groupId>
<artifactId>gradle-enterprise-maven-extension</artifactId> <artifactId>develocity-conventions-maven-extension</artifactId>
<version>1.19.2</version> <version>0.0.19</version>
</extension>
<extension>
<groupId>com.gradle</groupId>
<artifactId>common-custom-user-data-maven-extension</artifactId>
<version>1.12.4</version>
</extension> </extension>
</extensions> </extensions>

View File

@ -1,31 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<gradleEnterprise
xmlns="https://www.gradle.com/gradle-enterprise-maven" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://www.gradle.com/gradle-enterprise-maven https://www.gradle.com/schema/gradle-enterprise-maven.xsd">
<server>
<url>https://ge.spring.io</url>
</server>
<buildScan>
<backgroundBuildScanUpload>false</backgroundBuildScanUpload>
<captureGoalInputFiles>true</captureGoalInputFiles>
<publishIfAuthenticated>true</publishIfAuthenticated>
<obfuscation>
<ipAddresses>#{{'0.0.0.0'}}</ipAddresses>
</obfuscation>
</buildScan>
<buildCache>
<local>
<enabled>true</enabled>
</local>
<remote>
<server>
<credentials>
<username>${env.GRADLE_ENTERPRISE_CACHE_USERNAME}</username>
<password>${env.GRADLE_ENTERPRISE_CACHE_PASSWORD}</password>
</credentials>
</server>
<enabled>true</enabled>
<storeEnabled>#{env['GRADLE_ENTERPRISE_CACHE_USERNAME'] != null and env['GRADLE_ENTERPRISE_CACHE_PASSWORD'] != null}</storeEnabled>
</remote>
</buildCache>
</gradleEnterprise>

View File

@ -1,3 +1,3 @@
#Wed Oct 04 16:58:13 PDT 2023 #Thu Aug 08 10:17:24 CEST 2024
wrapperUrl=https\://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar 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.5/apache-maven-3.9.5-bin.zip distributionUrl=https\://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.8/apache-maven-3.9.8-bin.zip

50
Jenkinsfile vendored
View File

@ -9,7 +9,7 @@ pipeline {
triggers { triggers {
pollSCM 'H/10 * * * *' pollSCM 'H/10 * * * *'
upstream(upstreamProjects: "spring-data-commons/main", threshold: hudson.model.Result.SUCCESS) upstream(upstreamProjects: "spring-data-commons/3.2.x", threshold: hudson.model.Result.SUCCESS)
} }
options { options {
@ -33,15 +33,16 @@ pipeline {
environment { environment {
ARTIFACTORY = credentials("${p['artifactory.credentials']}") ARTIFACTORY = credentials("${p['artifactory.credentials']}")
DEVELOCITY_CACHE = credentials("${p['develocity.cache.credentials']}")
DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}") DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}")
} }
steps { steps {
script { script {
docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.docker']) { docker.withRegistry(p['docker.proxy.registry'], p['docker.proxy.credentials']) {
sh 'PROFILE=none ci/verify.sh' docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.docker']) {
sh "ci/clean.sh" sh "PROFILE=none JENKINS_USER_NAME=${p['jenkins.user.name']} ci/verify.sh"
sh "JENKINS_USER_NAME=${p['jenkins.user.name']} ci/clean.sh"
}
} }
} }
} }
@ -63,14 +64,15 @@ pipeline {
options { timeout(time: 30, unit: 'MINUTES') } options { timeout(time: 30, unit: 'MINUTES') }
environment { environment {
ARTIFACTORY = credentials("${p['artifactory.credentials']}") ARTIFACTORY = credentials("${p['artifactory.credentials']}")
DEVELOCITY_CACHE = credentials("${p['develocity.cache.credentials']}")
DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}") DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}")
} }
steps { steps {
script { script {
docker.image(p['docker.java.next.image']).inside(p['docker.java.inside.docker']) { docker.withRegistry(p['docker.proxy.registry'], p['docker.proxy.credentials']) {
sh 'PROFILE=none ci/verify.sh' docker.image(p['docker.java.next.image']).inside(p['docker.java.inside.docker']) {
sh "ci/clean.sh" sh "PROFILE=none JENKINS_USER_NAME=${p['jenkins.user.name']} ci/verify.sh"
sh "JENKINS_USER_NAME=${p['jenkins.user.name']} ci/clean.sh"
}
} }
} }
} }
@ -90,28 +92,26 @@ pipeline {
label 'data' label 'data'
} }
options { timeout(time: 20, unit: 'MINUTES') } options { timeout(time: 20, unit: 'MINUTES') }
environment { environment {
ARTIFACTORY = credentials("${p['artifactory.credentials']}") ARTIFACTORY = credentials("${p['artifactory.credentials']}")
DEVELOCITY_CACHE = credentials("${p['develocity.cache.credentials']}")
DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}") DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}")
} }
steps { steps {
script { script {
docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.basic']) { docker.withRegistry(p['docker.proxy.registry'], p['docker.proxy.credentials']) {
sh 'MAVEN_OPTS="-Duser.name=spring-builds+jenkins -Duser.home=/tmp/jenkins-home" ' + docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.docker']) {
'DEVELOCITY_CACHE_USERNAME=${DEVELOCITY_CACHE_USR} ' + sh 'MAVEN_OPTS="-Duser.name=' + "${p['jenkins.user.name']}" + ' -Duser.home=/tmp/jenkins-home" ' +
'DEVELOCITY_CACHE_PASSWORD=${DEVELOCITY_CACHE_PSW} ' + "./mvnw -s settings.xml -Pci,artifactory " +
'GRADLE_ENTERPRISE_ACCESS_KEY=${DEVELOCITY_ACCESS_KEY} ' + "-Ddevelocity.storage.directory=/tmp/jenkins-home/.develocity-root " +
'./mvnw -s settings.xml -Pci,artifactory -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-elasticsearch-non-root ' + "-Dartifactory.server=${p['artifactory.url']} " +
'-Dartifactory.server=https://repo.spring.io ' + "-Dartifactory.username=${ARTIFACTORY_USR} " +
"-Dartifactory.username=${ARTIFACTORY_USR} " + "-Dartifactory.password=${ARTIFACTORY_PSW} " +
"-Dartifactory.password=${ARTIFACTORY_PSW} " + "-Dartifactory.staging-repository=${p['artifactory.repository.snapshot']} " +
"-Dartifactory.staging-repository=libs-snapshot-local " + "-Dartifactory.build-name=spring-data-elasticsearch " +
"-Dartifactory.build-name=spring-data-elasticsearch " + "-Dartifactory.build-number=spring-data-elasticsearch-${BRANCH_NAME}-build-${BUILD_NUMBER} " +
"-Dartifactory.build-number=${BUILD_NUMBER} " + "-Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-elasticsearch " +
'-Dmaven.test.skip=true clean deploy -U -B' "-Dmaven.test.skip=true clean deploy -U -B"
}
} }
} }
} }

View File

@ -2,11 +2,7 @@
set -euo pipefail set -euo pipefail
export DEVELOCITY_CACHE_USERNAME=${DEVELOCITY_CACHE_USR} export JENKINS_USER=${JENKINS_USER_NAME}
export DEVELOCITY_CACHE_PASSWORD=${DEVELOCITY_CACHE_PSW}
# The environment variable to configure access key is still GRADLE_ENTERPRISE_ACCESS_KEY MAVEN_OPTS="-Duser.name=${JENKINS_USER} -Duser.home=/tmp/jenkins-home" \
export GRADLE_ENTERPRISE_ACCESS_KEY=${DEVELOCITY_ACCESS_KEY} ./mvnw -s settings.xml clean -Dscan=false -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-elasticsearch -Ddevelocity.storage.directory=/tmp/jenkins-home/.develocity-root
MAVEN_OPTS="-Duser.name=spring-builds+jenkins -Duser.home=/tmp/jenkins-home" \
./mvnw -s settings.xml clean -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-elasticsearch

View File

@ -1,10 +1,10 @@
# Java versions # Java versions
java.main.tag=17.0.8_7-jdk-focal java.main.tag=17.0.12_7-jdk-focal
java.next.tag=21_35-jdk-jammy java.next.tag=22.0.2_9-jdk-jammy
# Docker container images - standard # Docker container images - standard
docker.java.main.image=harbor-repo.vmware.com/dockerhub-proxy-cache/library/eclipse-temurin:${java.main.tag} docker.java.main.image=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.next.image=library/eclipse-temurin:${java.next.tag}
# Supported versions of MongoDB # Supported versions of MongoDB
docker.mongodb.4.4.version=4.4.25 docker.mongodb.4.4.version=4.4.25
@ -25,6 +25,10 @@ docker.java.inside.docker=-u root -v /var/run/docker.sock:/var/run/docker.sock -
# Credentials # Credentials
docker.registry= docker.registry=
docker.credentials=hub.docker.com-springbuildmaster 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.credentials=02bd1690-b54f-4c9f-819d-a77cb7a9822c
develocity.cache.credentials=gradle_enterprise_cache_user artifactory.url=https://repo.spring.io
artifactory.repository.snapshot=libs-snapshot-local
develocity.access-key=gradle_enterprise_secret_access_key develocity.access-key=gradle_enterprise_secret_access_key
jenkins.user.name=spring-builds+jenkins

View File

@ -3,14 +3,8 @@
set -euo pipefail set -euo pipefail
mkdir -p /tmp/jenkins-home/.m2/spring-data-elasticsearch mkdir -p /tmp/jenkins-home/.m2/spring-data-elasticsearch
chown -R 1001:1001 . export JENKINS_USER=${JENKINS_USER_NAME}
export DEVELOCITY_CACHE_USERNAME=${DEVELOCITY_CACHE_USR} MAVEN_OPTS="-Duser.name=${JENKINS_USER} -Duser.home=/tmp/jenkins-home" \
export DEVELOCITY_CACHE_PASSWORD=${DEVELOCITY_CACHE_PSW}
# The environment variable to configure access key is still GRADLE_ENTERPRISE_ACCESS_KEY
export GRADLE_ENTERPRISE_ACCESS_KEY=${DEVELOCITY_ACCESS_KEY}
MAVEN_OPTS="-Duser.name=spring-builds+jenkins -Duser.home=/tmp/jenkins-home" \
./mvnw -s settings.xml \ ./mvnw -s settings.xml \
-P${PROFILE} clean dependency:list verify -Dsort -U -B -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-elasticsearch -P${PROFILE} clean dependency:list verify -Dsort -U -B -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-elasticsearch -Ddevelocity.storage.directory=/tmp/jenkins-home/.develocity-root

10
package.json Normal file
View File

@ -0,0 +1,10 @@
{
"dependencies": {
"antora": "3.2.0-alpha.6",
"@antora/atlas-extension": "1.0.0-alpha.2",
"@antora/collector-extension": "1.0.0-alpha.7",
"@asciidoctor/tabs": "1.0.0-beta.6",
"@springio/antora-extensions": "1.13.0",
"@springio/asciidoctor-extensions": "1.0.0-alpha.11"
}
}

37
pom.xml
View File

@ -5,12 +5,12 @@
<groupId>org.springframework.data</groupId> <groupId>org.springframework.data</groupId>
<artifactId>spring-data-elasticsearch</artifactId> <artifactId>spring-data-elasticsearch</artifactId>
<version>5.2.0</version> <version>5.2.11</version>
<parent> <parent>
<groupId>org.springframework.data.build</groupId> <groupId>org.springframework.data.build</groupId>
<artifactId>spring-data-parent</artifactId> <artifactId>spring-data-parent</artifactId>
<version>3.2.0</version> <version>3.2.11</version>
</parent> </parent>
<name>Spring Data Elasticsearch</name> <name>Spring Data Elasticsearch</name>
@ -18,12 +18,11 @@
<url>https://github.com/spring-projects/spring-data-elasticsearch</url> <url>https://github.com/spring-projects/spring-data-elasticsearch</url>
<properties> <properties>
<springdata.commons>3.2.0</springdata.commons> <springdata.commons>3.2.11</springdata.commons>
<!-- version of the ElasticsearchClient --> <!-- version of the ElasticsearchClient -->
<elasticsearch-java>8.11.1</elasticsearch-java> <elasticsearch-java>8.11.4</elasticsearch-java>
<blockhound-junit>1.0.8.RELEASE</blockhound-junit>
<hoverfly>0.14.4</hoverfly> <hoverfly>0.14.4</hoverfly>
<log4j>2.18.0</log4j> <log4j>2.18.0</log4j>
<jsonassert>1.5.1</jsonassert> <jsonassert>1.5.1</jsonassert>
@ -248,13 +247,6 @@
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>io.projectreactor.tools</groupId>
<artifactId>blockhound-junit-platform</artifactId>
<version>${blockhound-junit}</version>
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>org.skyscreamer</groupId> <groupId>org.skyscreamer</groupId>
<artifactId>jsonassert</artifactId> <artifactId>jsonassert</artifactId>
@ -436,25 +428,6 @@
</build> </build>
</profile> </profile>
<profile>
<id>jdk13+</id>
<!-- on jDK13+, Blockhound needs this JVM flag set -->
<activation>
<jdk>[13,)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>-XX:+AllowRedefinitionToAddDeleteMethods</argLine>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile> <profile>
<id>antora-process-resources</id> <id>antora-process-resources</id>
<build> <build>
@ -472,7 +445,7 @@
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
<groupId>io.spring.maven.antora</groupId> <groupId>org.antora</groupId>
<artifactId>antora-maven-plugin</artifactId> <artifactId>antora-maven-plugin</artifactId>
</plugin> </plugin>
</plugins> </plugins>

View File

@ -3,8 +3,7 @@
# The purpose of this Antora playbook is to build the docs in the current branch. # The purpose of this Antora playbook is to build the docs in the current branch.
antora: antora:
extensions: extensions:
- '@antora/collector-extension' - require: '@springio/antora-extensions'
- require: '@springio/antora-extensions/root-component-extension'
root_component_name: 'data-elasticsearch' root_component_name: 'data-elasticsearch'
site: site:
title: Spring Data Elasticsearch title: Spring Data Elasticsearch
@ -22,13 +21,12 @@ content:
start_path: src/main/antora start_path: src/main/antora
asciidoc: asciidoc:
attributes: attributes:
page-pagination: ''
hide-uri-scheme: '@' hide-uri-scheme: '@'
tabs-sync-option: '@' tabs-sync-option: '@'
chomp: 'all'
extensions: extensions:
- '@asciidoctor/tabs' - '@asciidoctor/tabs'
- '@springio/asciidoctor-extensions' - '@springio/asciidoctor-extensions'
- '@springio/asciidoctor-extensions/javadoc-extension'
sourcemap: true sourcemap: true
urls: urls:
latest_version_segment: '' latest_version_segment: ''
@ -38,5 +36,5 @@ runtime:
format: pretty format: pretty
ui: ui:
bundle: bundle:
url: https://github.com/spring-io/antora-ui-spring/releases/download/v0.3.5/ui-bundle.zip url: https://github.com/spring-io/antora-ui-spring/releases/download/v0.4.16/ui-bundle.zip
snapshot: true snapshot: true

View File

@ -10,3 +10,8 @@ ext:
local: true local: true
scan: scan:
dir: target/classes/ dir: target/classes/
- run:
command: ./mvnw package -Pdistribute
local: true
scan:
dir: target/antora

View File

@ -39,4 +39,5 @@
** xref:repositories/query-keywords-reference.adoc[] ** xref:repositories/query-keywords-reference.adoc[]
** xref:repositories/query-return-types-reference.adoc[] ** xref:repositories/query-return-types-reference.adoc[]
* https://github.com/spring-projects/spring-data-commons/wiki[Wiki] * xref:attachment$api/java/index.html[Javadoc,role=link-external,window=_blank]
* https://github.com/spring-projects/spring-data-commons/wiki[Wiki,role=link-external,window=_blank]

View File

@ -31,7 +31,7 @@ public class MyClientConfig extends ElasticsearchConfiguration {
<.> for a detailed description of the builder methods see xref:elasticsearch/clients.adoc#elasticsearch.clients.configuration[Client Configuration] <.> for a detailed description of the builder methods see xref:elasticsearch/clients.adoc#elasticsearch.clients.configuration[Client Configuration]
==== ====
The `ElasticsearchConfiguration` class allows further configuration by overriding for example the `jsonpMapper()` or `transportOptions()` methods. The javadoc:org.springframework.data.elasticsearch.client.elc.ElasticsearchConfiguration[]] class allows further configuration by overriding for example the `jsonpMapper()` or `transportOptions()` methods.
The following beans can then be injected in other Spring components: The following beans can then be injected in other Spring components:
@ -52,13 +52,13 @@ RestClient restClient; <.>
JsonpMapper jsonpMapper; <.> JsonpMapper jsonpMapper; <.>
---- ----
<.> an implementation of `ElasticsearchOperations` <.> an implementation of javadoc:org.springframework.data.elasticsearch.core.ElasticsearchOperations[]
<.> the `co.elastic.clients.elasticsearch.ElasticsearchClient` that is used. <.> the `co.elastic.clients.elasticsearch.ElasticsearchClient` that is used.
<.> the low level `RestClient` from the Elasticsearch libraries <.> the low level `RestClient` from the Elasticsearch libraries
<.> the `JsonpMapper` user by the Elasticsearch `Transport` <.> the `JsonpMapper` user by the Elasticsearch `Transport`
==== ====
Basically one should just use the `ElasticsearchOperations` to interact with the Elasticsearch cluster. Basically one should just use the javadoc:org.springframework.data.elasticsearch.core.ElasticsearchOperations[] to interact with the Elasticsearch cluster.
When using repositories, this instance is used under the hood as well. When using repositories, this instance is used under the hood as well.
[[elasticsearch.clients.reactiverestclient]] [[elasticsearch.clients.reactiverestclient]]
@ -86,7 +86,7 @@ public class MyClientConfig extends ReactiveElasticsearchConfiguration {
<.> for a detailed description of the builder methods see xref:elasticsearch/clients.adoc#elasticsearch.clients.configuration[Client Configuration] <.> for a detailed description of the builder methods see xref:elasticsearch/clients.adoc#elasticsearch.clients.configuration[Client Configuration]
==== ====
The `ReactiveElasticsearchConfiguration` class allows further configuration by overriding for example the `jsonpMapper()` or `transportOptions()` methods. The javadoc:org.springframework.data.elasticsearch.client.elc.ReactiveElasticsearchConfiguration[] class allows further configuration by overriding for example the `jsonpMapper()` or `transportOptions()` methods.
The following beans can then be injected in other Spring components: The following beans can then be injected in other Spring components:
@ -108,20 +108,20 @@ JsonpMapper jsonpMapper; <.>
the following can be injected: the following can be injected:
<.> an implementation of `ReactiveElasticsearchOperations` <.> an implementation of javadoc:org.springframework.data.elasticsearch.core.ReactiveElasticsearchOperations[]
<.> the `org.springframework.data.elasticsearch.client.elc.ReactiveElasticsearchClient` that is used. <.> the `org.springframework.data.elasticsearch.client.elc.ReactiveElasticsearchClient` that is used.
This is a reactive implementation based on the Elasticsearch client implementation. This is a reactive implementation based on the Elasticsearch client implementation.
<.> the low level `RestClient` from the Elasticsearch libraries <.> the low level `RestClient` from the Elasticsearch libraries
<.> the `JsonpMapper` user by the Elasticsearch `Transport` <.> the `JsonpMapper` user by the Elasticsearch `Transport`
==== ====
Basically one should just use the `ReactiveElasticsearchOperations` to interact with the Elasticsearch cluster. Basically one should just use the javadoc:org.springframework.data.elasticsearch.core.ReactiveElasticsearchOperations[] to interact with the Elasticsearch cluster.
When using repositories, this instance is used under the hood as well. When using repositories, this instance is used under the hood as well.
[[elasticsearch.clients.configuration]] [[elasticsearch.clients.configuration]]
== Client Configuration == Client Configuration
Client behaviour can be changed via the `ClientConfiguration` that allows to set options for SSL, connect and socket timeouts, headers and other parameters. Client behaviour can be changed via the javadoc:org.springframework.data.elasticsearch.client.ClientConfiguration[] that allows to set options for SSL, connect and socket timeouts, headers and other parameters.
.Client Configuration .Client Configuration
==== ====
@ -178,7 +178,7 @@ If this is used in the reactive setup, the supplier function *must not* block!
[[elasticsearch.clients.configuration.callbacks]] [[elasticsearch.clients.configuration.callbacks]]
=== Client configuration callbacks === Client configuration callbacks
The `ClientConfiguration` class offers the most common parameters to configure the client. The javadoc:org.springframework.data.elasticsearch.client.ClientConfiguration[] class offers the most common parameters to configure the client.
In the case this is not enough, the user can add callback functions by using the `withClientConfigurer(ClientConfigurationCallback<?>)` method. In the case this is not enough, the user can add callback functions by using the `withClientConfigurer(ClientConfigurationCallback<?>)` method.
The following callbacks are provided: The following callbacks are provided:

View File

@ -1,6 +1,14 @@
[[new-features]] [[new-features]]
= What's new = What's new
[[new-features.5-2-3]]
== New in Spring Data Elasticsearch 5.2.2
* Upgrade to Elasticsearch 8.11.4
[[new-features.5-2-2]]
== New in Spring Data Elasticsearch 5.2.2
* Upgrade to Elasticsearch 8.11.3
[[new-features.5-2-0]] [[new-features.5-2-0]]
== New in Spring Data Elasticsearch 5.2 == New in Spring Data Elasticsearch 5.2

View File

@ -3,10 +3,10 @@
Spring Data Elasticsearch uses several interfaces to define the operations that can be called against an Elasticsearch index (for a description of the reactive interfaces see xref:elasticsearch/reactive-template.adoc[]). Spring Data Elasticsearch uses several interfaces to define the operations that can be called against an Elasticsearch index (for a description of the reactive interfaces see xref:elasticsearch/reactive-template.adoc[]).
* `IndexOperations` defines actions on index level like creating or deleting an index. * javadoc:org.springframework.data.elasticsearch.core.IndexOperations[] defines actions on index level like creating or deleting an index.
* `DocumentOperations` defines actions to store, update and retrieve entities based on their id. * javadoc:org.springframework.data.elasticsearch.core.DocumentOperations[] defines actions to store, update and retrieve entities based on their id.
* `SearchOperations` define the actions to search for multiple entities using queries * javadoc:org.springframework.data.elasticsearch.core.SearchOperations[] define the actions to search for multiple entities using queries
* `ElasticsearchOperations` combines the `DocumentOperations` and `SearchOperations` interfaces. * javadoc:org.springframework.data.elasticsearch.core.ElasticsearchOperations[] combines the `DocumentOperations` and `SearchOperations` interfaces.
These interfaces correspond to the structuring of the https://www.elastic.co/guide/en/elasticsearch/reference/current/rest-apis.html[Elasticsearch API]. These interfaces correspond to the structuring of the https://www.elastic.co/guide/en/elasticsearch/reference/current/rest-apis.html[Elasticsearch API].

View File

@ -1,24 +1,23 @@
[[preface.versions]] [[preface.versions]]
= Versions = Versions
The following table shows the Elasticsearch versions that are used by Spring Data release trains and version of Spring Data Elasticsearch included in that, as well as the Spring Boot versions referring to that particular Spring Data release train. The following table shows the Elasticsearch and Spring versions that are used by Spring Data release trains and the version of Spring Data Elasticsearch included in that.
The Elasticsearch version given shows with which client libraries Spring Data Elasticsearch was built and tested.
[cols="^,^,^,^,^",options="header"] [cols="^,^,^,^",options="header"]
|=== |===
| Spring Data Release Train | Spring Data Elasticsearch | Elasticsearch | Spring Framework | Spring Boot | Spring Data Release Train | Spring Data Elasticsearch | Elasticsearch | Spring Framework
| 2023.1 (Vaughan) | 5.2.x | 8.11.1 | 6.1.x | 3.2.x | 2023.1 (Vaughan) | 5.2.x | 8.11.4 | 6.1.x
| 2023.0 (Ullmann) | 5.1.x | 8.7.1 | 6.0.x | 3.1.x | 2023.0 (Ullmann) | 5.1.x | 8.7.1 | 6.0.x
| 2022.0 (Turing) | 5.0.xfootnote:oom[Out of maintenance] | 8.5.3 | 6.0.x | 3.0.x | 2022.0 (Turing) | 5.0.xfootnote:oom[Out of maintenance] | 8.5.3 | 6.0.x
| 2021.2 (Raj) | 4.4.xfootnote:oom[] | 7.17.3 | 5.3.x | 2.7.x | 2021.2 (Raj) | 4.4.xfootnote:oom[] | 7.17.3 | 5.3.x
| 2021.1 (Q) | 4.3.xfootnote:oom[] | 7.15.2 | 5.3.x | 2.6.x | 2021.1 (Q) | 4.3.xfootnote:oom[] | 7.15.2 | 5.3.x
| 2021.0 (Pascal) | 4.2.xfootnote:oom[] | 7.12.0 | 5.3.x | 2.5.x | 2021.0 (Pascal) | 4.2.xfootnote:oom[] | 7.12.0 | 5.3.x
| 2020.0 (Ockham) | 4.1.xfootnote:oom[] | 7.9.3 | 5.3.2 | 2.4.x | 2020.0 (Ockham) | 4.1.xfootnote:oom[] | 7.9.3 | 5.3.2
| Neumann | 4.0.xfootnote:oom[] | 7.6.2 | 5.2.12 |2.3.x | Neumann | 4.0.xfootnote:oom[] | 7.6.2 | 5.2.12
| Moore | 3.2.xfootnote:oom[] |6.8.12 | 5.2.12| 2.2.x | Moore | 3.2.xfootnote:oom[] |6.8.12 | 5.2.12
| Lovelace | 3.1.xfootnote:oom[] | 6.2.2 | 5.1.19 |2.1.x | Lovelace | 3.1.xfootnote:oom[] | 6.2.2 | 5.1.19
| Kay | 3.0.xfootnote:oom[] | 5.5.0 | 5.0.13 | 2.0.x | Kay | 3.0.xfootnote:oom[] | 5.5.0 | 5.0.13
| Ingalls | 2.1.xfootnote:oom[] | 2.4.0 | 4.3.25 | 1.5.x | Ingalls | 2.1.xfootnote:oom[] | 2.4.0 | 4.3.25
|=== |===
Support for upcoming versions of Elasticsearch is being tracked and general compatibility should be given assuming the usage of the xref:elasticsearch/template.adoc[ElasticsearchOperations interface]. Support for upcoming versions of Elasticsearch is being tracked and general compatibility should be given assuming the usage of the xref:elasticsearch/template.adoc[ElasticsearchOperations interface].

View File

@ -10,7 +10,7 @@ asciidoc:
attribute-missing: 'warn' attribute-missing: 'warn'
commons: ${springdata.commons.docs} commons: ${springdata.commons.docs}
include-xml-namespaces: false include-xml-namespaces: false
spring-data-commons-docs-url: https://docs.spring.io/spring-data-commons/reference spring-data-commons-docs-url: https://docs.spring.io/spring-data/commons/reference
spring-data-commons-javadoc-base: https://docs.spring.io/spring-data/commons/docs/${springdata.commons}/api/ spring-data-commons-javadoc-base: https://docs.spring.io/spring-data/commons/docs/${springdata.commons}/api/
springdocsurl: https://docs.spring.io/spring-framework/reference/{springversionshort} springdocsurl: https://docs.spring.io/spring-framework/reference/{springversionshort}
springjavadocurl: https://docs.spring.io/spring-framework/docs/${spring}/javadoc-api springjavadocurl: https://docs.spring.io/spring-framework/docs/${spring}/javadoc-api

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -138,7 +138,7 @@ final class DocumentAdapters {
document.setPrimaryTerm(hit.primaryTerm() != null && hit.primaryTerm() > 0 ? hit.primaryTerm() : 0); document.setPrimaryTerm(hit.primaryTerm() != null && hit.primaryTerm() > 0 ? hit.primaryTerm() : 0);
float score = hit.score() != null ? hit.score().floatValue() : Float.NaN; 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()); documentFields, highlightFields, innerHits, nestedMetaData, explanation, matchedQueries, hit.routing());
} }

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -31,6 +31,10 @@ import org.springframework.data.elasticsearch.core.ElasticsearchOperations;
import org.springframework.data.elasticsearch.core.convert.ElasticsearchConverter; import org.springframework.data.elasticsearch.core.convert.ElasticsearchConverter;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
/** /**
* Base class for a @{@link org.springframework.context.annotation.Configuration} class to set up the Elasticsearch * Base class for a @{@link org.springframework.context.annotation.Configuration} class to set up the Elasticsearch
* connection using the Elasticsearch Client. This class exposes different parts of the setup as Spring beans. Deriving * connection using the Elasticsearch Client. This class exposes different parts of the setup as Spring beans. Deriving
@ -118,7 +122,13 @@ public abstract class ElasticsearchConfiguration extends ElasticsearchConfigurat
*/ */
@Bean @Bean
public JsonpMapper jsonpMapper() { public JsonpMapper jsonpMapper() {
return new JacksonJsonpMapper(); // 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 JacksonJsonpMapper(objectMapper);
} }
/** /**

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -620,7 +620,7 @@ public class ReactiveElasticsearchTemplate extends AbstractReactiveElasticsearch
* *
* @param <T> * @param <T>
*/ */
interface ClientCallback<T extends Publisher<?>> { public interface ClientCallback<T extends Publisher<?>> {
T doWithClient(ReactiveElasticsearchClient client); T doWithClient(ReactiveElasticsearchClient client);
} }

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -545,13 +545,12 @@ class RequestConverter {
Object queryObject = query.getObject(); Object queryObject = query.getObject();
if (queryObject != null) { if (queryObject != null) {
String id = StringUtils.hasText(query.getId()) ? query.getId() : getPersistentEntityId(queryObject); builder
builder // .id(StringUtils.hasText(query.getId()) ? query.getId() : getPersistentEntityId(queryObject))
.id(id) //
.document(elasticsearchConverter.mapObject(queryObject)); .document(elasticsearchConverter.mapObject(queryObject));
} else if (query.getSource() != null) { } else if (query.getSource() != null) {
builder // builder
.id(query.getId()) // .id(query.getId())
.document(new DefaultStringObjectMap<>().fromJson(query.getSource())); .document(new DefaultStringObjectMap<>().fromJson(query.getSource()));
} else { } else {
throw new InvalidDataAccessApiUsageException( throw new InvalidDataAccessApiUsageException(
@ -597,12 +596,13 @@ class RequestConverter {
Object queryObject = query.getObject(); Object queryObject = query.getObject();
if (queryObject != null) { if (queryObject != null) {
String id = StringUtils.hasText(query.getId()) ? query.getId() : getPersistentEntityId(queryObject); builder
builder // .id(StringUtils.hasText(query.getId()) ? query.getId() : getPersistentEntityId(queryObject))
.id(id) //
.document(elasticsearchConverter.mapObject(queryObject)); .document(elasticsearchConverter.mapObject(queryObject));
} else if (query.getSource() != null) { } else if (query.getSource() != null) {
builder.document(new DefaultStringObjectMap<>().fromJson(query.getSource())); builder
.id(query.getId())
.document(new DefaultStringObjectMap<>().fromJson(query.getSource()));
} else { } else {
throw new InvalidDataAccessApiUsageException( throw new InvalidDataAccessApiUsageException(
"object or source is null, failed to index the document [id: " + query.getId() + ']'); "object or source is null, failed to index the document [id: " + query.getId() + ']');
@ -638,12 +638,13 @@ class RequestConverter {
Object queryObject = query.getObject(); Object queryObject = query.getObject();
if (queryObject != null) { if (queryObject != null) {
String id = StringUtils.hasText(query.getId()) ? query.getId() : getPersistentEntityId(queryObject); builder
builder // .id(StringUtils.hasText(query.getId()) ? query.getId() : getPersistentEntityId(queryObject))
.id(id) //
.document(elasticsearchConverter.mapObject(queryObject)); .document(elasticsearchConverter.mapObject(queryObject));
} else if (query.getSource() != null) { } else if (query.getSource() != null) {
builder.document(new DefaultStringObjectMap<>().fromJson(query.getSource())); builder
.id(query.getId())
.document(new DefaultStringObjectMap<>().fromJson(query.getSource()));
} else { } else {
throw new InvalidDataAccessApiUsageException( throw new InvalidDataAccessApiUsageException(
"object or source is null, failed to index the document [id: " + query.getId() + ']'); "object or source is null, failed to index the document [id: " + query.getId() + ']');
@ -1682,8 +1683,13 @@ class RequestConverter {
} else // noinspection StatementWithEmptyBody } else // noinspection StatementWithEmptyBody
if (query instanceof StringQuery) { if (query instanceof StringQuery) {
// no filter for StringQuery // no filter for StringQuery
} else if (query instanceof NativeQuery) { } else if (query instanceof NativeQuery nativeQuery) {
builder.postFilter(((NativeQuery) query).getFilter());
if (nativeQuery.getFilter() != null) {
builder.postFilter(nativeQuery.getFilter());
} else if (nativeQuery.getSpringDataQuery() != null) {
addFilter(nativeQuery.getSpringDataQuery(), builder);
}
} else { } else {
throw new IllegalArgumentException("unhandled Query implementation " + query.getClass().getName()); throw new IllegalArgumentException("unhandled Query implementation " + query.getClass().getName());
} }

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

Some files were not shown because too many files have changed in this diff Show More