Disable search params rewrite while searching with filter (#24625)

Signed-off-by: chasingegg <chao.gao@zilliz.com>
pull/24690/head
Gao 2023-06-06 14:28:35 +08:00 committed by GitHub
parent f40e22c78c
commit ea62922829
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -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 {

View File

@ -86,6 +86,7 @@ const (
TopKKey = "topk"
SearchParamKey = "search_param"
SegmentNumKey = "segment_num"
WithFilterKey = "with_filter"
IndexParamsKey = "params"
IndexTypeKey = "index_type"