diff --git a/vector-stores/spring-ai-elasticsearch-store/src/main/java/org/springframework/ai/vectorstore/ElasticsearchVectorStore.java b/vector-stores/spring-ai-elasticsearch-store/src/main/java/org/springframework/ai/vectorstore/ElasticsearchVectorStore.java index 2e4cef70c72..1ab7c1714e7 100644 --- a/vector-stores/spring-ai-elasticsearch-store/src/main/java/org/springframework/ai/vectorstore/ElasticsearchVectorStore.java +++ b/vector-stores/spring-ai-elasticsearch-store/src/main/java/org/springframework/ai/vectorstore/ElasticsearchVectorStore.java @@ -112,7 +112,7 @@ public ElasticsearchVectorStore(ElasticsearchVectorStoreOptions options, RestCli super(observationRegistry, customObservationConvention); this.initializeSchema = initializeSchema; - Objects.requireNonNull(embeddingModel, "RestClient must not be null"); + Objects.requireNonNull(restClient, "RestClient must not be null"); Objects.requireNonNull(embeddingModel, "EmbeddingModel must not be null"); String version = Version.VERSION == null ? "Unknown" : Version.VERSION.toString(); this.elasticsearchClient = new ElasticsearchClient(new RestClientTransport(restClient,