fix(milvus): doSimilaritySearch to use the databaseName

- The doSimilaritySearch method did not pass the databaseName parameter in milvus 2.3.4 and before, resulting in the use of the default database; The current milvus upgrade to 2.3.5 supports passing the databaseName parameter
    - Update doSimilaritySearch to set the database name from the Milvus configuration
This commit is contained in:
周波
2024-10-31 09:58:31 +08:00
committed by Ilayaperumal Gopinathan
parent cdb590338c
commit 5a90beebac

View File

@@ -224,6 +224,7 @@ public class MilvusVectorStore extends AbstractObservationVectorStore implements
float[] embedding = this.embeddingModel.embed(request.getQuery());
var searchParamBuilder = SearchParam.newBuilder()
.withDatabaseName(this.config.databaseName)
.withCollectionName(this.config.collectionName)
.withConsistencyLevel(ConsistencyLevelEnum.STRONG)
.withMetricType(this.config.metricType)