Skip to content

Commit

Permalink
fix(milvus): doSimilaritySearch to use the databaseName
Browse files Browse the repository at this point in the history
 - 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
  • Loading branch information
cycle2zhou authored and ilayaperumalg committed Nov 4, 2024
1 parent cdb5903 commit 5a90bee
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ public List<Document> doSimilaritySearch(SearchRequest request) {
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)
Expand Down

0 comments on commit 5a90bee

Please sign in to comment.