Compare commits

...

12 Commits

Author SHA1 Message Date
Mark Paluch
3b3c281835
Release version 6.0 M2 (2025.1.0).
See #3047
2025-04-22 14:29:39 +02:00
Mark Paluch
5c40fc5765
Prepare 6.0 M2 (2025.1.0).
See #3047
2025-04-22 14:29:21 +02:00
Peter-Josef Meisch
bc3e6ab9ac
Switch to jspecify nullability annotations.
Original Pull Request #3065
Closes #2984

Signed-off-by: Peter-Josef Meisch <pj.meisch@sothawo.com>
2025-04-05 21:01:06 +02:00
Peter-Josef Meisch
9d5cbdcf0f
Cleanup unneeded imports after deprecation removal
Signed-off-by: Peter-Josef Meisch <pj.meisch@sothawo.com>
2025-04-05 21:01:06 +02:00
Christoph Strobl
93ea8f8b05
After release cleanups.
See #3006
2025-04-05 21:01:06 +02:00
Christoph Strobl
30a6e58731
Prepare next development iteration.
See #3006
2025-04-05 21:01:05 +02:00
Christoph Strobl
c81209f7c9
Release version 6.0 M1 (2025.1.0).
See #3006
2025-04-05 21:01:05 +02:00
Christoph Strobl
b93df29f23
Prepare 6.0 M1 (2025.1.0).
See #3006

# Conflicts:
#	src/main/resources/notice.txt
2025-04-05 21:01:05 +02:00
Mark Paluch
9a83888c6e
Adopt to changes in Spring Framework 7.
See #3038
2025-04-05 21:01:05 +02:00
Peter-Josef Meisch
3fd2fb4d54
Update versions documentation
Signed-off-by: Peter-Josef Meisch <pj.meisch@sothawo.com>

# Conflicts:
#	src/main/antora/modules/ROOT/pages/elasticsearch/versions.adoc

# Conflicts:
#	src/main/antora/modules/ROOT/pages/elasticsearch/versions.adoc

# Conflicts:
#	src/main/antora/modules/ROOT/pages/elasticsearch/versions.adoc
2025-04-05 21:01:05 +02:00
Mark Paluch
bff935ccd5
After release cleanups.
See #3006
2025-04-05 21:00:23 +02:00
Mark Paluch
364927dd71
Prepare next development iteration.
See #3006
2025-04-05 21:00:23 +02:00
305 changed files with 694 additions and 787 deletions

2
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/4.0.x", threshold: hudson.model.Result.SUCCESS)
} }
options { options {

22
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.5.0-SNAPSHOT</version> <version>6.0.0-M2</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.5.0-SNAPSHOT</version> <version>4.0.0-M2</version>
</parent> </parent>
<name>Spring Data Elasticsearch</name> <name>Spring Data Elasticsearch</name>
@ -18,7 +18,7 @@
<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.5.0-SNAPSHOT</springdata.commons> <springdata.commons>4.0.0-M2</springdata.commons>
<!-- version of the ElasticsearchClient --> <!-- version of the ElasticsearchClient -->
<elasticsearch-java>8.17.4</elasticsearch-java> <elasticsearch-java>8.17.4</elasticsearch-java>
@ -450,20 +450,8 @@
</profiles> </profiles>
<repositories> <repositories>
<repository>
<id>spring-snapshot</id>
<url>https://repo.spring.io/snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>false</enabled>
</releases>
</repository>
<repository>
<id>spring-milestone</id>
<url>https://repo.spring.io/milestone</url>
</repository>
</repositories> </repositories>
</project> </project>

View File

@ -10,7 +10,7 @@ In order for the auditing code to be able to decide whether an entity instance i
---- ----
package org.springframework.data.domain; package org.springframework.data.domain;
import org.springframework.lang.Nullable; import org.jspecify.annotations.Nullable;
public interface Persistable<ID> { public interface Persistable<ID> {
@Nullable @Nullable
@ -81,5 +81,5 @@ class MyConfiguration {
} }
---- ----
If your code contains more than one `AuditorAware` bean for different types, you must provide the name of the bean to use as an argument to the `auditorAwareRef` parameter of the If your code contains more than one `AuditorAware` bean for different types, you must provide the name of the bean to use as an argument to the `auditorAwareRef` parameter of the
`@EnableElasticsearchAuditing` annotation. `@EnableElasticsearchAuditing` annotation.

View File

@ -20,12 +20,12 @@ Whereas the birthdate is fix, the age depends on the time when a query is issued
==== ====
[source,java] [source,java]
---- ----
import org.jspecify.annotations.Nullable;
import org.springframework.data.annotation.Id; import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.DateFormat; import org.springframework.data.elasticsearch.annotations.DateFormat;
import org.springframework.data.elasticsearch.annotations.Document; import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field; import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.ScriptedField; import org.springframework.data.elasticsearch.annotations.ScriptedField;
import org.springframework.lang.Nullable;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;

View File

@ -6,7 +6,8 @@ The following table shows the Elasticsearch and Spring versions that are used by
[cols="^,^,^,^",options="header"] [cols="^,^,^,^",options="header"]
|=== |===
| Spring Data Release Train | Spring Data Elasticsearch | Elasticsearch | Spring Framework | Spring Data Release Train | Spring Data Elasticsearch | Elasticsearch | Spring Framework
| 2025.0 (in development) | 5.5.x | 8.17.4 | 6.2.x | 2025.1 (in development) | 6.0.x | 8.17.2 | 6.2.x
| 2025.0 (in development) | 5.5.x | 8.17.2 | 6.2.x
| 2024.1 | 5.4.x | 8.15.5 | 6.1.x | 2024.1 | 5.4.x | 8.15.5 | 6.1.x
| 2024.0 | 5.3.x | 8.13.4 | 6.1.x | 2024.0 | 5.3.x | 8.13.4 | 6.1.x
| 2023.1 (Vaughan) | 5.2.xfootnote:oom[Out of maintenance] | 8.11.1 | 6.1.x | 2023.1 (Vaughan) | 5.2.xfootnote:oom[Out of maintenance] | 8.11.1 | 6.1.x

View File

@ -15,10 +15,10 @@
*/ */
package org.springframework.data.elasticsearch; package org.springframework.data.elasticsearch;
import org.springframework.lang.Nullable;
import java.util.List; import java.util.List;
import org.jspecify.annotations.Nullable;
/** /**
* Object describing an Elasticsearch error * Object describing an Elasticsearch error
* *
@ -26,8 +26,7 @@ import java.util.List;
* @since 4.4 * @since 4.4
*/ */
public class ElasticsearchErrorCause { public class ElasticsearchErrorCause {
@Nullable @Nullable private final String type;
private final String type;
private final String reason; private final String reason;

View File

@ -15,8 +15,8 @@
*/ */
package org.springframework.data.elasticsearch; package org.springframework.data.elasticsearch;
import org.jspecify.annotations.Nullable;
import org.springframework.dao.UncategorizedDataAccessException; import org.springframework.dao.UncategorizedDataAccessException;
import org.springframework.lang.Nullable;
/** /**
* @author Peter-Josef Meisch * @author Peter-Josef Meisch

View File

@ -1,3 +1,2 @@
@org.springframework.lang.NonNullApi @org.jspecify.annotations.NullMarked
@org.springframework.lang.NonNullFields
package org.springframework.data.elasticsearch.annotations; package org.springframework.data.elasticsearch.annotations;

View File

@ -19,6 +19,7 @@ import static org.springframework.data.elasticsearch.aot.ElasticsearchAotPredica
import java.util.Arrays; import java.util.Arrays;
import org.jspecify.annotations.Nullable;
import org.springframework.aot.hint.MemberCategory; import org.springframework.aot.hint.MemberCategory;
import org.springframework.aot.hint.RuntimeHints; import org.springframework.aot.hint.RuntimeHints;
import org.springframework.aot.hint.RuntimeHintsRegistrar; import org.springframework.aot.hint.RuntimeHintsRegistrar;
@ -32,7 +33,6 @@ import org.springframework.data.elasticsearch.core.event.ReactiveAfterConvertCal
import org.springframework.data.elasticsearch.core.event.ReactiveAfterLoadCallback; import org.springframework.data.elasticsearch.core.event.ReactiveAfterLoadCallback;
import org.springframework.data.elasticsearch.core.event.ReactiveAfterSaveCallback; import org.springframework.data.elasticsearch.core.event.ReactiveAfterSaveCallback;
import org.springframework.data.elasticsearch.core.event.ReactiveBeforeConvertCallback; import org.springframework.data.elasticsearch.core.event.ReactiveBeforeConvertCallback;
import org.springframework.lang.Nullable;
/** /**
* @author Peter-Josef Meisch * @author Peter-Josef Meisch

View File

@ -1,3 +1,2 @@
@org.springframework.lang.NonNullApi @org.jspecify.annotations.NullMarked
@org.springframework.lang.NonNullFields
package org.springframework.data.elasticsearch.aot; package org.springframework.data.elasticsearch.aot;

View File

@ -25,8 +25,8 @@ import java.util.function.Supplier;
import javax.net.ssl.HostnameVerifier; import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.SSLContext; import javax.net.ssl.SSLContext;
import org.jspecify.annotations.Nullable;
import org.springframework.data.elasticsearch.support.HttpHeaders; import org.springframework.data.elasticsearch.support.HttpHeaders;
import org.springframework.lang.Nullable;
/** /**
* Configuration interface exposing common client configuration properties for Elasticsearch clients. * Configuration interface exposing common client configuration properties for Elasticsearch clients.

View File

@ -25,11 +25,11 @@ import java.util.function.Supplier;
import javax.net.ssl.HostnameVerifier; import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.SSLContext; import javax.net.ssl.SSLContext;
import org.jspecify.annotations.Nullable;
import org.springframework.data.elasticsearch.client.ClientConfiguration.ClientConfigurationBuilderWithRequiredEndpoint; import org.springframework.data.elasticsearch.client.ClientConfiguration.ClientConfigurationBuilderWithRequiredEndpoint;
import org.springframework.data.elasticsearch.client.ClientConfiguration.MaybeSecureClientConfigurationBuilder; import org.springframework.data.elasticsearch.client.ClientConfiguration.MaybeSecureClientConfigurationBuilder;
import org.springframework.data.elasticsearch.client.ClientConfiguration.TerminalClientConfigurationBuilder; import org.springframework.data.elasticsearch.client.ClientConfiguration.TerminalClientConfigurationBuilder;
import org.springframework.data.elasticsearch.support.HttpHeaders; import org.springframework.data.elasticsearch.support.HttpHeaders;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert; import org.springframework.util.Assert;
/** /**

View File

@ -24,9 +24,8 @@ import java.util.function.Supplier;
import javax.net.ssl.HostnameVerifier; import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.SSLContext; import javax.net.ssl.SSLContext;
import org.elasticsearch.client.RestClientBuilder.HttpClientConfigCallback; import org.jspecify.annotations.Nullable;
import org.springframework.data.elasticsearch.support.HttpHeaders; import org.springframework.data.elasticsearch.support.HttpHeaders;
import org.springframework.lang.Nullable;
/** /**
* Default {@link ClientConfiguration} implementation. * Default {@link ClientConfiguration} implementation.

View File

@ -17,10 +17,10 @@ package org.springframework.data.elasticsearch.client.elc;
import java.util.function.Consumer; import java.util.function.Consumer;
import org.jspecify.annotations.Nullable;
import org.springframework.data.elasticsearch.core.query.CriteriaQuery; import org.springframework.data.elasticsearch.core.query.CriteriaQuery;
import org.springframework.data.elasticsearch.core.query.Query; import org.springframework.data.elasticsearch.core.query.Query;
import org.springframework.data.elasticsearch.core.query.StringQuery; import org.springframework.data.elasticsearch.core.query.StringQuery;
import org.springframework.lang.Nullable;
/** /**
* An abstract class that serves as a base for query processors. It provides a common interface and basic functionality * An abstract class that serves as a base for query processors. It provides a common interface and basic functionality
@ -38,8 +38,8 @@ public abstract class AbstractQueryProcessor {
* @param queryConverter correct mapped field names and the values to the converted values. * @param queryConverter correct mapped field names and the values to the converted values.
* @return an Elasticsearch {@literal query}. * @return an Elasticsearch {@literal query}.
*/ */
@Nullable
static co.elastic.clients.elasticsearch._types.query_dsl.Query getEsQuery(@Nullable Query query, static co.elastic.clients.elasticsearch._types.query_dsl.@Nullable Query getEsQuery(@Nullable Query query,
@Nullable Consumer<Query> queryConverter) { @Nullable Consumer<Query> queryConverter) {
if (query == null) { if (query == null) {
return null; return null;

View File

@ -31,13 +31,13 @@ import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
import org.jspecify.annotations.Nullable;
import org.springframework.data.elasticsearch.annotations.FieldType; import org.springframework.data.elasticsearch.annotations.FieldType;
import org.springframework.data.elasticsearch.core.query.Criteria; import org.springframework.data.elasticsearch.core.query.Criteria;
import org.springframework.data.elasticsearch.core.query.Field; import org.springframework.data.elasticsearch.core.query.Field;
import org.springframework.data.elasticsearch.core.query.HasChildQuery; import org.springframework.data.elasticsearch.core.query.HasChildQuery;
import org.springframework.data.elasticsearch.core.query.HasParentQuery; import org.springframework.data.elasticsearch.core.query.HasParentQuery;
import org.springframework.data.elasticsearch.core.query.InnerHitsQuery; import org.springframework.data.elasticsearch.core.query.InnerHitsQuery;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert; import org.springframework.util.Assert;
/** /**

View File

@ -34,6 +34,7 @@ import java.util.stream.Collectors;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.jspecify.annotations.Nullable;
import org.springframework.data.elasticsearch.core.MultiGetItem; import org.springframework.data.elasticsearch.core.MultiGetItem;
import org.springframework.data.elasticsearch.core.document.Document; import org.springframework.data.elasticsearch.core.document.Document;
import org.springframework.data.elasticsearch.core.document.Explanation; import org.springframework.data.elasticsearch.core.document.Explanation;
@ -41,7 +42,6 @@ import org.springframework.data.elasticsearch.core.document.NestedMetaData;
import org.springframework.data.elasticsearch.core.document.SearchDocument; import org.springframework.data.elasticsearch.core.document.SearchDocument;
import org.springframework.data.elasticsearch.core.document.SearchDocumentAdapter; import org.springframework.data.elasticsearch.core.document.SearchDocumentAdapter;
import org.springframework.data.elasticsearch.core.document.SearchDocumentResponse; import org.springframework.data.elasticsearch.core.document.SearchDocumentResponse;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert; import org.springframework.util.Assert;
/** /**
@ -160,7 +160,7 @@ final class DocumentAdapters {
} }
@Nullable @Nullable
private static Explanation from(@Nullable co.elastic.clients.elasticsearch.core.explain.Explanation explanation) { private static Explanation from(co.elastic.clients.elasticsearch.core.explain.@Nullable Explanation explanation) {
if (explanation == null) { if (explanation == null) {
return null; return null;

View File

@ -22,8 +22,8 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.jspecify.annotations.Nullable;
import org.springframework.data.elasticsearch.core.AggregationsContainer; import org.springframework.data.elasticsearch.core.AggregationsContainer;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert; import org.springframework.util.Assert;
/** /**

View File

@ -19,12 +19,12 @@ import co.elastic.clients.elasticsearch.ElasticsearchClient;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.jspecify.annotations.Nullable;
import org.springframework.beans.factory.DisposableBean; import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.FactoryBean; import org.springframework.beans.factory.FactoryBean;
import org.springframework.beans.factory.FactoryBeanNotInitializedException; import org.springframework.beans.factory.FactoryBeanNotInitializedException;
import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.InitializingBean;
import org.springframework.data.elasticsearch.client.ClientConfiguration; import org.springframework.data.elasticsearch.client.ClientConfiguration;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert; import org.springframework.util.Assert;
/** /**

View File

@ -46,9 +46,9 @@ import org.apache.http.protocol.HttpContext;
import org.elasticsearch.client.RequestOptions; import org.elasticsearch.client.RequestOptions;
import org.elasticsearch.client.RestClient; import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestClientBuilder; import org.elasticsearch.client.RestClientBuilder;
import org.jspecify.annotations.Nullable;
import org.springframework.data.elasticsearch.client.ClientConfiguration; import org.springframework.data.elasticsearch.client.ClientConfiguration;
import org.springframework.data.elasticsearch.support.HttpHeaders; import org.springframework.data.elasticsearch.support.HttpHeaders;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert; import org.springframework.util.Assert;
/** /**

View File

@ -40,6 +40,7 @@ import java.util.stream.Collectors;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.jspecify.annotations.Nullable;
import org.springframework.data.elasticsearch.BulkFailureException; import org.springframework.data.elasticsearch.BulkFailureException;
import org.springframework.data.elasticsearch.client.UnsupportedBackendOperation; import org.springframework.data.elasticsearch.client.UnsupportedBackendOperation;
import org.springframework.data.elasticsearch.core.AbstractElasticsearchTemplate; import org.springframework.data.elasticsearch.core.AbstractElasticsearchTemplate;
@ -59,7 +60,6 @@ import org.springframework.data.elasticsearch.core.reindex.ReindexRequest;
import org.springframework.data.elasticsearch.core.reindex.ReindexResponse; import org.springframework.data.elasticsearch.core.reindex.ReindexResponse;
import org.springframework.data.elasticsearch.core.script.Script; import org.springframework.data.elasticsearch.core.script.Script;
import org.springframework.data.elasticsearch.core.sql.SqlResponse; import org.springframework.data.elasticsearch.core.sql.SqlResponse;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert; import org.springframework.util.Assert;
/** /**

View File

@ -20,6 +20,7 @@ import static org.springframework.data.elasticsearch.client.elc.TypeUtils.*;
import java.util.Arrays; import java.util.Arrays;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import org.jspecify.annotations.Nullable;
import org.springframework.data.elasticsearch.core.mapping.ElasticsearchPersistentEntity; import org.springframework.data.elasticsearch.core.mapping.ElasticsearchPersistentEntity;
import org.springframework.data.elasticsearch.core.mapping.ElasticsearchPersistentProperty; import org.springframework.data.elasticsearch.core.mapping.ElasticsearchPersistentProperty;
import org.springframework.data.elasticsearch.core.query.highlight.Highlight; import org.springframework.data.elasticsearch.core.query.highlight.Highlight;
@ -27,7 +28,6 @@ import org.springframework.data.elasticsearch.core.query.highlight.HighlightFiel
import org.springframework.data.elasticsearch.core.query.highlight.HighlightFieldParameters; import org.springframework.data.elasticsearch.core.query.highlight.HighlightFieldParameters;
import org.springframework.data.elasticsearch.core.query.highlight.HighlightParameters; import org.springframework.data.elasticsearch.core.query.highlight.HighlightParameters;
import org.springframework.data.mapping.context.MappingContext; import org.springframework.data.mapping.context.MappingContext;
import org.springframework.lang.Nullable;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
/** /**
@ -43,7 +43,8 @@ class HighlightQueryBuilder {
private final RequestConverter requestConverter; private final RequestConverter requestConverter;
HighlightQueryBuilder( HighlightQueryBuilder(
MappingContext<? extends ElasticsearchPersistentEntity<?>, ElasticsearchPersistentProperty> mappingContext, RequestConverter requestConverter) { MappingContext<? extends ElasticsearchPersistentEntity<?>, ElasticsearchPersistentProperty> mappingContext,
RequestConverter requestConverter) {
this.mappingContext = mappingContext; this.mappingContext = mappingContext;
this.requestConverter = requestConverter; this.requestConverter = requestConverter;
} }

View File

@ -27,6 +27,7 @@ import java.util.Map;
import java.util.Objects; import java.util.Objects;
import java.util.Set; import java.util.Set;
import org.jspecify.annotations.Nullable;
import org.springframework.core.annotation.AnnotatedElementUtils; import org.springframework.core.annotation.AnnotatedElementUtils;
import org.springframework.dao.InvalidDataAccessApiUsageException; import org.springframework.dao.InvalidDataAccessApiUsageException;
import org.springframework.data.elasticsearch.UncategorizedElasticsearchException; import org.springframework.data.elasticsearch.UncategorizedElasticsearchException;
@ -49,7 +50,6 @@ import org.springframework.data.elasticsearch.core.mapping.Alias;
import org.springframework.data.elasticsearch.core.mapping.CreateIndexSettings; import org.springframework.data.elasticsearch.core.mapping.CreateIndexSettings;
import org.springframework.data.elasticsearch.core.mapping.ElasticsearchPersistentEntity; import org.springframework.data.elasticsearch.core.mapping.ElasticsearchPersistentEntity;
import org.springframework.data.elasticsearch.core.mapping.IndexCoordinates; import org.springframework.data.elasticsearch.core.mapping.IndexCoordinates;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert; import org.springframework.util.Assert;
/** /**

View File

@ -23,7 +23,7 @@ import java.nio.charset.StandardCharsets;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.springframework.lang.Nullable; import org.jspecify.annotations.Nullable;
/** /**
* @author Peter-Josef Meisch * @author Peter-Josef Meisch
@ -48,7 +48,7 @@ final class JsonUtils {
} }
@Nullable @Nullable
public static String queryToJson(@Nullable co.elastic.clients.elasticsearch._types.query_dsl.Query query, public static String queryToJson(co.elastic.clients.elasticsearch._types.query_dsl.@Nullable Query query,
JsonpMapper mapper) { JsonpMapper mapper) {
if (query == null) { if (query == null) {

View File

@ -28,8 +28,8 @@ import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.jspecify.annotations.Nullable;
import org.springframework.data.elasticsearch.core.query.BaseQuery; import org.springframework.data.elasticsearch.core.query.BaseQuery;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert; import org.springframework.util.Assert;
/** /**
@ -44,7 +44,7 @@ import org.springframework.util.Assert;
public class NativeQuery extends BaseQuery { public class NativeQuery extends BaseQuery {
@Nullable private final Query query; @Nullable private final Query query;
@Nullable private org.springframework.data.elasticsearch.core.query.Query springDataQuery; private org.springframework.data.elasticsearch.core.query.@Nullable Query springDataQuery;
@Nullable private Query filter; @Nullable private Query filter;
// note: the new client does not have pipeline aggs, these are just set up as normal aggs // note: the new client does not have pipeline aggs, these are just set up as normal aggs
private final Map<String, Aggregation> aggregations = new LinkedHashMap<>(); private final Map<String, Aggregation> aggregations = new LinkedHashMap<>();
@ -117,7 +117,7 @@ public class NativeQuery extends BaseQuery {
* @see NativeQueryBuilder#withQuery(org.springframework.data.elasticsearch.core.query.Query). * @see NativeQueryBuilder#withQuery(org.springframework.data.elasticsearch.core.query.Query).
* @since 5.1 * @since 5.1
*/ */
public void setSpringDataQuery(@Nullable org.springframework.data.elasticsearch.core.query.Query springDataQuery) { public void setSpringDataQuery(org.springframework.data.elasticsearch.core.query.@Nullable Query springDataQuery) {
this.springDataQuery = springDataQuery; this.springDataQuery = springDataQuery;
} }
@ -129,8 +129,7 @@ public class NativeQuery extends BaseQuery {
return knnSearches; return knnSearches;
} }
@Nullable public org.springframework.data.elasticsearch.core.query.@Nullable Query getSpringDataQuery() {
public org.springframework.data.elasticsearch.core.query.Query getSpringDataQuery() {
return springDataQuery; return springDataQuery;
} }
} }

View File

@ -33,8 +33,8 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.function.Function; import java.util.function.Function;
import org.jspecify.annotations.Nullable;
import org.springframework.data.elasticsearch.core.query.BaseQueryBuilder; import org.springframework.data.elasticsearch.core.query.BaseQueryBuilder;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert; import org.springframework.util.Assert;
/** /**
@ -53,7 +53,7 @@ public class NativeQueryBuilder extends BaseQueryBuilder<NativeQuery, NativeQuer
private final List<SortOptions> sortOptions = new ArrayList<>(); private final List<SortOptions> sortOptions = new ArrayList<>();
private final Map<String, JsonData> searchExtensions = new LinkedHashMap<>(); private final Map<String, JsonData> searchExtensions = new LinkedHashMap<>();
@Nullable private org.springframework.data.elasticsearch.core.query.Query springDataQuery; private org.springframework.data.elasticsearch.core.query.@Nullable Query springDataQuery;
@Nullable private KnnQuery knnQuery; @Nullable private KnnQuery knnQuery;
@Nullable private List<KnnSearch> knnSearches = Collections.emptyList(); @Nullable private List<KnnSearch> knnSearches = Collections.emptyList();
@ -104,8 +104,7 @@ public class NativeQueryBuilder extends BaseQueryBuilder<NativeQuery, NativeQuer
return knnSearches; return knnSearches;
} }
@Nullable public org.springframework.data.elasticsearch.core.query.@Nullable Query getSpringDataQuery() {
public org.springframework.data.elasticsearch.core.query.Query getSpringDataQuery() {
return springDataQuery; return springDataQuery;
} }

View File

@ -34,9 +34,9 @@ import java.util.Base64;
import java.util.List; import java.util.List;
import java.util.function.Function; import java.util.function.Function;
import org.jspecify.annotations.Nullable;
import org.springframework.data.elasticsearch.core.geo.GeoPoint; import org.springframework.data.elasticsearch.core.geo.GeoPoint;
import org.springframework.data.elasticsearch.core.query.BaseQueryBuilder; import org.springframework.data.elasticsearch.core.query.BaseQueryBuilder;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert; import org.springframework.util.Assert;
/** /**

View File

@ -30,7 +30,7 @@ import reactor.core.publisher.Mono;
import java.io.IOException; import java.io.IOException;
import java.util.function.Function; import java.util.function.Function;
import org.springframework.lang.Nullable; import org.jspecify.annotations.Nullable;
import org.springframework.util.Assert; import org.springframework.util.Assert;
/** /**

View File

@ -16,7 +16,15 @@
package org.springframework.data.elasticsearch.client.elc; package org.springframework.data.elasticsearch.client.elc;
import co.elastic.clients.ApiClient; import co.elastic.clients.ApiClient;
import co.elastic.clients.elasticsearch.cluster.*; import co.elastic.clients.elasticsearch.cluster.DeleteComponentTemplateRequest;
import co.elastic.clients.elasticsearch.cluster.DeleteComponentTemplateResponse;
import co.elastic.clients.elasticsearch.cluster.ExistsComponentTemplateRequest;
import co.elastic.clients.elasticsearch.cluster.GetComponentTemplateRequest;
import co.elastic.clients.elasticsearch.cluster.GetComponentTemplateResponse;
import co.elastic.clients.elasticsearch.cluster.HealthRequest;
import co.elastic.clients.elasticsearch.cluster.HealthResponse;
import co.elastic.clients.elasticsearch.cluster.PutComponentTemplateRequest;
import co.elastic.clients.elasticsearch.cluster.PutComponentTemplateResponse;
import co.elastic.clients.transport.ElasticsearchTransport; import co.elastic.clients.transport.ElasticsearchTransport;
import co.elastic.clients.transport.TransportOptions; import co.elastic.clients.transport.TransportOptions;
import co.elastic.clients.transport.endpoints.BooleanResponse; import co.elastic.clients.transport.endpoints.BooleanResponse;
@ -25,7 +33,7 @@ import reactor.core.publisher.Mono;
import java.util.function.Function; import java.util.function.Function;
import org.springframework.lang.Nullable; import org.jspecify.annotations.Nullable;
/** /**
* Reactive version of the {@link co.elastic.clients.elasticsearch.cluster.ElasticsearchClusterClient} * Reactive version of the {@link co.elastic.clients.elasticsearch.cluster.ElasticsearchClusterClient}

View File

@ -25,7 +25,7 @@ import reactor.core.publisher.Mono;
import java.util.function.Function; import java.util.function.Function;
import org.springframework.lang.Nullable; import org.jspecify.annotations.Nullable;
/** /**
* Reactive version of the {@link co.elastic.clients.elasticsearch.indices.ElasticsearchIndicesClient} * Reactive version of the {@link co.elastic.clients.elasticsearch.indices.ElasticsearchIndicesClient}

View File

@ -40,6 +40,7 @@ import java.util.stream.Collectors;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.jspecify.annotations.Nullable;
import org.reactivestreams.Publisher; import org.reactivestreams.Publisher;
import org.springframework.data.domain.Sort; import org.springframework.data.domain.Sort;
import org.springframework.data.elasticsearch.BulkFailureException; import org.springframework.data.elasticsearch.BulkFailureException;
@ -63,7 +64,6 @@ import org.springframework.data.elasticsearch.core.reindex.ReindexRequest;
import org.springframework.data.elasticsearch.core.reindex.ReindexResponse; import org.springframework.data.elasticsearch.core.reindex.ReindexResponse;
import org.springframework.data.elasticsearch.core.script.Script; import org.springframework.data.elasticsearch.core.script.Script;
import org.springframework.data.elasticsearch.core.sql.SqlResponse; import org.springframework.data.elasticsearch.core.sql.SqlResponse;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;

View File

@ -29,6 +29,7 @@ import java.util.Map;
import java.util.Objects; import java.util.Objects;
import java.util.Set; import java.util.Set;
import org.jspecify.annotations.Nullable;
import org.springframework.core.annotation.AnnotatedElementUtils; import org.springframework.core.annotation.AnnotatedElementUtils;
import org.springframework.dao.InvalidDataAccessApiUsageException; import org.springframework.dao.InvalidDataAccessApiUsageException;
import org.springframework.data.elasticsearch.NoSuchIndexException; import org.springframework.data.elasticsearch.NoSuchIndexException;
@ -51,7 +52,6 @@ import org.springframework.data.elasticsearch.core.mapping.Alias;
import org.springframework.data.elasticsearch.core.mapping.CreateIndexSettings; import org.springframework.data.elasticsearch.core.mapping.CreateIndexSettings;
import org.springframework.data.elasticsearch.core.mapping.ElasticsearchPersistentEntity; import org.springframework.data.elasticsearch.core.mapping.ElasticsearchPersistentEntity;
import org.springframework.data.elasticsearch.core.mapping.IndexCoordinates; import org.springframework.data.elasticsearch.core.mapping.IndexCoordinates;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert; import org.springframework.util.Assert;
/** /**

View File

@ -76,6 +76,7 @@ import java.util.stream.Collectors;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jspecify.annotations.Nullable;
import org.springframework.dao.InvalidDataAccessApiUsageException; import org.springframework.dao.InvalidDataAccessApiUsageException;
import org.springframework.data.domain.Sort; import org.springframework.data.domain.Sort;
import org.springframework.data.elasticsearch.core.RefreshPolicy; import org.springframework.data.elasticsearch.core.RefreshPolicy;
@ -99,7 +100,6 @@ import org.springframework.data.elasticsearch.core.reindex.ReindexRequest;
import org.springframework.data.elasticsearch.core.reindex.Remote; import org.springframework.data.elasticsearch.core.reindex.Remote;
import org.springframework.data.elasticsearch.core.script.Script; import org.springframework.data.elasticsearch.core.script.Script;
import org.springframework.data.elasticsearch.support.DefaultStringObjectMap; import org.springframework.data.elasticsearch.support.DefaultStringObjectMap;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
@ -736,8 +736,7 @@ class RequestConverter extends AbstractQueryProcessor {
return uob.build(); return uob.build();
} }
@Nullable private co.elastic.clients.elasticsearch._types.@Nullable Script getScript(@Nullable ScriptData scriptData) {
private co.elastic.clients.elasticsearch._types.Script getScript(@Nullable ScriptData scriptData) {
if (scriptData == null) { if (scriptData == null) {
return null; return null;
@ -1720,7 +1719,7 @@ class RequestConverter extends AbstractQueryProcessor {
} }
@Nullable @Nullable
private NestedSortValue getNestedSort(@Nullable Order.Nested nested, private NestedSortValue getNestedSort(Order.@Nullable Nested nested,
@Nullable ElasticsearchPersistentEntity<?> persistentEntity) { @Nullable ElasticsearchPersistentEntity<?> persistentEntity) {
return (nested == null || persistentEntity == null) ? null return (nested == null || persistentEntity == null) ? null
: NestedSortValue.of(b -> b // : NestedSortValue.of(b -> b //
@ -1784,8 +1783,7 @@ class RequestConverter extends AbstractQueryProcessor {
} }
} }
@Nullable co.elastic.clients.elasticsearch._types.query_dsl.@Nullable Query getQuery(@Nullable Query query,
co.elastic.clients.elasticsearch._types.query_dsl.Query getQuery(@Nullable Query query,
@Nullable Class<?> clazz) { @Nullable Class<?> clazz) {
return getEsQuery(query, (q) -> elasticsearchConverter.updateQuery(q, clazz)); return getEsQuery(query, (q) -> elasticsearchConverter.updateQuery(q, clazz));
} }

View File

@ -48,6 +48,7 @@ import java.util.stream.Collectors;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.jspecify.annotations.Nullable;
import org.springframework.data.elasticsearch.ElasticsearchErrorCause; import org.springframework.data.elasticsearch.ElasticsearchErrorCause;
import org.springframework.data.elasticsearch.core.IndexInformation; import org.springframework.data.elasticsearch.core.IndexInformation;
import org.springframework.data.elasticsearch.core.MultiGetItem; import org.springframework.data.elasticsearch.core.MultiGetItem;
@ -65,7 +66,6 @@ import org.springframework.data.elasticsearch.core.reindex.ReindexResponse;
import org.springframework.data.elasticsearch.core.script.Script; import org.springframework.data.elasticsearch.core.script.Script;
import org.springframework.data.elasticsearch.core.sql.SqlResponse; import org.springframework.data.elasticsearch.core.sql.SqlResponse;
import org.springframework.data.elasticsearch.support.DefaultStringObjectMap; import org.springframework.data.elasticsearch.support.DefaultStringObjectMap;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert; import org.springframework.util.Assert;
/** /**
@ -415,8 +415,7 @@ class ResponseConverter {
.withErrorCause(toErrorCause(failure.cause())).build(); .withErrorCause(toErrorCause(failure.cause())).build();
} }
@Nullable public static MultiGetItem.@Nullable Failure getFailure(MultiGetResponseItem<EntityAsMap> itemResponse) {
public static MultiGetItem.Failure getFailure(MultiGetResponseItem<EntityAsMap> itemResponse) {
MultiGetError responseFailure = itemResponse.isFailure() ? itemResponse.failure() : null; MultiGetError responseFailure = itemResponse.isFailure() ? itemResponse.failure() : null;

View File

@ -39,6 +39,7 @@ import java.util.stream.Collectors;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.jspecify.annotations.Nullable;
import org.springframework.data.elasticsearch.core.SearchShardStatistics; import org.springframework.data.elasticsearch.core.SearchShardStatistics;
import org.springframework.data.elasticsearch.core.TotalHitsRelation; import org.springframework.data.elasticsearch.core.TotalHitsRelation;
import org.springframework.data.elasticsearch.core.document.SearchDocument; import org.springframework.data.elasticsearch.core.document.SearchDocument;
@ -48,7 +49,6 @@ import org.springframework.data.elasticsearch.core.suggest.response.PhraseSugges
import org.springframework.data.elasticsearch.core.suggest.response.Suggest; import org.springframework.data.elasticsearch.core.suggest.response.Suggest;
import org.springframework.data.elasticsearch.core.suggest.response.TermSuggestion; import org.springframework.data.elasticsearch.core.suggest.response.TermSuggestion;
import org.springframework.data.elasticsearch.support.ScoreDoc; import org.springframework.data.elasticsearch.support.ScoreDoc;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
@ -133,7 +133,8 @@ class SearchDocumentResponseBuilder {
* @return the {@link SearchDocumentResponse} * @return the {@link SearchDocumentResponse}
*/ */
public static <T> SearchDocumentResponse from(HitsMetadata<?> hitsMetadata, @Nullable ShardStatistics shards, public static <T> SearchDocumentResponse from(HitsMetadata<?> hitsMetadata, @Nullable ShardStatistics shards,
@Nullable String scrollId, @Nullable String pointInTimeId, long executionDurationInMillis, @Nullable Map<String, Aggregate> aggregations, @Nullable String scrollId, @Nullable String pointInTimeId, long executionDurationInMillis,
@Nullable Map<String, Aggregate> aggregations,
Map<String, List<Suggestion<EntityAsMap>>> suggestES, SearchDocumentResponse.EntityCreator<T> entityCreator, Map<String, List<Suggestion<EntityAsMap>>> suggestES, SearchDocumentResponse.EntityCreator<T> entityCreator,
JsonpMapper jsonpMapper) { JsonpMapper jsonpMapper) {
@ -171,7 +172,8 @@ class SearchDocumentResponseBuilder {
SearchShardStatistics shardStatistics = shards != null ? shardsFrom(shards) : null; SearchShardStatistics shardStatistics = shards != null ? shardsFrom(shards) : null;
return new SearchDocumentResponse(totalHits, totalHitsRelation, maxScore, executionDuration, scrollId, pointInTimeId, searchDocuments, return new SearchDocumentResponse(totalHits, totalHitsRelation, maxScore, executionDuration, scrollId,
pointInTimeId, searchDocuments,
aggregationsContainer, suggest, shardStatistics); aggregationsContainer, suggest, shardStatistics);
} }

View File

@ -38,6 +38,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import org.jspecify.annotations.Nullable;
import org.springframework.data.domain.Sort; import org.springframework.data.domain.Sort;
import org.springframework.data.elasticsearch.core.RefreshPolicy; import org.springframework.data.elasticsearch.core.RefreshPolicy;
import org.springframework.data.elasticsearch.core.document.Document; import org.springframework.data.elasticsearch.core.document.Document;
@ -52,7 +53,6 @@ import org.springframework.data.elasticsearch.core.query.UpdateResponse;
import org.springframework.data.elasticsearch.core.query.types.ConflictsType; import org.springframework.data.elasticsearch.core.query.types.ConflictsType;
import org.springframework.data.elasticsearch.core.query.types.OperatorType; import org.springframework.data.elasticsearch.core.query.types.OperatorType;
import org.springframework.data.elasticsearch.core.reindex.ReindexRequest; import org.springframework.data.elasticsearch.core.reindex.ReindexRequest;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert; import org.springframework.util.Assert;
/** /**
@ -220,7 +220,7 @@ final class TypeUtils {
} }
@Nullable @Nullable
static SortOrder sortOrder(@Nullable Sort.Direction direction) { static SortOrder sortOrder(Sort.@Nullable Direction direction) {
if (direction == null) { if (direction == null) {
return null; return null;
@ -301,7 +301,7 @@ final class TypeUtils {
} }
@Nullable @Nullable
static OpType opType(@Nullable IndexQuery.OpType opType) { static OpType opType(IndexQuery.@Nullable OpType opType) {
if (opType != null) { if (opType != null) {
return switch (opType) { return switch (opType) {
@ -325,8 +325,7 @@ final class TypeUtils {
}; };
} }
@Nullable static UpdateResponse.@Nullable Result result(@Nullable Result result) {
static UpdateResponse.Result result(@Nullable Result result) {
if (result == null) { if (result == null) {
return null; return null;
@ -343,7 +342,7 @@ final class TypeUtils {
} }
@Nullable @Nullable
static ScoreMode scoreMode(@Nullable RescorerQuery.ScoreMode scoreMode) { static ScoreMode scoreMode(RescorerQuery.@Nullable ScoreMode scoreMode) {
if (scoreMode == null) { if (scoreMode == null) {
return null; return null;
@ -361,7 +360,7 @@ final class TypeUtils {
} }
@Nullable @Nullable
static SearchType searchType(@Nullable Query.SearchType searchType) { static SearchType searchType(Query.@Nullable SearchType searchType) {
if (searchType == null) { if (searchType == null) {
return null; return null;
@ -418,7 +417,7 @@ final class TypeUtils {
@Nullable @Nullable
static VersionType versionType( static VersionType versionType(
@Nullable org.springframework.data.elasticsearch.annotations.Document.VersionType versionType) { org.springframework.data.elasticsearch.annotations.Document.@Nullable VersionType versionType) {
if (versionType != null) { if (versionType != null) {
return switch (versionType) { return switch (versionType) {
@ -536,7 +535,7 @@ final class TypeUtils {
* @param scoreMode spring-data-elasticsearch {@literal scoreMode}. * @param scoreMode spring-data-elasticsearch {@literal scoreMode}.
* @return an Elasticsearch {@literal scoreMode}. * @return an Elasticsearch {@literal scoreMode}.
*/ */
static ChildScoreMode scoreMode(@Nullable HasChildQuery.ScoreMode scoreMode) { static ChildScoreMode scoreMode(HasChildQuery.@Nullable ScoreMode scoreMode) {
if (scoreMode == null) { if (scoreMode == null) {
return ChildScoreMode.None; return ChildScoreMode.None;
} }

View File

@ -19,11 +19,11 @@ import co.elastic.clients.elasticsearch._types.mapping.RuntimeFieldType;
import co.elastic.clients.elasticsearch._types.mapping.TypeMapping; import co.elastic.clients.elasticsearch._types.mapping.TypeMapping;
import co.elastic.clients.elasticsearch.indices.IndexSettings; import co.elastic.clients.elasticsearch.indices.IndexSettings;
import co.elastic.clients.elasticsearch.indices.PutMappingRequest; import co.elastic.clients.elasticsearch.indices.PutMappingRequest;
import org.springframework.aot.hint.MemberCategory;
import org.jspecify.annotations.Nullable;
import org.springframework.aot.hint.RuntimeHints; import org.springframework.aot.hint.RuntimeHints;
import org.springframework.aot.hint.RuntimeHintsRegistrar; import org.springframework.aot.hint.RuntimeHintsRegistrar;
import org.springframework.aot.hint.TypeReference; import org.springframework.aot.hint.TypeReference;
import org.springframework.lang.Nullable;
/** /**
* runtime hints for the Elasticsearch client libraries, as these do not provide any of their own. * runtime hints for the Elasticsearch client libraries, as these do not provide any of their own.

View File

@ -1,3 +1,2 @@
@org.springframework.lang.NonNullApi @org.jspecify.annotations.NullMarked
@org.springframework.lang.NonNullFields
package org.springframework.data.elasticsearch.client.elc.aot; package org.springframework.data.elasticsearch.client.elc.aot;

View File

@ -18,6 +18,5 @@
* This package contains classes that use the new Elasticsearch client library (co.elastic.clients:elasticsearch-java) * This package contains classes that use the new Elasticsearch client library (co.elastic.clients:elasticsearch-java)
* to access Elasticsearch. * to access Elasticsearch.
*/ */
@org.springframework.lang.NonNullApi @org.jspecify.annotations.NullMarked
@org.springframework.lang.NonNullFields
package org.springframework.data.elasticsearch.client.elc; package org.springframework.data.elasticsearch.client.elc;

View File

@ -1,3 +1,2 @@
@org.springframework.lang.NonNullApi @org.jspecify.annotations.NullMarked
@org.springframework.lang.NonNullFields
package org.springframework.data.elasticsearch.client; package org.springframework.data.elasticsearch.client;

View File

@ -19,7 +19,7 @@ import java.util.LinkedHashSet;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import org.springframework.lang.Nullable; import org.jspecify.annotations.Nullable;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
/** /**

View File

@ -1,3 +1,2 @@
@org.springframework.lang.NonNullApi @org.jspecify.annotations.NullMarked
@org.springframework.lang.NonNullFields
package org.springframework.data.elasticsearch.client.util; package org.springframework.data.elasticsearch.client.util;

View File

@ -17,6 +17,7 @@ package org.springframework.data.elasticsearch.config;
import static org.springframework.data.config.ParsingUtils.*; import static org.springframework.data.config.ParsingUtils.*;
import org.jspecify.annotations.Nullable;
import org.springframework.beans.factory.support.AbstractBeanDefinition; import org.springframework.beans.factory.support.AbstractBeanDefinition;
import org.springframework.beans.factory.support.BeanDefinitionBuilder; import org.springframework.beans.factory.support.BeanDefinitionBuilder;
import org.springframework.beans.factory.support.BeanDefinitionRegistry; import org.springframework.beans.factory.support.BeanDefinitionRegistry;
@ -28,7 +29,6 @@ import org.springframework.data.auditing.config.IsNewAwareAuditingHandlerBeanDef
import org.springframework.data.elasticsearch.core.event.AuditingEntityCallback; import org.springframework.data.elasticsearch.core.event.AuditingEntityCallback;
import org.springframework.data.elasticsearch.core.event.ReactiveAuditingEntityCallback; import org.springframework.data.elasticsearch.core.event.ReactiveAuditingEntityCallback;
import org.springframework.data.elasticsearch.core.mapping.SimpleElasticsearchMappingContext; import org.springframework.data.elasticsearch.core.mapping.SimpleElasticsearchMappingContext;
import org.springframework.lang.Nullable;
import org.springframework.util.ClassUtils; import org.springframework.util.ClassUtils;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import org.w3c.dom.Element; import org.w3c.dom.Element;

View File

@ -20,6 +20,7 @@ import java.util.Collections;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;
import org.jspecify.annotations.Nullable;
import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider; import org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider;
@ -34,7 +35,6 @@ import org.springframework.data.elasticsearch.core.convert.MappingElasticsearchC
import org.springframework.data.elasticsearch.core.mapping.SimpleElasticsearchMappingContext; import org.springframework.data.elasticsearch.core.mapping.SimpleElasticsearchMappingContext;
import org.springframework.data.mapping.model.FieldNamingStrategy; import org.springframework.data.mapping.model.FieldNamingStrategy;
import org.springframework.data.mapping.model.PropertyNameFieldNamingStrategy; import org.springframework.data.mapping.model.PropertyNameFieldNamingStrategy;
import org.springframework.lang.Nullable;
import org.springframework.util.ClassUtils; import org.springframework.util.ClassUtils;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;

View File

@ -1,3 +1,2 @@
@org.springframework.lang.NonNullApi @org.jspecify.annotations.NullMarked
@org.springframework.lang.NonNullFields
package org.springframework.data.elasticsearch.config; package org.springframework.data.elasticsearch.config;

View File

@ -24,6 +24,7 @@ import java.util.Objects;
import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletableFuture;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import org.jspecify.annotations.Nullable;
import org.springframework.beans.BeansException; import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware; import org.springframework.context.ApplicationContextAware;
@ -57,7 +58,6 @@ import org.springframework.data.elasticsearch.support.VersionInfo;
import org.springframework.data.mapping.callback.EntityCallbacks; import org.springframework.data.mapping.callback.EntityCallbacks;
import org.springframework.data.mapping.context.MappingContext; import org.springframework.data.mapping.context.MappingContext;
import org.springframework.data.util.Streamable; import org.springframework.data.util.Streamable;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;

View File

@ -26,6 +26,7 @@ import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicBoolean;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import org.jspecify.annotations.Nullable;
import org.reactivestreams.Subscriber; import org.reactivestreams.Subscriber;
import org.reactivestreams.Subscription; import org.reactivestreams.Subscription;
import org.springframework.beans.BeansException; import org.springframework.beans.BeansException;
@ -56,7 +57,6 @@ import org.springframework.data.elasticsearch.core.script.Script;
import org.springframework.data.elasticsearch.core.suggest.response.Suggest; import org.springframework.data.elasticsearch.core.suggest.response.Suggest;
import org.springframework.data.elasticsearch.support.VersionInfo; import org.springframework.data.elasticsearch.support.VersionInfo;
import org.springframework.data.mapping.callback.ReactiveEntityCallbacks; import org.springframework.data.mapping.callback.ReactiveEntityCallbacks;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert; import org.springframework.util.Assert;
/** /**

View File

@ -18,6 +18,7 @@ package org.springframework.data.elasticsearch.core;
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;
import org.jspecify.annotations.Nullable;
import org.springframework.data.elasticsearch.core.mapping.IndexCoordinates; import org.springframework.data.elasticsearch.core.mapping.IndexCoordinates;
import org.springframework.data.elasticsearch.core.query.BulkOptions; import org.springframework.data.elasticsearch.core.query.BulkOptions;
import org.springframework.data.elasticsearch.core.query.ByQueryResponse; import org.springframework.data.elasticsearch.core.query.ByQueryResponse;
@ -28,7 +29,6 @@ import org.springframework.data.elasticsearch.core.query.UpdateQuery;
import org.springframework.data.elasticsearch.core.query.UpdateResponse; import org.springframework.data.elasticsearch.core.query.UpdateResponse;
import org.springframework.data.elasticsearch.core.reindex.ReindexRequest; import org.springframework.data.elasticsearch.core.reindex.ReindexRequest;
import org.springframework.data.elasticsearch.core.reindex.ReindexResponse; import org.springframework.data.elasticsearch.core.reindex.ReindexResponse;
import org.springframework.lang.Nullable;
/** /**
* The operations for the * The operations for the

View File

@ -15,13 +15,13 @@
*/ */
package org.springframework.data.elasticsearch.core; package org.springframework.data.elasticsearch.core;
import org.jspecify.annotations.Nullable;
import org.springframework.data.elasticsearch.core.cluster.ClusterOperations; import org.springframework.data.elasticsearch.core.cluster.ClusterOperations;
import org.springframework.data.elasticsearch.core.convert.ElasticsearchConverter; import org.springframework.data.elasticsearch.core.convert.ElasticsearchConverter;
import org.springframework.data.elasticsearch.core.mapping.IndexCoordinates; import org.springframework.data.elasticsearch.core.mapping.IndexCoordinates;
import org.springframework.data.elasticsearch.core.routing.RoutingResolver; import org.springframework.data.elasticsearch.core.routing.RoutingResolver;
import org.springframework.data.elasticsearch.core.script.ScriptOperations; import org.springframework.data.elasticsearch.core.script.ScriptOperations;
import org.springframework.data.elasticsearch.core.sql.SqlOperations; import org.springframework.data.elasticsearch.core.sql.SqlOperations;
import org.springframework.lang.Nullable;
/** /**
* ElasticsearchOperations. Since 4.0 this interface only contains common helper functions, the other methods have been * ElasticsearchOperations. Since 4.0 this interface only contains common helper functions, the other methods have been

View File

@ -17,6 +17,7 @@ package org.springframework.data.elasticsearch.core;
import java.util.Map; import java.util.Map;
import org.jspecify.annotations.Nullable;
import org.springframework.core.convert.ConversionService; import org.springframework.core.convert.ConversionService;
import org.springframework.data.elasticsearch.core.convert.ElasticsearchConverter; import org.springframework.data.elasticsearch.core.convert.ElasticsearchConverter;
import org.springframework.data.elasticsearch.core.join.JoinField; import org.springframework.data.elasticsearch.core.join.JoinField;
@ -29,7 +30,6 @@ import org.springframework.data.mapping.IdentifierAccessor;
import org.springframework.data.mapping.PersistentPropertyAccessor; import org.springframework.data.mapping.PersistentPropertyAccessor;
import org.springframework.data.mapping.context.MappingContext; import org.springframework.data.mapping.context.MappingContext;
import org.springframework.data.mapping.model.ConvertingPropertyAccessor; import org.springframework.data.mapping.model.ConvertingPropertyAccessor;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert; import org.springframework.util.Assert;
/** /**
@ -123,7 +123,7 @@ public class EntityOperations {
// Only deal with text because ES generated Ids are strings! // Only deal with text because ES generated Ids are strings!
if (indexedObjectInformation.id() != null && idProperty != null if (indexedObjectInformation.id() != null && idProperty != null
// isReadable from the base class is false in case of records // isReadable from the base class is false in case of records
&& (idProperty.isReadable() || idProperty.getOwner().getType().isRecord()) && (idProperty.isReadable() || idProperty.getOwner().getType().isRecord())
&& idProperty.getType().isAssignableFrom(String.class)) { && idProperty.getType().isAssignableFrom(String.class)) {
propertyAccessor.setProperty(idProperty, indexedObjectInformation.id()); propertyAccessor.setProperty(idProperty, indexedObjectInformation.id());

View File

@ -18,10 +18,10 @@ package org.springframework.data.elasticsearch.core;
import java.util.List; import java.util.List;
import org.jspecify.annotations.Nullable;
import org.springframework.data.elasticsearch.core.document.Document; import org.springframework.data.elasticsearch.core.document.Document;
import org.springframework.data.elasticsearch.core.index.AliasData; import org.springframework.data.elasticsearch.core.index.AliasData;
import org.springframework.data.elasticsearch.core.index.Settings; import org.springframework.data.elasticsearch.core.index.Settings;
import org.springframework.lang.Nullable;
/** /**
* Immutable object that holds information(name, settings, mappings, aliases) about an Index * Immutable object that holds information(name, settings, mappings, aliases) about an Index

View File

@ -19,10 +19,10 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
import org.jspecify.annotations.Nullable;
import org.springframework.data.elasticsearch.core.document.Document; import org.springframework.data.elasticsearch.core.document.Document;
import org.springframework.data.elasticsearch.core.index.*; import org.springframework.data.elasticsearch.core.index.*;
import org.springframework.data.elasticsearch.core.mapping.IndexCoordinates; import org.springframework.data.elasticsearch.core.mapping.IndexCoordinates;
import org.springframework.lang.Nullable;
/** /**
* The operations for the * The operations for the

View File

@ -22,10 +22,10 @@ import java.util.Map;
import java.util.Objects; import java.util.Objects;
import java.util.Set; import java.util.Set;
import org.jspecify.annotations.Nullable;
import org.springframework.data.elasticsearch.core.document.Document; import org.springframework.data.elasticsearch.core.document.Document;
import org.springframework.data.elasticsearch.core.index.*; import org.springframework.data.elasticsearch.core.index.*;
import org.springframework.data.elasticsearch.core.mapping.IndexCoordinates; import org.springframework.data.elasticsearch.core.mapping.IndexCoordinates;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert; import org.springframework.util.Assert;
/** /**

View File

@ -15,7 +15,7 @@
*/ */
package org.springframework.data.elasticsearch.core; package org.springframework.data.elasticsearch.core;
import org.springframework.lang.Nullable; import org.jspecify.annotations.Nullable;
/** /**
* Value class capturing information about a newly indexed document in Elasticsearch. * Value class capturing information about a newly indexed document in Elasticsearch.

View File

@ -15,8 +15,8 @@
*/ */
package org.springframework.data.elasticsearch.core; package org.springframework.data.elasticsearch.core;
import org.jspecify.annotations.Nullable;
import org.springframework.data.elasticsearch.ElasticsearchErrorCause; import org.springframework.data.elasticsearch.ElasticsearchErrorCause;
import org.springframework.lang.Nullable;
/** /**
* Response object for items returned from multiget requests, encapsulating the returned data and potential error * Response object for items returned from multiget requests, encapsulating the returned data and potential error

View File

@ -15,6 +15,7 @@
*/ */
package org.springframework.data.elasticsearch.core; package org.springframework.data.elasticsearch.core;
import org.jspecify.annotations.Nullable;
import org.springframework.data.elasticsearch.core.cluster.ReactiveClusterOperations; import org.springframework.data.elasticsearch.core.cluster.ReactiveClusterOperations;
import org.springframework.data.elasticsearch.core.convert.ElasticsearchConverter; import org.springframework.data.elasticsearch.core.convert.ElasticsearchConverter;
import org.springframework.data.elasticsearch.core.mapping.ElasticsearchPersistentEntity; import org.springframework.data.elasticsearch.core.mapping.ElasticsearchPersistentEntity;
@ -22,7 +23,6 @@ import org.springframework.data.elasticsearch.core.mapping.IndexCoordinates;
import org.springframework.data.elasticsearch.core.routing.RoutingResolver; import org.springframework.data.elasticsearch.core.routing.RoutingResolver;
import org.springframework.data.elasticsearch.core.script.ReactiveScriptOperations; import org.springframework.data.elasticsearch.core.script.ReactiveScriptOperations;
import org.springframework.data.elasticsearch.core.sql.ReactiveSqlOperations; import org.springframework.data.elasticsearch.core.sql.ReactiveSqlOperations;
import org.springframework.lang.Nullable;
/** /**
* Interface that specifies a basic set of Elasticsearch operations executed in a reactive way. * Interface that specifies a basic set of Elasticsearch operations executed in a reactive way.

View File

@ -19,8 +19,8 @@ import reactor.core.publisher.Flux;
import java.time.Duration; import java.time.Duration;
import org.jspecify.annotations.Nullable;
import org.springframework.data.elasticsearch.core.suggest.response.Suggest; import org.springframework.data.elasticsearch.core.suggest.response.Suggest;
import org.springframework.lang.Nullable;
/** /**
* Encapsulates a Flux of {@link SearchHit}s with additional information from the search. * Encapsulates a Flux of {@link SearchHit}s with additional information from the search.

View File

@ -19,8 +19,8 @@ import reactor.core.publisher.Flux;
import java.time.Duration; import java.time.Duration;
import org.jspecify.annotations.Nullable;
import org.springframework.data.elasticsearch.core.suggest.response.Suggest; import org.springframework.data.elasticsearch.core.suggest.response.Suggest;
import org.springframework.lang.Nullable;
/** /**
* @author Peter-Josef Meisch * @author Peter-Josef Meisch

View File

@ -23,9 +23,9 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import org.jspecify.annotations.Nullable;
import org.springframework.data.elasticsearch.core.document.Explanation; import org.springframework.data.elasticsearch.core.document.Explanation;
import org.springframework.data.elasticsearch.core.document.NestedMetaData; import org.springframework.data.elasticsearch.core.document.NestedMetaData;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert; import org.springframework.util.Assert;
/** /**

View File

@ -23,6 +23,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import org.jspecify.annotations.Nullable;
import org.springframework.data.elasticsearch.UncategorizedElasticsearchException; import org.springframework.data.elasticsearch.UncategorizedElasticsearchException;
import org.springframework.data.elasticsearch.core.convert.ElasticsearchConverter; import org.springframework.data.elasticsearch.core.convert.ElasticsearchConverter;
import org.springframework.data.elasticsearch.core.document.Document; import org.springframework.data.elasticsearch.core.document.Document;
@ -34,7 +35,6 @@ import org.springframework.data.elasticsearch.core.mapping.ElasticsearchPersiste
import org.springframework.data.elasticsearch.core.suggest.response.CompletionSuggestion; import org.springframework.data.elasticsearch.core.suggest.response.CompletionSuggestion;
import org.springframework.data.elasticsearch.core.suggest.response.Suggest; import org.springframework.data.elasticsearch.core.suggest.response.Suggest;
import org.springframework.data.mapping.context.MappingContext; import org.springframework.data.mapping.context.MappingContext;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert; import org.springframework.util.Assert;
/** /**

View File

@ -21,11 +21,11 @@ import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.Stream; import java.util.stream.Stream;
import org.jspecify.annotations.Nullable;
import org.springframework.data.domain.PageImpl; import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import org.springframework.data.util.CloseableIterator; import org.springframework.data.util.CloseableIterator;
import org.springframework.data.util.ReactiveWrappers; import org.springframework.data.util.ReactiveWrappers;
import org.springframework.lang.Nullable;
/** /**
* Utility class with helper methods for working with {@link SearchHit}. * Utility class with helper methods for working with {@link SearchHit}.

View File

@ -19,9 +19,9 @@ import java.time.Duration;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import org.jspecify.annotations.Nullable;
import org.springframework.data.elasticsearch.core.suggest.response.Suggest; import org.springframework.data.elasticsearch.core.suggest.response.Suggest;
import org.springframework.data.util.Streamable; import org.springframework.data.util.Streamable;
import org.springframework.lang.Nullable;
/** /**
* Encapsulates a list of {@link SearchHit}s with additional information from the search. * Encapsulates a list of {@link SearchHit}s with additional information from the search.

View File

@ -19,9 +19,9 @@ import java.time.Duration;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import org.jspecify.annotations.Nullable;
import org.springframework.data.elasticsearch.core.suggest.response.Suggest; import org.springframework.data.elasticsearch.core.suggest.response.Suggest;
import org.springframework.data.util.Lazy; import org.springframework.data.util.Lazy;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert; import org.springframework.util.Assert;
/** /**

View File

@ -17,8 +17,8 @@ package org.springframework.data.elasticsearch.core;
import java.time.Duration; import java.time.Duration;
import org.jspecify.annotations.Nullable;
import org.springframework.data.util.CloseableIterator; import org.springframework.data.util.CloseableIterator;
import org.springframework.lang.Nullable;
/** /**
* A {@link SearchHitsIterator} encapsulates {@link SearchHit} results that can be wrapped in a Java 8 * A {@link SearchHitsIterator} encapsulates {@link SearchHit} results that can be wrapped in a Java 8

View File

@ -18,11 +18,11 @@ package org.springframework.data.elasticsearch.core;
import java.time.Duration; import java.time.Duration;
import java.util.List; import java.util.List;
import org.jspecify.annotations.Nullable;
import org.springframework.data.elasticsearch.core.mapping.IndexCoordinates; import org.springframework.data.elasticsearch.core.mapping.IndexCoordinates;
import org.springframework.data.elasticsearch.core.query.BaseQueryBuilder; import org.springframework.data.elasticsearch.core.query.BaseQueryBuilder;
import org.springframework.data.elasticsearch.core.query.MoreLikeThisQuery; import org.springframework.data.elasticsearch.core.query.MoreLikeThisQuery;
import org.springframework.data.elasticsearch.core.query.Query; import org.springframework.data.elasticsearch.core.query.Query;
import org.springframework.lang.Nullable;
/** /**
* The operations for the * The operations for the
@ -233,7 +233,8 @@ public interface SearchOperations {
Query idsQuery(List<String> ids); Query idsQuery(List<String> ids);
/** /**
* Creates a {@link BaseQueryBuilder} that has the given ids setto the parameter value. No other properties of the bulder are set. * Creates a {@link BaseQueryBuilder} that has the given ids setto the parameter value. No other properties of the
* bulder are set.
* *
* @param ids the list of ids must not be {@literal null} * @param ids the list of ids must not be {@literal null}
* @return query returning the documents with the given ids * @return query returning the documents with the given ids

View File

@ -15,7 +15,7 @@
*/ */
package org.springframework.data.elasticsearch.core; package org.springframework.data.elasticsearch.core;
import org.springframework.lang.Nullable; import org.jspecify.annotations.Nullable;
/** /**
* This interface is used to expose the current {@code scrollId} from the underlying scroll context. * This interface is used to expose the current {@code scrollId} from the underlying scroll context.

View File

@ -17,8 +17,8 @@ package org.springframework.data.elasticsearch.core;
import java.util.List; import java.util.List;
import org.jspecify.annotations.Nullable;
import org.springframework.data.elasticsearch.ElasticsearchErrorCause; import org.springframework.data.elasticsearch.ElasticsearchErrorCause;
import org.springframework.lang.Nullable;
/** /**
* @author Haibo Liu * @author Haibo Liu

View File

@ -23,8 +23,8 @@ import java.util.concurrent.atomic.AtomicInteger;
import java.util.function.Consumer; import java.util.function.Consumer;
import java.util.function.Function; import java.util.function.Function;
import org.jspecify.annotations.Nullable;
import org.springframework.data.elasticsearch.client.util.ScrollState; import org.springframework.data.elasticsearch.client.util.ScrollState;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert; import org.springframework.util.Assert;
/** /**

View File

@ -1,6 +1,5 @@
/** /**
* Interfaces and classes related to Elasticsearch cluster information and management. * Interfaces and classes related to Elasticsearch cluster information and management.
*/ */
@org.springframework.lang.NonNullApi @org.jspecify.annotations.NullMarked
@org.springframework.lang.NonNullFields
package org.springframework.data.elasticsearch.core.cluster; package org.springframework.data.elasticsearch.core.cluster;

View File

@ -19,6 +19,7 @@ import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.jspecify.annotations.Nullable;
import org.springframework.data.convert.DefaultTypeMapper; import org.springframework.data.convert.DefaultTypeMapper;
import org.springframework.data.convert.SimpleTypeInformationMapper; import org.springframework.data.convert.SimpleTypeInformationMapper;
import org.springframework.data.convert.TypeAliasAccessor; import org.springframework.data.convert.TypeAliasAccessor;
@ -27,7 +28,6 @@ import org.springframework.data.mapping.Alias;
import org.springframework.data.mapping.PersistentEntity; import org.springframework.data.mapping.PersistentEntity;
import org.springframework.data.mapping.context.MappingContext; import org.springframework.data.mapping.context.MappingContext;
import org.springframework.data.util.TypeInformation; import org.springframework.data.util.TypeInformation;
import org.springframework.lang.Nullable;
/** /**
* Elasticsearch specific {@link org.springframework.data.convert.TypeMapper} implementation. * Elasticsearch specific {@link org.springframework.data.convert.TypeMapper} implementation.

View File

@ -15,6 +15,7 @@
*/ */
package org.springframework.data.elasticsearch.core.convert; package org.springframework.data.elasticsearch.core.convert;
import org.jspecify.annotations.Nullable;
import org.springframework.data.convert.EntityConverter; import org.springframework.data.convert.EntityConverter;
import org.springframework.data.elasticsearch.core.document.Document; import org.springframework.data.elasticsearch.core.document.Document;
import org.springframework.data.elasticsearch.core.mapping.ElasticsearchPersistentEntity; import org.springframework.data.elasticsearch.core.mapping.ElasticsearchPersistentEntity;
@ -23,7 +24,6 @@ import org.springframework.data.elasticsearch.core.mapping.PropertyValueConverte
import org.springframework.data.elasticsearch.core.query.Query; import org.springframework.data.elasticsearch.core.query.Query;
import org.springframework.data.projection.ProjectionFactory; import org.springframework.data.projection.ProjectionFactory;
import org.springframework.data.projection.SpelAwareProxyProjectionFactory; import org.springframework.data.projection.SpelAwareProxyProjectionFactory;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert; import org.springframework.util.Assert;
/** /**

View File

@ -17,11 +17,11 @@ package org.springframework.data.elasticsearch.core.convert;
import java.util.Map; import java.util.Map;
import org.jspecify.annotations.Nullable;
import org.springframework.data.convert.TypeMapper; import org.springframework.data.convert.TypeMapper;
import org.springframework.data.elasticsearch.core.mapping.ElasticsearchPersistentEntity; import org.springframework.data.elasticsearch.core.mapping.ElasticsearchPersistentEntity;
import org.springframework.data.elasticsearch.core.mapping.ElasticsearchPersistentProperty; import org.springframework.data.elasticsearch.core.mapping.ElasticsearchPersistentProperty;
import org.springframework.data.mapping.context.MappingContext; import org.springframework.data.mapping.context.MappingContext;
import org.springframework.lang.Nullable;
/** /**
* Elasticsearch specific {@link TypeMapper} definition. * Elasticsearch specific {@link TypeMapper} definition.

View File

@ -15,7 +15,7 @@
*/ */
package org.springframework.data.elasticsearch.core.convert; package org.springframework.data.elasticsearch.core.convert;
import org.springframework.lang.Nullable; import org.jspecify.annotations.Nullable;
/** /**
* @since 5.3 * @since 5.3

View File

@ -24,6 +24,7 @@ import java.util.stream.Collectors;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jspecify.annotations.Nullable;
import org.springframework.beans.BeansException; import org.springframework.beans.BeansException;
import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.InitializingBean;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
@ -65,7 +66,6 @@ import org.springframework.data.mapping.model.*;
import org.springframework.data.util.TypeInformation; import org.springframework.data.util.TypeInformation;
import org.springframework.expression.spel.standard.SpelExpressionParser; import org.springframework.expression.spel.standard.SpelExpressionParser;
import org.springframework.format.datetime.DateFormatterRegistrar; import org.springframework.format.datetime.DateFormatterRegistrar;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import org.springframework.util.ClassUtils; import org.springframework.util.ClassUtils;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;

View File

@ -1,3 +1,2 @@
@org.springframework.lang.NonNullApi @org.jspecify.annotations.NullMarked
@org.springframework.lang.NonNullFields
package org.springframework.data.elasticsearch.core.convert; package org.springframework.data.elasticsearch.core.convert;

View File

@ -20,9 +20,9 @@ import java.util.LinkedHashMap;
import java.util.Map; import java.util.Map;
import java.util.function.Function; import java.util.function.Function;
import org.jspecify.annotations.Nullable;
import org.springframework.data.elasticsearch.core.convert.ConversionException; import org.springframework.data.elasticsearch.core.convert.ConversionException;
import org.springframework.data.elasticsearch.support.StringObjectMap; import org.springframework.data.elasticsearch.support.StringObjectMap;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert; import org.springframework.util.Assert;
/** /**

View File

@ -18,7 +18,7 @@ package org.springframework.data.elasticsearch.core.document;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
import org.springframework.lang.Nullable; import org.jspecify.annotations.Nullable;
import org.springframework.util.Assert; import org.springframework.util.Assert;
/** /**

View File

@ -21,10 +21,9 @@ import java.util.Map;
import java.util.Set; import java.util.Set;
import java.util.function.BiConsumer; import java.util.function.BiConsumer;
import org.jspecify.annotations.Nullable;
import org.springframework.data.elasticsearch.support.DefaultStringObjectMap; import org.springframework.data.elasticsearch.support.DefaultStringObjectMap;
import org.springframework.data.elasticsearch.support.StringObjectMap;
import org.springframework.data.mapping.MappingException; import org.springframework.data.mapping.MappingException;
import org.springframework.lang.Nullable;
import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;

View File

@ -15,7 +15,7 @@
*/ */
package org.springframework.data.elasticsearch.core.document; package org.springframework.data.elasticsearch.core.document;
import org.springframework.lang.Nullable; import org.jspecify.annotations.Nullable;
/** /**
* meta data returned for nested inner hits. * meta data returned for nested inner hits.

View File

@ -18,7 +18,7 @@ package org.springframework.data.elasticsearch.core.document;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.springframework.lang.Nullable; import org.jspecify.annotations.Nullable;
/** /**
* Extension to {@link Document} exposing search response related data. * Extension to {@link Document} exposing search response related data.

View File

@ -22,7 +22,7 @@ import java.util.Map;
import java.util.Set; import java.util.Set;
import java.util.function.BiConsumer; import java.util.function.BiConsumer;
import org.springframework.lang.Nullable; import org.jspecify.annotations.Nullable;
/** /**
* {@link SearchDocument} implementation using a {@link Document} delegate. * {@link SearchDocument} implementation using a {@link Document} delegate.

View File

@ -20,10 +20,10 @@ import java.util.List;
import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletableFuture;
import java.util.function.Function; import java.util.function.Function;
import org.jspecify.annotations.Nullable;
import org.springframework.data.elasticsearch.core.AggregationsContainer; import org.springframework.data.elasticsearch.core.AggregationsContainer;
import org.springframework.data.elasticsearch.core.SearchShardStatistics; import org.springframework.data.elasticsearch.core.SearchShardStatistics;
import org.springframework.data.elasticsearch.core.suggest.response.Suggest; import org.springframework.data.elasticsearch.core.suggest.response.Suggest;
import org.springframework.lang.Nullable;
/** /**
* This represents the complete search response from Elasticsearch, including the returned documents. * This represents the complete search response from Elasticsearch, including the returned documents.

View File

@ -1,6 +1,5 @@
/** /**
* Classes related to the Document structure of Elasticsearch documents and search responses. * Classes related to the Document structure of Elasticsearch documents and search responses.
*/ */
@org.springframework.lang.NonNullApi @org.jspecify.annotations.NullMarked
@org.springframework.lang.NonNullFields
package org.springframework.data.elasticsearch.core.document; package org.springframework.data.elasticsearch.core.document;

View File

@ -1,6 +1,5 @@
/** /**
* classes and interfaces related to Spring Data Elasticsearch events and callbacks. * classes and interfaces related to Spring Data Elasticsearch events and callbacks.
*/ */
@org.springframework.lang.NonNullApi @org.jspecify.annotations.NullMarked
@org.springframework.lang.NonNullFields
package org.springframework.data.elasticsearch.core.event; package org.springframework.data.elasticsearch.core.event;

View File

@ -1,3 +1,2 @@
@org.springframework.lang.NonNullApi @org.jspecify.annotations.NullMarked
@org.springframework.lang.NonNullFields
package org.springframework.data.elasticsearch.core.geo; package org.springframework.data.elasticsearch.core.geo;

View File

@ -15,8 +15,8 @@
*/ */
package org.springframework.data.elasticsearch.core.index; package org.springframework.data.elasticsearch.core.index;
import org.jspecify.annotations.Nullable;
import org.springframework.data.elasticsearch.core.query.Query; import org.springframework.data.elasticsearch.core.query.Query;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert; import org.springframework.util.Assert;
/** /**

View File

@ -20,7 +20,7 @@ import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import org.springframework.lang.Nullable; import org.jspecify.annotations.Nullable;
/** /**
* Class to define to actions to execute in alias management functions. * Class to define to actions to execute in alias management functions.

View File

@ -15,8 +15,8 @@
*/ */
package org.springframework.data.elasticsearch.core.index; package org.springframework.data.elasticsearch.core.index;
import org.jspecify.annotations.Nullable;
import org.springframework.data.elasticsearch.core.query.Query; import org.springframework.data.elasticsearch.core.query.Query;
import org.springframework.lang.Nullable;
/** /**
* value object to describe alias information. * value object to describe alias information.

View File

@ -17,8 +17,8 @@ package org.springframework.data.elasticsearch.core.index;
import java.util.Map; import java.util.Map;
import org.jspecify.annotations.Nullable;
import org.springframework.data.elasticsearch.core.document.Document; import org.springframework.data.elasticsearch.core.document.Document;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert; import org.springframework.util.Assert;
/** /**

View File

@ -17,8 +17,8 @@ package org.springframework.data.elasticsearch.core.index;
import java.io.IOException; import java.io.IOException;
import org.jspecify.annotations.Nullable;
import org.springframework.data.elasticsearch.annotations.GeoShapeField; import org.springframework.data.elasticsearch.annotations.GeoShapeField;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import com.fasterxml.jackson.databind.node.ObjectNode; import com.fasterxml.jackson.databind.node.ObjectNode;

View File

@ -29,6 +29,7 @@ import java.util.stream.Collectors;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.jspecify.annotations.Nullable;
import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.ClassPathResource;
import org.springframework.data.annotation.Transient; import org.springframework.data.annotation.Transient;
import org.springframework.data.elasticsearch.annotations.*; import org.springframework.data.elasticsearch.annotations.*;
@ -42,7 +43,6 @@ import org.springframework.data.elasticsearch.core.mapping.ElasticsearchPersiste
import org.springframework.data.mapping.MappingException; import org.springframework.data.mapping.MappingException;
import org.springframework.data.mapping.PropertyHandler; import org.springframework.data.mapping.PropertyHandler;
import org.springframework.data.util.TypeInformation; import org.springframework.data.util.TypeInformation;
import org.springframework.lang.Nullable;
import org.springframework.util.StreamUtils; import org.springframework.util.StreamUtils;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
@ -130,14 +130,13 @@ public class MappingBuilder {
} }
protected String buildPropertyMapping(ElasticsearchPersistentEntity<?> entity, protected String buildPropertyMapping(ElasticsearchPersistentEntity<?> entity,
@Nullable org.springframework.data.elasticsearch.core.document.Document runtimeFields) { org.springframework.data.elasticsearch.core.document.@Nullable Document runtimeFields) {
InternalBuilder internalBuilder = new InternalBuilder(); InternalBuilder internalBuilder = new InternalBuilder();
return internalBuilder.buildPropertyMapping(entity, runtimeFields); return internalBuilder.buildPropertyMapping(entity, runtimeFields);
} }
@Nullable private org.springframework.data.elasticsearch.core.document.@Nullable Document getRuntimeFields(
private org.springframework.data.elasticsearch.core.document.Document getRuntimeFields(
@Nullable ElasticsearchPersistentEntity<?> entity) { @Nullable ElasticsearchPersistentEntity<?> entity) {
if (entity != null) { if (entity != null) {
@ -161,7 +160,7 @@ public class MappingBuilder {
private String nestedPropertyPrefix = ""; private String nestedPropertyPrefix = "";
protected String buildPropertyMapping(ElasticsearchPersistentEntity<?> entity, protected String buildPropertyMapping(ElasticsearchPersistentEntity<?> entity,
@Nullable org.springframework.data.elasticsearch.core.document.Document runtimeFields) { org.springframework.data.elasticsearch.core.document.@Nullable Document runtimeFields) {
try { try {

View File

@ -23,8 +23,8 @@ import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import org.jspecify.annotations.Nullable;
import org.springframework.data.elasticsearch.annotations.*; import org.springframework.data.elasticsearch.annotations.*;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;

View File

@ -17,7 +17,7 @@ package org.springframework.data.elasticsearch.core.index;
import java.time.Duration; import java.time.Duration;
import org.springframework.lang.Nullable; import org.jspecify.annotations.Nullable;
import org.springframework.util.Assert; import org.springframework.util.Assert;
/** /**
@ -26,6 +26,7 @@ import org.springframework.util.Assert;
*/ */
public record PutComponentTemplateRequest(String name, @Nullable Long version, @Nullable Boolean create, public record PutComponentTemplateRequest(String name, @Nullable Long version, @Nullable Boolean create,
@Nullable Duration masterTimeout, ComponentTemplateRequestData template) { @Nullable Duration masterTimeout, ComponentTemplateRequestData template) {
public PutComponentTemplateRequest { public PutComponentTemplateRequest {
Assert.notNull(name, "name must not be null"); Assert.notNull(name, "name must not be null");
Assert.notNull(template, "template must not be null"); Assert.notNull(template, "template must not be null");

View File

@ -17,8 +17,8 @@ package org.springframework.data.elasticsearch.core.index;
import java.util.List; import java.util.List;
import org.jspecify.annotations.Nullable;
import org.springframework.data.elasticsearch.core.document.Document; import org.springframework.data.elasticsearch.core.document.Document;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert; import org.springframework.util.Assert;
/** /**

View File

@ -15,12 +15,12 @@
*/ */
package org.springframework.data.elasticsearch.core.index; package org.springframework.data.elasticsearch.core.index;
import org.springframework.data.elasticsearch.core.document.Document;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import java.util.Map; import java.util.Map;
import org.jspecify.annotations.Nullable;
import org.springframework.data.elasticsearch.core.document.Document;
import org.springframework.util.Assert;
/** /**
* Request to create an index template. This is to create legacy templates (@see * Request to create an index template. This is to create legacy templates (@see
* https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates-v1.html) * https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates-v1.html)

View File

@ -19,13 +19,13 @@ import static org.springframework.util.StringUtils.*;
import reactor.core.publisher.Mono; import reactor.core.publisher.Mono;
import org.jspecify.annotations.Nullable;
import org.springframework.data.elasticsearch.annotations.Mapping; import org.springframework.data.elasticsearch.annotations.Mapping;
import org.springframework.data.elasticsearch.core.ReactiveResourceUtil; import org.springframework.data.elasticsearch.core.ReactiveResourceUtil;
import org.springframework.data.elasticsearch.core.convert.ElasticsearchConverter; import org.springframework.data.elasticsearch.core.convert.ElasticsearchConverter;
import org.springframework.data.elasticsearch.core.document.Document; import org.springframework.data.elasticsearch.core.document.Document;
import org.springframework.data.elasticsearch.core.mapping.ElasticsearchPersistentEntity; import org.springframework.data.elasticsearch.core.mapping.ElasticsearchPersistentEntity;
import org.springframework.data.mapping.MappingException; import org.springframework.data.mapping.MappingException;
import org.springframework.lang.Nullable;
/** /**
* Subclass of {@link MappingBuilder} with specialized methods To inhibit blocking calls * Subclass of {@link MappingBuilder} with specialized methods To inhibit blocking calls

View File

@ -17,8 +17,8 @@ package org.springframework.data.elasticsearch.core.index;
import java.util.Map; import java.util.Map;
import org.jspecify.annotations.Nullable;
import org.springframework.data.elasticsearch.core.document.Document; import org.springframework.data.elasticsearch.core.document.Document;
import org.springframework.lang.Nullable;
/** /**
* Data returned for template information retrieval. * Data returned for template information retrieval.

View File

@ -15,7 +15,7 @@
*/ */
package org.springframework.data.elasticsearch.core.index; package org.springframework.data.elasticsearch.core.index;
import org.springframework.lang.Nullable; import org.jspecify.annotations.Nullable;
import org.springframework.util.Assert; import org.springframework.util.Assert;
/** /**
@ -23,6 +23,7 @@ import org.springframework.util.Assert;
* @since 5.1 * @since 5.1
*/ */
public record TemplateResponse(String name, @Nullable Long version, @Nullable TemplateResponseData templateData) { public record TemplateResponse(String name, @Nullable Long version, @Nullable TemplateResponseData templateData) {
public TemplateResponse { public TemplateResponse {
Assert.notNull(name, "name must not be null"); Assert.notNull(name, "name must not be null");
} }

View File

@ -18,8 +18,8 @@ package org.springframework.data.elasticsearch.core.index;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.jspecify.annotations.Nullable;
import org.springframework.data.elasticsearch.core.document.Document; import org.springframework.data.elasticsearch.core.document.Document;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert; import org.springframework.util.Assert;
/** /**

View File

@ -1,6 +1,5 @@
/** /**
* Classes related to Elasticsearch index management. * Classes related to Elasticsearch index management.
*/ */
@org.springframework.lang.NonNullApi @org.jspecify.annotations.NullMarked
@org.springframework.lang.NonNullFields
package org.springframework.data.elasticsearch.core.index; package org.springframework.data.elasticsearch.core.index;

View File

@ -17,8 +17,8 @@ package org.springframework.data.elasticsearch.core.join;
import java.util.Objects; import java.util.Objects;
import org.jspecify.annotations.Nullable;
import org.springframework.data.annotation.PersistenceCreator; import org.springframework.data.annotation.PersistenceCreator;
import org.springframework.lang.Nullable;
/** /**
* @author Subhobrata Dey * @author Subhobrata Dey

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