Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pymilvus/client/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ class FunctionType(IntEnum):
BM25 = 1
TEXTEMBEDDING = 2
RERANK = 3
MINHASH = 4


class RangeType(IntEnum):
Expand Down
24 changes: 12 additions & 12 deletions pymilvus/grpc_gen/common_pb2.py

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions pymilvus/grpc_gen/common_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ class ObjectPrivilege(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
PrivilegeAddCollectionFunction: _ClassVar[ObjectPrivilege]
PrivilegeAlterCollectionFunction: _ClassVar[ObjectPrivilege]
PrivilegeDropCollectionFunction: _ClassVar[ObjectPrivilege]
PrivilegeUpdateReplicateConfiguration: _ClassVar[ObjectPrivilege]

class StateCode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
__slots__ = ()
Expand Down Expand Up @@ -706,6 +707,7 @@ PrivilegeListFileResources: ObjectPrivilege
PrivilegeAddCollectionFunction: ObjectPrivilege
PrivilegeAlterCollectionFunction: ObjectPrivilege
PrivilegeDropCollectionFunction: ObjectPrivilege
PrivilegeUpdateReplicateConfiguration: ObjectPrivilege
Initializing: StateCode
Healthy: StateCode
Abnormal: StateCode
Expand Down
68 changes: 35 additions & 33 deletions pymilvus/grpc_gen/milvus_pb2.py

Large diffs are not rendered by default.

132 changes: 66 additions & 66 deletions pymilvus/grpc_gen/schema_pb2.py

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions pymilvus/grpc_gen/schema_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class FunctionType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
BM25: _ClassVar[FunctionType]
TextEmbedding: _ClassVar[FunctionType]
Rerank: _ClassVar[FunctionType]
MinHash: _ClassVar[FunctionType]

class FieldState(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
__slots__ = ()
Expand Down Expand Up @@ -76,6 +77,7 @@ Unknown: FunctionType
BM25: FunctionType
TextEmbedding: FunctionType
Rerank: FunctionType
MinHash: FunctionType
FieldCreated: FieldState
FieldCreating: FieldState
FieldDropping: FieldState
Expand Down Expand Up @@ -148,7 +150,7 @@ class FunctionScore(_message.Message):
def __init__(self, functions: _Optional[_Iterable[_Union[FunctionSchema, _Mapping]]] = ..., params: _Optional[_Iterable[_Union[_common_pb2.KeyValuePair, _Mapping]]] = ...) -> None: ...

class CollectionSchema(_message.Message):
__slots__ = ("name", "description", "autoID", "fields", "enable_dynamic_field", "properties", "functions", "dbName", "struct_array_fields")
__slots__ = ("name", "description", "autoID", "fields", "enable_dynamic_field", "properties", "functions", "dbName", "struct_array_fields", "version")
NAME_FIELD_NUMBER: _ClassVar[int]
DESCRIPTION_FIELD_NUMBER: _ClassVar[int]
AUTOID_FIELD_NUMBER: _ClassVar[int]
Expand All @@ -158,6 +160,7 @@ class CollectionSchema(_message.Message):
FUNCTIONS_FIELD_NUMBER: _ClassVar[int]
DBNAME_FIELD_NUMBER: _ClassVar[int]
STRUCT_ARRAY_FIELDS_FIELD_NUMBER: _ClassVar[int]
VERSION_FIELD_NUMBER: _ClassVar[int]
name: str
description: str
autoID: bool
Expand All @@ -167,7 +170,8 @@ class CollectionSchema(_message.Message):
functions: _containers.RepeatedCompositeFieldContainer[FunctionSchema]
dbName: str
struct_array_fields: _containers.RepeatedCompositeFieldContainer[StructArrayFieldSchema]
def __init__(self, name: _Optional[str] = ..., description: _Optional[str] = ..., autoID: bool = ..., fields: _Optional[_Iterable[_Union[FieldSchema, _Mapping]]] = ..., enable_dynamic_field: bool = ..., properties: _Optional[_Iterable[_Union[_common_pb2.KeyValuePair, _Mapping]]] = ..., functions: _Optional[_Iterable[_Union[FunctionSchema, _Mapping]]] = ..., dbName: _Optional[str] = ..., struct_array_fields: _Optional[_Iterable[_Union[StructArrayFieldSchema, _Mapping]]] = ...) -> None: ...
version: int
def __init__(self, name: _Optional[str] = ..., description: _Optional[str] = ..., autoID: bool = ..., fields: _Optional[_Iterable[_Union[FieldSchema, _Mapping]]] = ..., enable_dynamic_field: bool = ..., properties: _Optional[_Iterable[_Union[_common_pb2.KeyValuePair, _Mapping]]] = ..., functions: _Optional[_Iterable[_Union[FunctionSchema, _Mapping]]] = ..., dbName: _Optional[str] = ..., struct_array_fields: _Optional[_Iterable[_Union[StructArrayFieldSchema, _Mapping]]] = ..., version: _Optional[int] = ...) -> None: ...

class StructArrayFieldSchema(_message.Message):
__slots__ = ("fieldID", "name", "description", "fields", "type_params")
Expand Down
7 changes: 5 additions & 2 deletions pymilvus/orm/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -906,8 +906,11 @@ def verify(self, schema: CollectionSchema):
self._check_bm25_function(schema)
elif self._type == FunctionType.TEXTEMBEDDING:
self._check_text_embedding_function(schema)
elif self._type == FunctionType.RANKER:
# We will not check the ranker function here.
elif self._type == FunctionType.RERANK:
# We will not check the rerank function here.
pass
elif self._type == FunctionType.MINHASH:
# milvus will do the check job
pass
elif self._type == FunctionType.UNKNOWN:
raise ParamError(message=ExceptionsMessage.UnknownFunctionType)
Expand Down