mirror of https://github.com/milvus-io/milvus.git
enhance: add channel num for queryHook optimization (#35104)
At most cases, data in each channel is almost evenly distributed, we could utilize the channel num info to optimize searh param in queryHook Signed-off-by: chasingegg <chao.gao@zilliz.com>pull/34771/head
parent
03912a8788
commit
6695c6d0a3
|
@ -66,6 +66,9 @@ func OptimizeSearchParams(ctx context.Context, req *querypb.SearchRequest, query
|
|||
common.WithOptimizeKey: paramtable.Get().AutoIndexConfig.EnableOptimize.GetAsBool(),
|
||||
common.CollectionKey: req.GetReq().GetCollectionID(),
|
||||
}
|
||||
if withFilter && channelNum > 1 {
|
||||
params[common.ChannelNumKey] = channelNum
|
||||
}
|
||||
err := queryHook.Run(params)
|
||||
if err != nil {
|
||||
log.Warn("failed to execute queryHook", zap.Error(err))
|
||||
|
|
|
@ -109,6 +109,7 @@ const (
|
|||
SegmentNumKey = "segment_num"
|
||||
WithFilterKey = "with_filter"
|
||||
DataTypeKey = "data_type"
|
||||
ChannelNumKey = "channel_num"
|
||||
WithOptimizeKey = "with_optimize"
|
||||
CollectionKey = "collection"
|
||||
|
||||
|
|
Loading…
Reference in New Issue