mirror of https://github.com/milvus-io/milvus.git
Disable search params rewrite while searching with filter (#24625)
Signed-off-by: chasingegg <chao.gao@zilliz.com>pull/24690/head
parent
f40e22c78c
commit
ea62922829
|
@ -271,11 +271,13 @@ func (node *QueryNode) optimizeSearchParams(ctx context.Context, req *querypb.Se
|
|||
}, 0)
|
||||
// use shardNum * segments num in shard to estimate total segment number
|
||||
estSegmentNum := sealedNum * int(channelNum)
|
||||
withFilter := (plan.GetVectorAnns().GetPredicates() == nil)
|
||||
queryInfo := plan.GetVectorAnns().GetQueryInfo()
|
||||
params := map[string]any{
|
||||
common.TopKKey: queryInfo.GetTopk(),
|
||||
common.SearchParamKey: queryInfo.GetSearchParams(),
|
||||
common.SegmentNumKey: estSegmentNum,
|
||||
common.WithFilterKey: withFilter,
|
||||
}
|
||||
err := node.queryHook.Run(params)
|
||||
if err != nil {
|
||||
|
|
|
@ -86,6 +86,7 @@ const (
|
|||
TopKKey = "topk"
|
||||
SearchParamKey = "search_param"
|
||||
SegmentNumKey = "segment_num"
|
||||
WithFilterKey = "with_filter"
|
||||
|
||||
IndexParamsKey = "params"
|
||||
IndexTypeKey = "index_type"
|
||||
|
|
Loading…
Reference in New Issue