Skip to content

Commit 6b963fe

Browse files
cycle2zhouleijendary
authored andcommitted
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 Signed-off-by: leijendary <[email protected]>
1 parent 91fddd6 commit 6b963fe

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

vector-stores/spring-ai-milvus-store/src/main/java/org/springframework/ai/vectorstore/MilvusVectorStore.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ public List<Document> doSimilaritySearch(SearchRequest request) {
224224
float[] embedding = this.embeddingModel.embed(request.getQuery());
225225

226226
var searchParamBuilder = SearchParam.newBuilder()
227+
.withDatabaseName(this.config.databaseName)
227228
.withCollectionName(this.config.collectionName)
228229
.withConsistencyLevel(ConsistencyLevelEnum.STRONG)
229230
.withMetricType(this.config.metricType)

0 commit comments

Comments
 (0)