From 4197b094bf8cd65e151a2fbb4fe804345193f4e6 Mon Sep 17 00:00:00 2001 From: bigsheeper Date: Sun, 25 Apr 2021 14:08:28 +0800 Subject: [PATCH] Use internal dsl and placeholder group (#5033) Signed-off-by: bigsheeper --- internal/querynode/search_collection.go | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/internal/querynode/search_collection.go b/internal/querynode/search_collection.go index bf6767d0bd..690d60f70c 100644 --- a/internal/querynode/search_collection.go +++ b/internal/querynode/search_collection.go @@ -270,23 +270,18 @@ func (s *searchCollection) search(searchMsg *msgstream.SearchMsg) error { defer sp.Finish() searchMsg.SetTraceCtx(ctx) searchTimestamp := searchMsg.Base.Timestamp - var queryBlob = searchMsg.Query.Value - query := milvuspb.SearchRequest{} - err := proto.Unmarshal(queryBlob, &query) - if err != nil { - return errors.New("unmarshal query failed") - } + collectionID := searchMsg.CollectionID collection, err := s.replica.getCollectionByID(collectionID) if err != nil { return err } - dsl := query.Dsl + dsl := searchMsg.Dsl plan, err := createPlan(*collection, dsl) if err != nil { return err } - searchRequestBlob := query.PlaceholderGroup + searchRequestBlob := searchMsg.PlaceholderGroup searchReq, err := parseSearchRequest(plan, searchRequestBlob) if err != nil { return err