fix: missing 'embeddingFieldName' when configuring ES VectorStore (#3501)
Fixes: #3500
Signed-off-by: Jionghui Zheng <9uanhuo@gmail.com>
(cherry picked from commit 1f5dc3f739)
This commit is contained in:
@@ -45,6 +45,7 @@ import org.springframework.context.annotation.Bean;
|
||||
* @author Christian Tzolov
|
||||
* @author Soby Chacko
|
||||
* @author Jonghoon Park
|
||||
* @author Jionghui Zheng
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@AutoConfiguration(after = ElasticsearchRestClientAutoConfiguration.class)
|
||||
@@ -72,6 +73,9 @@ public class ElasticsearchVectorStoreAutoConfiguration {
|
||||
mapper.from(properties::getIndexName).whenHasText().to(elasticsearchVectorStoreOptions::setIndexName);
|
||||
mapper.from(properties::getDimensions).whenNonNull().to(elasticsearchVectorStoreOptions::setDimensions);
|
||||
mapper.from(properties::getSimilarity).whenNonNull().to(elasticsearchVectorStoreOptions::setSimilarity);
|
||||
mapper.from(properties::getEmbeddingFieldName)
|
||||
.whenHasText()
|
||||
.to(elasticsearchVectorStoreOptions::setEmbeddingFieldName);
|
||||
|
||||
return ElasticsearchVectorStore.builder(restClient, embeddingModel)
|
||||
.options(elasticsearchVectorStoreOptions)
|
||||
|
||||
Reference in New Issue
Block a user