mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-02 03:48:37 +08:00
af433ffd68
Some checks are pending
Code Checker / Code Checker AMD64 Ubuntu 22.04 (push) Waiting to run
Code Checker / Code Checker Amazonlinux 2023 (push) Waiting to run
Code Checker / Code Checker rockylinux8 (push) Waiting to run
Mac Code Checker / Code Checker MacOS 12 (push) Waiting to run
Build and test / Build and test AMD64 Ubuntu 22.04 (push) Waiting to run
Build and test / UT for Cpp (push) Blocked by required conditions
Build and test / UT for Go (push) Blocked by required conditions
Build and test / Integration Test (push) Blocked by required conditions
Build and test / Upload Code Coverage (push) Blocked by required conditions
related issue: https://github.com/milvus-io/milvus/issues/37451 --------- Signed-off-by: yanliang567 <yanliang.qiao@zilliz.com>
51 lines
1.9 KiB
Python
51 lines
1.9 KiB
Python
from enum import Enum
|
|
from pymilvus import ExceptionsMessage
|
|
|
|
|
|
class ErrorCode(Enum):
|
|
ErrorOk = 0
|
|
Error = 1
|
|
|
|
|
|
ErrorMessage = {ErrorCode.ErrorOk: "",
|
|
ErrorCode.Error: "is illegal"}
|
|
|
|
|
|
class ErrorMap:
|
|
def __init__(self, err_code, err_msg):
|
|
self.err_code = err_code
|
|
self.err_msg = err_msg
|
|
|
|
|
|
class ConnectionErrorMessage(ExceptionsMessage):
|
|
FailConnect = "Fail connecting to server on %s:%s. Timeout"
|
|
ConnectExist = "The connection named %s already creating, but passed parameters don't match the configured parameters"
|
|
|
|
|
|
class CollectionErrorMessage(ExceptionsMessage):
|
|
CollNotLoaded = "collection %s was not loaded into memory"
|
|
|
|
|
|
class PartitionErrorMessage(ExceptionsMessage):
|
|
pass
|
|
|
|
|
|
class IndexErrorMessage(ExceptionsMessage):
|
|
WrongFieldName = "cannot create index on non-vector field: %s"
|
|
DropLoadedIndex = "index cannot be dropped, collection is loaded, please release it first"
|
|
CheckVectorIndex = "data type {0} can't build with this index {1}"
|
|
SparseFloatVectorMetricType = "only IP&BM25 is the supported metric type for sparse index"
|
|
VectorMetricTypeExist = "metric type not set for vector index"
|
|
# please update the msg below as #37543 fixed
|
|
CheckBitmapIndex = "bitmap index are only supported on bool, int, string"
|
|
CheckBitmapOnPK = "create bitmap index on primary key not supported"
|
|
CheckBitmapCardinality = "failed to check bitmap cardinality limit, should be larger than 0 and smaller than 1000"
|
|
NotConfigable = "{0} is not configable index param"
|
|
InvalidOffsetCache = "invalid offset cache index params"
|
|
OneIndexPerField = "at most one distinct index is allowed per field"
|
|
AlterOnLoadedCollection = "can't alter index on loaded collection, please release the collection first"
|
|
|
|
|
|
class QueryErrorMessage(ExceptionsMessage):
|
|
ParseExpressionFailed = "failed to create query plan: cannot parse expression: "
|