mirror of https://github.com/milvus-io/milvus.git
Fill outputFields for query/search result (#24352)
Signed-off-by: cai.zhang <cai.zhang@zilliz.com>pull/24368/head
parent
49f75e5e11
commit
59b0a61cb2
|
@ -2782,15 +2782,10 @@ func (node *Proxy) Query(ctx context.Context, request *milvuspb.QueryRequest) (*
|
|||
metrics.QueryLabel).Observe(float64(tr.ElapseSpan().Milliseconds()))
|
||||
metrics.ProxyCollectionSQLatency.WithLabelValues(strconv.FormatInt(paramtable.GetNodeID(), 10),
|
||||
metrics.QueryLabel, request.CollectionName).Observe(float64(tr.ElapseSpan().Milliseconds()))
|
||||
|
||||
ret := &milvuspb.QueryResults{
|
||||
Status: qt.result.Status,
|
||||
FieldsData: qt.result.FieldsData,
|
||||
}
|
||||
sentSize := proto.Size(qt.result)
|
||||
rateCol.Add(metricsinfo.ReadResultThroughput, float64(sentSize))
|
||||
metrics.ProxyReadReqSendBytes.WithLabelValues(strconv.FormatInt(paramtable.GetNodeID(), 10)).Add(float64(sentSize))
|
||||
return ret, nil
|
||||
return qt.result, nil
|
||||
}
|
||||
|
||||
// CreateAlias create alias for collection, then you can search the collection with alias.
|
||||
|
|
|
@ -452,6 +452,7 @@ func (t *queryTask) PostExecute(ctx context.Context) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
t.result.OutputFields = t.userOutputFields
|
||||
metrics.ProxyReduceResultLatency.WithLabelValues(strconv.FormatInt(paramtable.GetNodeID(), 10), metrics.QueryLabel).Observe(float64(tr.RecordSpan().Milliseconds()))
|
||||
|
||||
log.Debug("Query PostExecute done")
|
||||
|
|
|
@ -453,6 +453,7 @@ func (t *searchTask) PostExecute(ctx context.Context) error {
|
|||
return err
|
||||
}
|
||||
}
|
||||
t.result.Results.OutputFields = t.userOutputFields
|
||||
|
||||
log.Ctx(ctx).Debug("Search post execute done",
|
||||
zap.Int64("collection", t.GetCollectionID()),
|
||||
|
|
Loading…
Reference in New Issue