mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-02 20:09:57 +08:00
Cherry-pick from master pr: #36172 Related to #35415 Currently ANN field is loaded in Parital load is not performed in proxy, this cause error message not clear and no error returned when collection is empty --------- Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
This commit is contained in:
parent
089790a459
commit
ab31728b2c
@ -10,6 +10,7 @@ import (
|
||||
"github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
|
||||
"github.com/milvus-io/milvus/internal/proto/planpb"
|
||||
"github.com/milvus-io/milvus/pkg/log"
|
||||
"github.com/milvus-io/milvus/pkg/util/merr"
|
||||
"github.com/milvus-io/milvus/pkg/util/typeutil"
|
||||
)
|
||||
|
||||
@ -124,6 +125,10 @@ func CreateSearchPlan(schema *typeutil.SchemaHelper, exprStr string, vectorField
|
||||
log.Info("CreateSearchPlan failed", zap.Error(err))
|
||||
return nil, err
|
||||
}
|
||||
// plan ok with schema, check ann field
|
||||
if !schema.IsFieldLoaded(vectorField.GetFieldID()) {
|
||||
return nil, merr.WrapErrParameterInvalidMsg("ann field \"%s\" not loaded", vectorFieldName)
|
||||
}
|
||||
fieldID := vectorField.FieldID
|
||||
dataType := vectorField.DataType
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user