enhance: [GoSDK] Pass `UseDefaultConsistency` flag for query option (#39515)

If the flag is not passed, the behaviors will not be expected when user
not passing consistency level.

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
pull/38775/head
congqixia 2025-01-23 14:21:14 +08:00 committed by GitHub
parent 7476eb3625
commit 70c53f787e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 3 deletions

View File

@ -523,9 +523,10 @@ func (opt *queryOption) Request() (*milvuspb.QueryRequest, error) {
PartitionNames: opt.partitionNames,
OutputFields: opt.outputFields,
Expr: opt.expr,
QueryParams: entity.MapKvPairs(opt.queryParams),
ConsistencyLevel: opt.consistencyLevel.CommonConsistencyLevel(),
Expr: opt.expr,
QueryParams: entity.MapKvPairs(opt.queryParams),
ConsistencyLevel: opt.consistencyLevel.CommonConsistencyLevel(),
UseDefaultConsistency: opt.useDefaultConsistencyLevel,
}
req.ExprTemplateValues = make(map[string]*schemapb.TemplateValue)