mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-02 03:48:37 +08:00
enhance: Check ANN field loaded in proxy (#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
e7ea1d7a04
commit
700a443e85
@ -10,6 +10,7 @@ import (
|
|||||||
"github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
|
"github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
|
||||||
"github.com/milvus-io/milvus/internal/proto/planpb"
|
"github.com/milvus-io/milvus/internal/proto/planpb"
|
||||||
"github.com/milvus-io/milvus/pkg/log"
|
"github.com/milvus-io/milvus/pkg/log"
|
||||||
|
"github.com/milvus-io/milvus/pkg/util/merr"
|
||||||
"github.com/milvus-io/milvus/pkg/util/typeutil"
|
"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))
|
log.Info("CreateSearchPlan failed", zap.Error(err))
|
||||||
return nil, 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
|
fieldID := vectorField.FieldID
|
||||||
dataType := vectorField.DataType
|
dataType := vectorField.DataType
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user