Skip to content

Commit 518ba27

Browse files
9uanhuospring-builds
authored andcommitted
fix: missing 'embeddingFieldName' when configuring ES VectorStore (#3501)
Fixes: #3500 Signed-off-by: Jionghui Zheng <9uanhuo@gmail.com> (cherry picked from commit 1f5dc3f)
1 parent 95e9808 commit 518ba27

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-elasticsearch/src/main/java/org/springframework/ai/vectorstore/elasticsearch/autoconfigure/ElasticsearchVectorStoreAutoConfiguration.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
* @author Christian Tzolov
4646
* @author Soby Chacko
4747
* @author Jonghoon Park
48+
* @author Jionghui Zheng
4849
* @since 1.0.0
4950
*/
5051
@AutoConfiguration(after = ElasticsearchRestClientAutoConfiguration.class)
@@ -72,6 +73,9 @@ ElasticsearchVectorStore vectorStore(ElasticsearchVectorStoreProperties properti
7273
mapper.from(properties::getIndexName).whenHasText().to(elasticsearchVectorStoreOptions::setIndexName);
7374
mapper.from(properties::getDimensions).whenNonNull().to(elasticsearchVectorStoreOptions::setDimensions);
7475
mapper.from(properties::getSimilarity).whenNonNull().to(elasticsearchVectorStoreOptions::setSimilarity);
76+
mapper.from(properties::getEmbeddingFieldName)
77+
.whenHasText()
78+
.to(elasticsearchVectorStoreOptions::setEmbeddingFieldName);
7579

7680
return ElasticsearchVectorStore.builder(restClient, embeddingModel)
7781
.options(elasticsearchVectorStoreOptions)

0 commit comments

Comments
 (0)