mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-07 01:28:27 +08:00
fix: [GoSDK] Unify AnnRequest creation and fix nil map (#39665)
Related to #39559 Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
This commit is contained in:
parent
d7c07d16d3
commit
0bac4d3f2a
@ -85,6 +85,7 @@ func NewAnnRequest(annField string, limit int, vectors ...entity.Vector) *annReq
|
||||
annField: annField,
|
||||
vectors: vectors,
|
||||
topK: limit,
|
||||
searchParam: make(map[string]string),
|
||||
templateParams: make(map[string]any),
|
||||
}
|
||||
}
|
||||
@ -358,12 +359,7 @@ func (opt *searchOption) WithSearchParam(key, value string) *searchOption {
|
||||
|
||||
func NewSearchOption(collectionName string, limit int, vectors []entity.Vector) *searchOption {
|
||||
return &searchOption{
|
||||
annRequest: &annRequest{
|
||||
vectors: vectors,
|
||||
searchParam: make(map[string]string),
|
||||
topK: limit,
|
||||
templateParams: make(map[string]any),
|
||||
},
|
||||
annRequest: NewAnnRequest("", limit, vectors...),
|
||||
collectionName: collectionName,
|
||||
useDefaultConsistencyLevel: true,
|
||||
consistencyLevel: entity.ClBounded,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user