mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-01 19:39:21 +08:00
Use internal dsl and placeholder group (#5033)
Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
This commit is contained in:
parent
7c14682c89
commit
4197b094bf
@ -270,23 +270,18 @@ func (s *searchCollection) search(searchMsg *msgstream.SearchMsg) error {
|
|||||||
defer sp.Finish()
|
defer sp.Finish()
|
||||||
searchMsg.SetTraceCtx(ctx)
|
searchMsg.SetTraceCtx(ctx)
|
||||||
searchTimestamp := searchMsg.Base.Timestamp
|
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
|
collectionID := searchMsg.CollectionID
|
||||||
collection, err := s.replica.getCollectionByID(collectionID)
|
collection, err := s.replica.getCollectionByID(collectionID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
dsl := query.Dsl
|
dsl := searchMsg.Dsl
|
||||||
plan, err := createPlan(*collection, dsl)
|
plan, err := createPlan(*collection, dsl)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
searchRequestBlob := query.PlaceholderGroup
|
searchRequestBlob := searchMsg.PlaceholderGroup
|
||||||
searchReq, err := parseSearchRequest(plan, searchRequestBlob)
|
searchReq, err := parseSearchRequest(plan, searchRequestBlob)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
Loading…
Reference in New Issue
Block a user