From d368f14eb4ded73460f39cd34672cd42753184d5 Mon Sep 17 00:00:00 2001 From: XuanYang-cn Date: Thu, 24 Nov 2022 17:57:08 +0800 Subject: [PATCH] Bulk cherry-picks (#1243) - Modify bulkinsert example (#1218) - Fix the partition example (#1219) - Fix error message for primary key type (#1222) - Optimize some low efficient code (#1223) - Change doc string of Collection init and property (#1220) - Fix mutation results print error (#1226) - Update docs for collection (#1225) - Modify bulkinsert example (#1228) - Add the example comments for rbac methods (#1235) - Add documentation for flush and set_properties (#1236) - Enhance expression of search (#1237) - Update docs for collection/partition search (#1238) - Update docs for Collection (#1242) Co-Authored-By: yhmo Co-Authored-By: SimFG Co-Authored-By: yangxuan Co-Authored-By: Li Liu Co-Authored-By: yhmo Signed-off-by: yangxuan Signed-off-by: yhmo Signed-off-by: yangxuan Signed-off-by: yhmo Co-authored-by: groot --- docs/source/api/api.rst | 2 +- docs/source/api/collection.rst | 4 +- examples/example.py | 2 +- ...mple_bulkload.py => example_bulkinsert.py} | 112 +-- examples/partition.py | 12 +- pymilvus/client/abstract.py | 2 +- pymilvus/client/check.py | 140 +-- pymilvus/client/grpc_handler.py | 41 +- pymilvus/client/prepare.py | 3 +- pymilvus/exceptions.py | 2 +- pymilvus/grpc_gen/milvus-proto | 2 +- pymilvus/grpc_gen/milvus_pb2.py | 550 +++++------ pymilvus/orm/collection.py | 906 ++++++++---------- pymilvus/orm/partition.py | 151 +-- pymilvus/orm/role.py | 80 ++ pymilvus/orm/utility.py | 77 ++ requirements.txt | 21 +- tests/test_prepare.py | 2 +- 18 files changed, 1072 insertions(+), 1037 deletions(-) rename examples/{example_bulkload.py => example_bulkinsert.py} (83%) diff --git a/docs/source/api/api.rst b/docs/source/api/api.rst index f6e0b935d..055977f2b 100644 --- a/docs/source/api/api.rst +++ b/docs/source/api/api.rst @@ -1,7 +1,7 @@ .. _api: API Reference -============ +============= .. toctree:: :maxdepth: 1 diff --git a/docs/source/api/collection.rst b/docs/source/api/collection.rst index af98da73d..da8d0ad40 100644 --- a/docs/source/api/collection.rst +++ b/docs/source/api/collection.rst @@ -1,6 +1,6 @@ -========= +========== Collection -========= +========== The scheme of a collection is fixed when collection created. Collection scheme consists of many fields, and must contain a vector field. A field to collection is like a column to RDBMS table. Data type are the same in one field. diff --git a/examples/example.py b/examples/example.py index 57afaac1d..34c5069e8 100644 --- a/examples/example.py +++ b/examples/example.py @@ -113,7 +113,7 @@ def search(collection, vector_field, id_field, search_vectors): "anns_field": vector_field, "param": {"metric_type": _METRIC_TYPE, "params": {"nprobe": _NPROBE}}, "limit": _TOPK, - "expr": "id_field > 0"} + "expr": "id_field >= 0"} results = collection.search(**search_param) for i, result in enumerate(results): print("\nSearch result for {}th vector: ".format(i)) diff --git a/examples/example_bulkload.py b/examples/example_bulkinsert.py similarity index 83% rename from examples/example_bulkload.py rename to examples/example_bulkinsert.py index 4022f2754..85255b4f7 100644 --- a/examples/example_bulkload.py +++ b/examples/example_bulkinsert.py @@ -24,7 +24,8 @@ # rocksmq: # path: /tmp/milvus/rdb_data # storageType: local -MILVUS_DATA_PATH = "/tmp/milvus/data/" + +FILES_PATH = "/tmp/milvus_bulkinsert/" # Milvus service address _HOST = '127.0.0.1' @@ -42,6 +43,8 @@ # Vector field parameter _DIM = 8 +# to generate increment ID +id_start = 1 # Create a Milvus connection def create_connection(): @@ -62,7 +65,7 @@ def create_connection(): # Create a collection def create_collection(): - field1 = FieldSchema(name=_ID_FIELD_NAME, dtype=DataType.INT64, description="int64", is_primary=True, auto_id=True) + field1 = FieldSchema(name=_ID_FIELD_NAME, dtype=DataType.INT64, description="int64", is_primary=True, auto_id=False) field2 = FieldSchema(name=_VECTOR_FIELD_NAME, dtype=DataType.FLOAT_VECTOR, description="float vector", dim=_DIM, is_primary=False) field3 = FieldSchema(name=_STR_FIELD_NAME, dtype=DataType.VARCHAR, description="string", @@ -107,12 +110,15 @@ def create_partition(collection, partition_name): # ] # } def gen_json_rowbased(num, path, tag): + global id_start rows = [] for i in range(num): rows.append({ + _ID_FIELD_NAME: id_start, _STR_FIELD_NAME: tag + str(i), _VECTOR_FIELD_NAME: [round(random.random(), 6) for _ in range(_DIM)], }) + id_start = id_start + 1 data = { "rows": rows, @@ -121,7 +127,7 @@ def gen_json_rowbased(num, path, tag): json.dump(data, json_file) -# Bulkload for row-based files, each file is converted to a task. +# For row-based files, each file is converted to a task. Each time you can call do_bulk_insert() to insert one file. # The rootcoord maintains a task list, each idle datanode will receive a task. If no datanode available, the task will # be put into pending list to wait, the max size of pending list is 32. If new tasks count exceed spare quantity of # pending list, the do_bulk_insert() method will return error. @@ -135,27 +141,22 @@ def gen_json_rowbased(num, path, tag): # But if the segment.maxSize of milvus.yml is set to a small value, there could be shardNum*2, shardNum*3 segments # generated, or even more. def bulk_insert_rowbased(row_count_each_file, file_count, tag, partition_name = None): - # make sure the data path is exist - exist = os.path.exists(MILVUS_DATA_PATH) - if not exist: - os.mkdir(MILVUS_DATA_PATH) - - file_names = [] - for i in range(file_count): - file_names.append("rows_" + str(i) + ".json") + # make sure the files folder is created + os.makedirs(name=FILES_PATH, exist_ok=True) task_ids = [] - for filename in file_names: - print("Generate row-based file:", MILVUS_DATA_PATH + filename) - gen_json_rowbased(row_count_each_file, MILVUS_DATA_PATH + filename, tag) - print("Import row-based file:", filename) + for i in range(file_count): + file_path = FILES_PATH + "rows_" + str(i) + ".json" + print("Generate row-based file:", file_path) + gen_json_rowbased(row_count_each_file, file_path, tag) + print("Import row-based file:", file_path) task_id = utility.do_bulk_insert(collection_name=_COLLECTION_NAME, partition_name=partition_name, - files=[filename]) + files=[file_path]) task_ids.append(task_id) return wait_tasks_persisted(task_ids) -# wait all bulk insert tasks to be a certain state +# Wait all bulk insert tasks to be a certain state # return the states of all the tasks, including failed task def wait_tasks_to_state(task_ids, state_code): wait_ids = task_ids @@ -186,7 +187,7 @@ def wait_tasks_to_state(task_ids, state_code): # Get bulk insert task state to check whether the data file has been parsed and persisted successfully. # Persisted state doesn't mean the data is queryable, to query the data, you need to wait until the segment is -# loaded into memory. +# indexed successfully and loaded into memory. def wait_tasks_persisted(task_ids): print("=========================================================================================================") states = wait_tasks_to_state(task_ids, BulkInsertState.ImportPersisted) @@ -204,7 +205,10 @@ def wait_tasks_persisted(task_ids): # Get bulk insert task state to check whether the data file has been indexed successfully. # If the state of bulk insert task is BulkInsertState.ImportCompleted, that means the data is queryable. -def wait_tasks_competed(task_ids): +def wait_tasks_competed(tasks): + task_ids = [] + for task in tasks: + task_ids.append(task.task_id) print("=========================================================================================================") states = wait_tasks_to_state(task_ids, BulkInsertState.ImportCompleted) complete_count = 0 @@ -221,8 +225,8 @@ def wait_tasks_competed(task_ids): # List all bulk insert tasks, including pending tasks, working tasks and finished tasks. # the parameter 'limit' is: how many latest tasks should be returned, if the limit<=0, all the tasks will be returned -def list_all_bulk_insert_tasks(limit): - tasks = utility.list_bulk_insert_tasks(limit) +def list_all_bulk_insert_tasks(collection_name=_COLLECTION_NAME, limit=0): + tasks = utility.list_bulk_insert_tasks(limit=limit, collection_name=collection_name) print("=========================================================================================================") print("list bulk insert tasks with limit", limit) pending = 0 @@ -274,36 +278,31 @@ def release_collection(collection): # ANN search -def search(collection, vector_field, search_vectors, partition_name = None, consistency_level = "Eventually"): +def search(collection, vector_field, search_vector, consistency_level = "Eventually"): search_param = { - "data": search_vectors, + "data": [search_vector], "anns_field": vector_field, "param": {"metric_type": "L2", "params": {"nprobe": 10}}, "limit": 10, "output_fields": [_STR_FIELD_NAME], "consistency_level": consistency_level, } - if partition_name != None: - search_param["partition_names"] = [partition_name] results = collection.search(**search_param) print("=========================================================================================================") - for i, result in enumerate(results): - if partition_name != None: - print("Search result for {}th vector in partition '{}': ".format(i, partition_name)) - else: - print("Search result for {}th vector: ".format(i)) - - for j, res in enumerate(result): - print(f"\ttop{j}: {res}, {_STR_FIELD_NAME}: {res.entity.get(_STR_FIELD_NAME)}") - print("\thits count:", len(result)) + result = results[0] + for j, res in enumerate(result): + print(f"\ttop{j}: {res}, {_STR_FIELD_NAME}: {res.entity.get(_STR_FIELD_NAME)}") + print("\thits count:", len(result)) print("=========================================================================================================\n") # delete entities def delete(collection, ids): + print("=========================================================================================================\n") print("Delete these entities:", ids) expr = _ID_FIELD_NAME + " in " + str(ids) collection.delete(expr=expr) + print("=========================================================================================================\n") # retrieve entities def retrieve(collection, ids): @@ -339,19 +338,17 @@ def main(): list_collections() # do bulk_insert, wait all tasks finish persisting - task_ids = [] - tasks = bulk_insert_rowbased(row_count_each_file=1000, file_count=1, tag="to_default_") - for task in tasks: - task_ids.append(task.task_id) - tasks = bulk_insert_rowbased(row_count_each_file=1000, file_count=3, tag="to_partition_", partition_name=a_partition) - for task in tasks: - task_ids.append(task.task_id) + all_tasks = [] + tasks = bulk_insert_rowbased(row_count_each_file=1000, file_count=3, tag="to_default_") + all_tasks.extend(tasks) + tasks = bulk_insert_rowbased(row_count_each_file=1000, file_count=1, tag="to_partition_", partition_name=a_partition) + all_tasks.extend(tasks) # wai until all tasks completed(completed means queryable) - wait_tasks_competed(task_ids) + wait_tasks_competed(all_tasks) # list all tasks - list_all_bulk_insert_tasks(len(task_ids)) + list_all_bulk_insert_tasks() # get the number of entities get_entity_num(collection) @@ -360,30 +357,27 @@ def main(): print("wait 5 seconds to load the data") time.sleep(5) - # search in entire collection - vector = [round(random.random(), 6) for _ in range(_DIM)] - vectors = [vector] - print("Use a random vector to search in entire collection") - search(collection, _VECTOR_FIELD_NAME, vectors) + # pick some entities + delete_ids = [50, 100] + id_vectors = retrieve(collection, delete_ids) - # search in a partition - print("Use a random vector to search in partition:", a_partition) - search(collection, _VECTOR_FIELD_NAME, vectors, partition_name=a_partition) + # search in entire collection + for id_vector in id_vectors: + id = id_vector[_ID_FIELD_NAME] + vector = id_vector[_VECTOR_FIELD_NAME] + print("Search id:", id, ", compare this id to the top0 of search result, they are equal") + search(collection, _VECTOR_FIELD_NAME, vector) - # pick some entities to delete - delete_ids = [] - for task in tasks: - delete_ids.append(task.ids[5]) - id_vectors = retrieve(collection, delete_ids) + # delete the picked entities delete(collection, delete_ids) - # search the delete entities to check existence, check the top0 of the search result + # search the delete entities to check existence for id_vector in id_vectors: id = id_vector[_ID_FIELD_NAME] vector = id_vector[_VECTOR_FIELD_NAME] - print("Search id:", id, ", compare this id to the top0 of search result, the entity with the id has been deleted") + print("Search id:", id, ", compare this id to the top0 result, they are not equal since the id has been deleted") # here we use Stong consistency level to do search, because we need to make sure the delete operation is applied - search(collection, _VECTOR_FIELD_NAME, [vector], partition_name=None, consistency_level="Strong") + search(collection, _VECTOR_FIELD_NAME, vector, consistency_level="Strong") # release memory release_collection(collection) diff --git a/examples/partition.py b/examples/partition.py index 15a54ed57..111ce332d 100644 --- a/examples/partition.py +++ b/examples/partition.py @@ -119,10 +119,20 @@ def test_partition(): data = gen_data(default_nb) print("insert data to partition") - partition.insert(data) + res = partition.insert(data) + collection.flush() + print(res.insert_count) assert partition.is_empty is False assert partition.num_entities == default_nb + print("start to create index") + index = { + "index_type": "IVF_FLAT", + "metric_type": "L2", + "params": {"nlist": 128}, + } + collection.create_index(default_float_vec_field_name, index) + print("load partition") partition.load() topK = 5 diff --git a/pymilvus/client/abstract.py b/pymilvus/client/abstract.py index a3e42df83..f2e0dd0e1 100644 --- a/pymilvus/client/abstract.py +++ b/pymilvus/client/abstract.py @@ -369,7 +369,7 @@ def err_index(self): def __str__(self): return f"(insert count: {self._insert_cnt}, delete count: {self._delete_cnt}, upsert count: {self._upsert_cnt}, " \ - "timestamp: {self._timestamp}, success count: {self.succ_count}, err count: {self.err_count})" + f"timestamp: {self._timestamp}, success count: {self.succ_count}, err count: {self.err_count})" __repr__ = __str__ diff --git a/pymilvus/client/check.py b/pymilvus/client/check.py index 5c923cace..959318c49 100644 --- a/pymilvus/client/check.py +++ b/pymilvus/client/check.py @@ -3,6 +3,7 @@ from typing import Any, Union from ..exceptions import ParamError from ..grpc_gen import milvus_pb2 as milvus_types +from .singleton_utils import Singleton from .utils import ( valid_index_types, valid_binary_index_types, @@ -308,103 +309,56 @@ def is_legal_operate_privilege_type(operate_privilege_type: Any) -> bool: (milvus_types.OperatePrivilegeType.Grant, milvus_types.OperatePrivilegeType.Revoke) +class ParamChecker(metaclass=Singleton): + def __init__(self) -> None: + self.check_dict = { + "collection_name": is_legal_table_name, + "field_name": is_legal_field_name, + "dimension": is_legal_dimension, + "index_file_size": is_legal_index_size, + "topk": is_legal_topk, + "ids": is_legal_ids, + "nprobe": is_legal_nprobe, + "nlist": is_legal_nlist, + "cmd": is_legal_cmd, + "partition_name": is_legal_partition_name, + "partition_name_array": is_legal_partition_name_array, + "limit": is_legal_limit, + "anns_field": is_legal_anns_field, + "search_data": is_legal_search_data, + "output_fields": is_legal_output_fields, + "round_decimal": is_legal_round_decimal, + "travel_timestamp": is_legal_travel_timestamp, + "guarantee_timestamp": is_legal_guarantee_timestamp, + "user": is_legal_user, + "password": is_legal_password, + "role_name": is_legal_role_name, + "operate_user_role_type": is_legal_operate_user_role_type, + "include_user_info": is_legal_include_user_info, + "include_role_info": is_legal_include_role_info, + "object": is_legal_object, + "object_name": is_legal_object_name, + "privilege": is_legal_privilege, + "operate_privilege_type": is_legal_operate_privilege_type, + "properties": is_legal_collection_properties, + } + + def check(self, key, value): + if key in self.check_dict: + if not self.check_dict[key](value): + _raise_param_error(key, value) + else: + raise ParamError(message=f"unknown param `{key}`") + +def _get_param_checker(): + return ParamChecker() + def check_pass_param(*_args: Any, **kwargs: Any) -> None: # pylint: disable=too-many-statements if kwargs is None: raise ParamError(message="Param should not be None") - + checker = _get_param_checker() for key, value in kwargs.items(): - if key in ("collection_name",): - if not is_legal_table_name(value): - _raise_param_error(key, value) - elif key == "field_name": - if not is_legal_field_name(value): - _raise_param_error(key, value) - elif key == "dimension": - if not is_legal_dimension(value): - _raise_param_error(key, value) - elif key == "index_file_size": - if not is_legal_index_size(value): - _raise_param_error(key, value) - elif key in ("topk", "top_k"): - if not is_legal_topk(value): - _raise_param_error(key, value) - elif key in ("ids",): - if not is_legal_ids(value): - _raise_param_error(key, value) - elif key in ("nprobe",): - if not is_legal_nprobe(value): - _raise_param_error(key, value) - elif key in ("nlist",): - if not is_legal_nlist(value): - _raise_param_error(key, value) - elif key in ("cmd",): - if not is_legal_cmd(value): - _raise_param_error(key, value) - elif key in ("partition_name",): - if not is_legal_partition_name(value): - _raise_param_error(key, value) - elif key in ("partition_name_array",): - if not is_legal_partition_name_array(value): - _raise_param_error(key, value) - elif key in ("limit",): - if not is_legal_limit(value): - _raise_param_error(key, value) - elif key in ("anns_field",): - if not is_legal_anns_field(value): - _raise_param_error(key, value) - elif key in ("search_data",): - if not is_legal_search_data(value): - _raise_param_error(key, value) - elif key in ("output_fields",): - if not is_legal_output_fields(value): - _raise_param_error(key, value) - elif key in ("round_decimal",): - if not is_legal_round_decimal(value): - _raise_param_error(key, value) - elif key in ("travel_timestamp",): - if not is_legal_travel_timestamp(value): - _raise_param_error(key, value) - elif key in ("guarantee_timestamp",): - if not is_legal_guarantee_timestamp(value): - _raise_param_error(key, value) - elif key in ("user",): - if not is_legal_user(value): - _raise_param_error(key, value) - elif key in ("password",): - if not is_legal_password(value): - _raise_param_error(key, value) - # elif key in ("records",): - # if not is_legal_records(value): - # _raise_param_error(key, value) - elif key in ("role_name",): - if not is_legal_role_name(value): - _raise_param_error(key, value) - elif key in ("operate_user_role_type",): - if not is_legal_operate_user_role_type(value): - _raise_param_error(key, value) - elif key in ("include_user_info",): - if not is_legal_include_user_info(value): - _raise_param_error(key, value) - elif key in ("include_role_info",): - if not is_legal_include_role_info(value): - _raise_param_error(key, value) - elif key in ("object",): - if not is_legal_object(value): - _raise_param_error(key, value) - elif key in ("object_name",): - if not is_legal_object_name(value): - _raise_param_error(key, value) - elif key in ("privilege",): - if not is_legal_privilege(value): - _raise_param_error(key, value) - elif key in ("operate_privilege_type",): - if not is_legal_operate_privilege_type(value): - _raise_param_error(key, value) - elif key == "properties": - if not is_legal_collection_properties(value): - _raise_param_error(key, value) - else: - raise ParamError(message=f"unknown param `{key}`") + checker.check(key, value) def check_index_params(params): diff --git a/pymilvus/client/grpc_handler.py b/pymilvus/client/grpc_handler.py index 66232daaa..3eedd5a30 100644 --- a/pymilvus/client/grpc_handler.py +++ b/pymilvus/client/grpc_handler.py @@ -413,21 +413,17 @@ def _execute_search_requests(self, requests, timeout=None, **kwargs): auto_id = kwargs.get("auto_id", True) try: - raws = [] - futures = [] - - # step 1: get future object - for request in requests: - ft = self._stub.Search.future(request, timeout=timeout) - futures.append(ft) - if kwargs.get("_async", False): + futures = [] + for request in requests: + ft = self._stub.Search.future(request, timeout=timeout) + futures.append(ft) func = kwargs.get("_callback", None) return ChunkedSearchFuture(futures, func, auto_id) - # step2: get results - for ft in futures: - response = ft.result() + raws = [] + for request in requests: + response = self._stub.Search(request, timeout=timeout) if response.status.error_code != 0: raise MilvusException(response.status.error_code, response.status.reason) @@ -444,7 +440,7 @@ def _execute_search_requests(self, requests, timeout=None, **kwargs): @retry_on_rpc_failure(retry_on_deadline=False) def search(self, collection_name, data, anns_field, param, limit, expression=None, partition_names=None, output_fields=None, - round_decimal=-1, timeout=None, **kwargs): + round_decimal=-1, timeout=None, collection_schema=None, **kwargs): check_pass_param( limit=limit, round_decimal=round_decimal, @@ -456,26 +452,21 @@ def search(self, collection_name, data, anns_field, param, limit, guarantee_timestamp=kwargs.get("guarantee_timestamp", 0) ) - _kwargs = copy.deepcopy(kwargs) - - collection_schema = kwargs.get("schema", None) if not collection_schema: collection_schema = self.describe_collection(collection_name, timeout=timeout, **kwargs) - auto_id = collection_schema["auto_id"] + consistency_level = collection_schema["consistency_level"] # overwrite the consistency level defined when user created the collection - consistency_level = get_consistency_level(_kwargs.get("consistency_level", consistency_level)) - _kwargs["schema"] = collection_schema + consistency_level = get_consistency_level(kwargs.get("consistency_level", consistency_level)) - ts_utils.construct_guarantee_ts(consistency_level, collection_name, _kwargs) + ts_utils.construct_guarantee_ts(consistency_level, collection_name, kwargs) - requests = Prepare.search_requests_with_expr(collection_name, data, anns_field, param, limit, expression, - partition_names, output_fields, round_decimal, **_kwargs) - _kwargs.pop("schema") - _kwargs["auto_id"] = auto_id - _kwargs["round_decimal"] = round_decimal + requests = Prepare.search_requests_with_expr(collection_name, data, anns_field, param, limit, collection_schema, + expression, partition_names, output_fields, round_decimal, + **kwargs) - return self._execute_search_requests(requests, timeout, **_kwargs) + auto_id = collection_schema["auto_id"] + return self._execute_search_requests(requests, timeout, round_decimal=round_decimal, auto_id=auto_id, **kwargs) @retry_on_rpc_failure() def get_query_segment_info(self, collection_name, timeout=30, **kwargs): diff --git a/pymilvus/client/prepare.py b/pymilvus/client/prepare.py index 880610614..432e4f9f8 100644 --- a/pymilvus/client/prepare.py +++ b/pymilvus/client/prepare.py @@ -431,10 +431,9 @@ def extract_vectors_param(param, placeholders, names, round_decimal): return request @classmethod - def search_requests_with_expr(cls, collection_name, data, anns_field, param, limit, expr=None, partition_names=None, + def search_requests_with_expr(cls, collection_name, data, anns_field, param, limit, schema, expr=None, partition_names=None, output_fields=None, round_decimal=-1, **kwargs): # TODO Move this impl into server side - schema = kwargs.get("schema", None) fields_schema = schema.get("fields", None) # list fields_name_locs = {fields_schema[loc]["name"]: loc for loc in range(len(fields_schema))} diff --git a/pymilvus/exceptions.py b/pymilvus/exceptions.py index b3cec70d8..0f1cfc1e0 100644 --- a/pymilvus/exceptions.py +++ b/pymilvus/exceptions.py @@ -147,7 +147,7 @@ class ExceptionsMessage: NoPrimaryKey = "Schema must have a primary key field." PrimaryKeyNotExist = "Primary field must in dataframe." PrimaryKeyOnlyOne = "Primary key field can only be one." - PrimaryKeyType = "Primary key type must be DataType.INT64." + PrimaryKeyType = "Primary key type must be DataType.INT64 or DataType.VARCHAR." IsPrimaryType = "Param is_primary must be bool type." DataTypeInconsistent = "The data in the same column must be of the same type." DataTypeNotSupport = "Data type is not support." diff --git a/pymilvus/grpc_gen/milvus-proto b/pymilvus/grpc_gen/milvus-proto index 7a703d448..44f59db22 160000 --- a/pymilvus/grpc_gen/milvus-proto +++ b/pymilvus/grpc_gen/milvus-proto @@ -1 +1 @@ -Subproject commit 7a703d4485b551f20efa5b6d22a211e8967624d1 +Subproject commit 44f59db22b27cc55e4168c8e53b6e781c010a713 diff --git a/pymilvus/grpc_gen/milvus_pb2.py b/pymilvus/grpc_gen/milvus_pb2.py index 05ff58530..66828b8fb 100644 --- a/pymilvus/grpc_gen/milvus_pb2.py +++ b/pymilvus/grpc_gen/milvus_pb2.py @@ -18,7 +18,7 @@ from google.protobuf import descriptor_pb2 as google_dot_protobuf_dot_descriptor__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0cmilvus.proto\x12\x13milvus.proto.milvus\x1a\x0c\x63ommon.proto\x1a\x0cschema.proto\x1a google/protobuf/descriptor.proto\"\x14\n\x12\x43heckHealthRequest\"9\n\x13\x43heckHealthResponse\x12\x11\n\tisHealthy\x18\x01 \x01(\x08\x12\x0f\n\x07reasons\x18\x02 \x03(\t\"y\n\x12\x43reateAliasRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\r\n\x05\x61lias\x18\x04 \x01(\t\"^\n\x10\x44ropAliasRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\r\n\x05\x61lias\x18\x03 \x01(\t\"x\n\x11\x41lterAliasRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\r\n\x05\x61lias\x18\x04 \x01(\t\"\xa0\x02\n\x17\x43reateCollectionRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0e\n\x06schema\x18\x04 \x01(\x0c\x12\x12\n\nshards_num\x18\x05 \x01(\x05\x12@\n\x11\x63onsistency_level\x18\x06 \x01(\x0e\x32%.milvus.proto.common.ConsistencyLevel\x12\x35\n\nproperties\x18\x07 \x03(\x0b\x32!.milvus.proto.common.KeyValuePair:\x12\xca>\x0f\x08\x01\x10\x01\x18\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\"\x81\x01\n\x15\x44ropCollectionRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t:\x12\xca>\x0f\x08\x01\x10\x02\x18\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\"\xcf\x01\n\x16\x41lterCollectionRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x14\n\x0c\x63ollectionID\x18\x04 \x01(\x03\x12\x35\n\nproperties\x18\x05 \x03(\x0b\x32!.milvus.proto.common.KeyValuePair:\x12\xca>\x0f\x08\x01\x10\x01\x18\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\"\x80\x01\n\x14HasCollectionRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x12\n\ntime_stamp\x18\x04 \x01(\x04\"J\n\x0c\x42oolResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\r\n\x05value\x18\x02 \x01(\x08\"L\n\x0eStringResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\r\n\x05value\x18\x02 \x01(\t\"\xaf\x01\n\x19\x44\x65scribeCollectionRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x14\n\x0c\x63ollectionID\x18\x04 \x01(\x03\x12\x12\n\ntime_stamp\x18\x05 \x01(\x04:\x12\xca>\x0f\x08\x01\x10\x03\x18\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\"\x81\x04\n\x1a\x44\x65scribeCollectionResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x35\n\x06schema\x18\x02 \x01(\x0b\x32%.milvus.proto.schema.CollectionSchema\x12\x14\n\x0c\x63ollectionID\x18\x03 \x01(\x03\x12\x1d\n\x15virtual_channel_names\x18\x04 \x03(\t\x12\x1e\n\x16physical_channel_names\x18\x05 \x03(\t\x12\x19\n\x11\x63reated_timestamp\x18\x06 \x01(\x04\x12\x1d\n\x15\x63reated_utc_timestamp\x18\x07 \x01(\x04\x12\x12\n\nshards_num\x18\x08 \x01(\x05\x12\x0f\n\x07\x61liases\x18\t \x03(\t\x12\x39\n\x0fstart_positions\x18\n \x03(\x0b\x32 .milvus.proto.common.KeyDataPair\x12@\n\x11\x63onsistency_level\x18\x0b \x01(\x0e\x32%.milvus.proto.common.ConsistencyLevel\x12\x17\n\x0f\x63ollection_name\x18\x0c \x01(\t\x12\x35\n\nproperties\x18\r \x03(\x0b\x32!.milvus.proto.common.KeyValuePair\"\x8e\x01\n\x15LoadCollectionRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x16\n\x0ereplica_number\x18\x04 \x01(\x05:\x07\xca>\x04\x10\x05\x18\x03\"y\n\x18ReleaseCollectionRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t:\x07\xca>\x04\x10\x06\x18\x03\"\xab\x01\n\x14GetStatisticsRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x17\n\x0fpartition_names\x18\x04 \x03(\t\x12\x1b\n\x13guarantee_timestamp\x18\x05 \x01(\x04:\x07\xca>\x04\x10\n\x18\x03\"v\n\x15GetStatisticsResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x30\n\x05stats\x18\x02 \x03(\x0b\x32!.milvus.proto.common.KeyValuePair\"\x7f\n\x1eGetCollectionStatisticsRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t:\x07\xca>\x04\x10\n\x18\x03\"\x80\x01\n\x1fGetCollectionStatisticsResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x30\n\x05stats\x18\x02 \x03(\x0b\x32!.milvus.proto.common.KeyValuePair\"\xc4\x01\n\x16ShowCollectionsRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x12\n\ntime_stamp\x18\x03 \x01(\x04\x12+\n\x04type\x18\x04 \x01(\x0e\x32\x1d.milvus.proto.milvus.ShowType\x12\x18\n\x10\x63ollection_names\x18\x05 \x03(\t:\x12\xca>\x0f\x08\x01\x10\x04\x18\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\"\xf3\x01\n\x17ShowCollectionsResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x18\n\x10\x63ollection_names\x18\x02 \x03(\t\x12\x16\n\x0e\x63ollection_ids\x18\x03 \x03(\x03\x12\x1a\n\x12\x63reated_timestamps\x18\x04 \x03(\x04\x12\x1e\n\x16\x63reated_utc_timestamps\x18\x05 \x03(\x04\x12\x1c\n\x14inMemory_percentages\x18\x06 \x03(\x03\x12\x1f\n\x17query_service_available\x18\x07 \x03(\x08\"\x86\x01\n\x16\x43reatePartitionRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x16\n\x0epartition_name\x18\x04 \x01(\t\"\x84\x01\n\x14\x44ropPartitionRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x16\n\x0epartition_name\x18\x04 \x01(\t\"\x83\x01\n\x13HasPartitionRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x16\n\x0epartition_name\x18\x04 \x01(\t\"\x9e\x01\n\x15LoadPartitionsRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x17\n\x0fpartition_names\x18\x04 \x03(\t\x12\x16\n\x0ereplica_number\x18\x05 \x01(\x05\"\x89\x01\n\x18ReleasePartitionsRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x17\n\x0fpartition_names\x18\x04 \x03(\t\"\x8d\x01\n\x1dGetPartitionStatisticsRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x16\n\x0epartition_name\x18\x04 \x01(\t\"\x7f\n\x1eGetPartitionStatisticsResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x30\n\x05stats\x18\x02 \x03(\x0b\x32!.milvus.proto.common.KeyValuePair\"\xc9\x01\n\x15ShowPartitionsRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x14\n\x0c\x63ollectionID\x18\x04 \x01(\x03\x12\x17\n\x0fpartition_names\x18\x05 \x03(\t\x12+\n\x04type\x18\x06 \x01(\x0e\x32\x1d.milvus.proto.milvus.ShowType\"\xce\x01\n\x16ShowPartitionsResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x17\n\x0fpartition_names\x18\x02 \x03(\t\x12\x14\n\x0cpartitionIDs\x18\x03 \x03(\x03\x12\x1a\n\x12\x63reated_timestamps\x18\x04 \x03(\x04\x12\x1e\n\x16\x63reated_utc_timestamps\x18\x05 \x03(\x04\x12\x1c\n\x14inMemory_percentages\x18\x06 \x03(\x03\"m\n\x16\x44\x65scribeSegmentRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x14\n\x0c\x63ollectionID\x18\x02 \x01(\x03\x12\x11\n\tsegmentID\x18\x03 \x01(\x03\"\x8f\x01\n\x17\x44\x65scribeSegmentResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x0f\n\x07indexID\x18\x02 \x01(\x03\x12\x0f\n\x07\x62uildID\x18\x03 \x01(\x03\x12\x14\n\x0c\x65nable_index\x18\x04 \x01(\x08\x12\x0f\n\x07\x66ieldID\x18\x05 \x01(\x03\"l\n\x13ShowSegmentsRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x14\n\x0c\x63ollectionID\x18\x02 \x01(\x03\x12\x13\n\x0bpartitionID\x18\x03 \x01(\x03\"W\n\x14ShowSegmentsResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x12\n\nsegmentIDs\x18\x02 \x03(\x03\"\xd4\x01\n\x12\x43reateIndexRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x12\n\nfield_name\x18\x04 \x01(\t\x12\x37\n\x0c\x65xtra_params\x18\x05 \x03(\x0b\x32!.milvus.proto.common.KeyValuePair\x12\x12\n\nindex_name\x18\x06 \x01(\t:\x07\xca>\x04\x10\x0b\x18\x03\"\x9d\x01\n\x14\x44\x65scribeIndexRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x12\n\nfield_name\x18\x04 \x01(\t\x12\x12\n\nindex_name\x18\x05 \x01(\t:\x07\xca>\x04\x10\x0c\x18\x03\"\xf9\x01\n\x10IndexDescription\x12\x12\n\nindex_name\x18\x01 \x01(\t\x12\x0f\n\x07indexID\x18\x02 \x01(\x03\x12\x31\n\x06params\x18\x03 \x03(\x0b\x32!.milvus.proto.common.KeyValuePair\x12\x12\n\nfield_name\x18\x04 \x01(\t\x12\x14\n\x0cindexed_rows\x18\x05 \x01(\x03\x12\x12\n\ntotal_rows\x18\x06 \x01(\x03\x12.\n\x05state\x18\x07 \x01(\x0e\x32\x1f.milvus.proto.common.IndexState\x12\x1f\n\x17index_state_fail_reason\x18\x08 \x01(\t\"\x87\x01\n\x15\x44\x65scribeIndexResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x41\n\x12index_descriptions\x18\x02 \x03(\x0b\x32%.milvus.proto.milvus.IndexDescription\"\xa5\x01\n\x1cGetIndexBuildProgressRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x12\n\nfield_name\x18\x04 \x01(\t\x12\x12\n\nindex_name\x18\x05 \x01(\t:\x07\xca>\x04\x10\x0c\x18\x03\"v\n\x1dGetIndexBuildProgressResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x14\n\x0cindexed_rows\x18\x02 \x01(\x03\x12\x12\n\ntotal_rows\x18\x03 \x01(\x03\"\x9d\x01\n\x14GetIndexStateRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x12\n\nfield_name\x18\x04 \x01(\t\x12\x12\n\nindex_name\x18\x05 \x01(\t:\x07\xca>\x04\x10\x0c\x18\x03\"\x89\x01\n\x15GetIndexStateResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12.\n\x05state\x18\x02 \x01(\x0e\x32\x1f.milvus.proto.common.IndexState\x12\x13\n\x0b\x66\x61il_reason\x18\x03 \x01(\t\"\x99\x01\n\x10\x44ropIndexRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x12\n\nfield_name\x18\x04 \x01(\t\x12\x12\n\nindex_name\x18\x05 \x01(\t:\x07\xca>\x04\x10\r\x18\x03\"\xe0\x01\n\rInsertRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x16\n\x0epartition_name\x18\x04 \x01(\t\x12\x33\n\x0b\x66ields_data\x18\x05 \x03(\x0b\x32\x1e.milvus.proto.schema.FieldData\x12\x11\n\thash_keys\x18\x06 \x03(\r\x12\x10\n\x08num_rows\x18\x07 \x01(\r:\x07\xca>\x04\x10\x08\x18\x03\"\xf0\x01\n\x0eMutationResult\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12%\n\x03IDs\x18\x02 \x01(\x0b\x32\x18.milvus.proto.schema.IDs\x12\x12\n\nsucc_index\x18\x03 \x03(\r\x12\x11\n\terr_index\x18\x04 \x03(\r\x12\x14\n\x0c\x61\x63knowledged\x18\x05 \x01(\x08\x12\x12\n\ninsert_cnt\x18\x06 \x01(\x03\x12\x12\n\ndelete_cnt\x18\x07 \x01(\x03\x12\x12\n\nupsert_cnt\x18\x08 \x01(\x03\x12\x11\n\ttimestamp\x18\t \x01(\x04\"\xa7\x01\n\rDeleteRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x16\n\x0epartition_name\x18\x04 \x01(\t\x12\x0c\n\x04\x65xpr\x18\x05 \x01(\t\x12\x11\n\thash_keys\x18\x06 \x03(\r:\x07\xca>\x04\x10\t\x18\x03\"\xf3\x02\n\rSearchRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x17\n\x0fpartition_names\x18\x04 \x03(\t\x12\x0b\n\x03\x64sl\x18\x05 \x01(\t\x12\x19\n\x11placeholder_group\x18\x06 \x01(\x0c\x12.\n\x08\x64sl_type\x18\x07 \x01(\x0e\x32\x1c.milvus.proto.common.DslType\x12\x15\n\routput_fields\x18\x08 \x03(\t\x12\x38\n\rsearch_params\x18\t \x03(\x0b\x32!.milvus.proto.common.KeyValuePair\x12\x18\n\x10travel_timestamp\x18\n \x01(\x04\x12\x1b\n\x13guarantee_timestamp\x18\x0b \x01(\x04\x12\n\n\x02nq\x18\x0c \x01(\x03:\x07\xca>\x04\x10\x0e\x18\x03\"5\n\x04Hits\x12\x0b\n\x03IDs\x18\x01 \x03(\x03\x12\x10\n\x08row_data\x18\x02 \x03(\x0c\x12\x0e\n\x06scores\x18\x03 \x03(\x02\"\x8d\x01\n\rSearchResults\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x36\n\x07results\x18\x02 \x01(\x0b\x32%.milvus.proto.schema.SearchResultData\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\"n\n\x0c\x46lushRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x18\n\x10\x63ollection_names\x18\x03 \x03(\t:\x07\xca>\x04\x10\x0f \x03\"\x9b\x04\n\rFlushResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12G\n\x0b\x63oll_segIDs\x18\x03 \x03(\x0b\x32\x32.milvus.proto.milvus.FlushResponse.CollSegIDsEntry\x12R\n\x11\x66lush_coll_segIDs\x18\x04 \x03(\x0b\x32\x37.milvus.proto.milvus.FlushResponse.FlushCollSegIDsEntry\x12N\n\x0f\x63oll_seal_times\x18\x05 \x03(\x0b\x32\x35.milvus.proto.milvus.FlushResponse.CollSealTimesEntry\x1aQ\n\x0f\x43ollSegIDsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12-\n\x05value\x18\x02 \x01(\x0b\x32\x1e.milvus.proto.schema.LongArray:\x02\x38\x01\x1aV\n\x14\x46lushCollSegIDsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12-\n\x05value\x18\x02 \x01(\x0b\x32\x1e.milvus.proto.schema.LongArray:\x02\x38\x01\x1a\x34\n\x12\x43ollSealTimesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x03:\x02\x38\x01\"\x9b\x02\n\x0cQueryRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0c\n\x04\x65xpr\x18\x04 \x01(\t\x12\x15\n\routput_fields\x18\x05 \x03(\t\x12\x17\n\x0fpartition_names\x18\x06 \x03(\t\x12\x18\n\x10travel_timestamp\x18\x07 \x01(\x04\x12\x1b\n\x13guarantee_timestamp\x18\x08 \x01(\x04\x12\x37\n\x0cquery_params\x18\t \x03(\x0b\x32!.milvus.proto.common.KeyValuePair:\x07\xca>\x04\x10\x10\x18\x03\"\x89\x01\n\x0cQueryResults\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x33\n\x0b\x66ields_data\x18\x02 \x03(\x0b\x32\x1e.milvus.proto.schema.FieldData\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\"}\n\tVectorIDs\x12\x17\n\x0f\x63ollection_name\x18\x01 \x01(\t\x12\x12\n\nfield_name\x18\x02 \x01(\t\x12*\n\x08id_array\x18\x03 \x01(\x0b\x32\x18.milvus.proto.schema.IDs\x12\x17\n\x0fpartition_names\x18\x04 \x03(\t\"\x83\x01\n\x0cVectorsArray\x12\x32\n\x08id_array\x18\x01 \x01(\x0b\x32\x1e.milvus.proto.milvus.VectorIDsH\x00\x12\x36\n\ndata_array\x18\x02 \x01(\x0b\x32 .milvus.proto.schema.VectorFieldH\x00\x42\x07\n\x05\x61rray\"\xdd\x01\n\x13\x43\x61lcDistanceRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x32\n\x07op_left\x18\x02 \x01(\x0b\x32!.milvus.proto.milvus.VectorsArray\x12\x33\n\x08op_right\x18\x03 \x01(\x0b\x32!.milvus.proto.milvus.VectorsArray\x12\x31\n\x06params\x18\x04 \x03(\x0b\x32!.milvus.proto.common.KeyValuePair\"\xb5\x01\n\x13\x43\x61lcDistanceResults\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x31\n\x08int_dist\x18\x02 \x01(\x0b\x32\x1d.milvus.proto.schema.IntArrayH\x00\x12\x35\n\nfloat_dist\x18\x03 \x01(\x0b\x32\x1f.milvus.proto.schema.FloatArrayH\x00\x42\x07\n\x05\x61rray\"\x99\x01\n\x15PersistentSegmentInfo\x12\x11\n\tsegmentID\x18\x01 \x01(\x03\x12\x14\n\x0c\x63ollectionID\x18\x02 \x01(\x03\x12\x13\n\x0bpartitionID\x18\x03 \x01(\x03\x12\x10\n\x08num_rows\x18\x04 \x01(\x03\x12\x30\n\x05state\x18\x05 \x01(\x0e\x32!.milvus.proto.common.SegmentState\"u\n\x1fGetPersistentSegmentInfoRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0e\n\x06\x64\x62Name\x18\x02 \x01(\t\x12\x16\n\x0e\x63ollectionName\x18\x03 \x01(\t\"\x8a\x01\n GetPersistentSegmentInfoResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x39\n\x05infos\x18\x02 \x03(\x0b\x32*.milvus.proto.milvus.PersistentSegmentInfo\"\xec\x01\n\x10QuerySegmentInfo\x12\x11\n\tsegmentID\x18\x01 \x01(\x03\x12\x14\n\x0c\x63ollectionID\x18\x02 \x01(\x03\x12\x13\n\x0bpartitionID\x18\x03 \x01(\x03\x12\x10\n\x08mem_size\x18\x04 \x01(\x03\x12\x10\n\x08num_rows\x18\x05 \x01(\x03\x12\x12\n\nindex_name\x18\x06 \x01(\t\x12\x0f\n\x07indexID\x18\x07 \x01(\x03\x12\x0e\n\x06nodeID\x18\x08 \x01(\x03\x12\x30\n\x05state\x18\t \x01(\x0e\x32!.milvus.proto.common.SegmentState\x12\x0f\n\x07nodeIds\x18\n \x03(\x03\"p\n\x1aGetQuerySegmentInfoRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0e\n\x06\x64\x62Name\x18\x02 \x01(\t\x12\x16\n\x0e\x63ollectionName\x18\x03 \x01(\t\"\x80\x01\n\x1bGetQuerySegmentInfoResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x34\n\x05infos\x18\x02 \x03(\x0b\x32%.milvus.proto.milvus.QuerySegmentInfo\"$\n\x0c\x44ummyRequest\x12\x14\n\x0crequest_type\x18\x01 \x01(\t\"!\n\rDummyResponse\x12\x10\n\x08response\x18\x01 \x01(\t\"\x15\n\x13RegisterLinkRequest\"r\n\x14RegisterLinkResponse\x12-\n\x07\x61\x64\x64ress\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.Address\x12+\n\x06status\x18\x02 \x01(\x0b\x32\x1b.milvus.proto.common.Status\"P\n\x11GetMetricsRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07request\x18\x02 \x01(\t\"k\n\x12GetMetricsResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x10\n\x08response\x18\x02 \x01(\t\x12\x16\n\x0e\x63omponent_name\x18\x03 \x01(\t\"\x98\x01\n\rComponentInfo\x12\x0e\n\x06nodeID\x18\x01 \x01(\x03\x12\x0c\n\x04role\x18\x02 \x01(\t\x12\x32\n\nstate_code\x18\x03 \x01(\x0e\x32\x1e.milvus.proto.common.StateCode\x12\x35\n\nextra_info\x18\x04 \x03(\x0b\x32!.milvus.proto.common.KeyValuePair\"\xb2\x01\n\x0f\x43omponentStates\x12\x31\n\x05state\x18\x01 \x01(\x0b\x32\".milvus.proto.milvus.ComponentInfo\x12?\n\x13subcomponent_states\x18\x02 \x03(\x0b\x32\".milvus.proto.milvus.ComponentInfo\x12+\n\x06status\x18\x03 \x01(\x0b\x32\x1b.milvus.proto.common.Status\"\x1b\n\x19GetComponentStatesRequest\"\xa5\x01\n\x12LoadBalanceRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x12\n\nsrc_nodeID\x18\x02 \x01(\x03\x12\x13\n\x0b\x64st_nodeIDs\x18\x03 \x03(\x03\x12\x19\n\x11sealed_segmentIDs\x18\x04 \x03(\x03\x12\x16\n\x0e\x63ollectionName\x18\x05 \x01(\t:\x07\xca>\x04\x10\x11\x18\x05\"L\n\x17ManualCompactionRequest\x12\x14\n\x0c\x63ollectionID\x18\x01 \x01(\x03\x12\x12\n\ntimetravel\x18\x02 \x01(\x04:\x07\xca>\x04\x10\x07\x18\x01\"]\n\x18ManualCompactionResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x14\n\x0c\x63ompactionID\x18\x02 \x01(\x03\"1\n\x19GetCompactionStateRequest\x12\x14\n\x0c\x63ompactionID\x18\x01 \x01(\x03\"\xdd\x01\n\x1aGetCompactionStateResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x33\n\x05state\x18\x02 \x01(\x0e\x32$.milvus.proto.common.CompactionState\x12\x17\n\x0f\x65xecutingPlanNo\x18\x03 \x01(\x03\x12\x15\n\rtimeoutPlanNo\x18\x04 \x01(\x03\x12\x17\n\x0f\x63ompletedPlanNo\x18\x05 \x01(\x03\x12\x14\n\x0c\x66\x61iledPlanNo\x18\x06 \x01(\x03\"1\n\x19GetCompactionPlansRequest\x12\x14\n\x0c\x63ompactionID\x18\x01 \x01(\x03\"\xbc\x01\n\x1aGetCompactionPlansResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x33\n\x05state\x18\x02 \x01(\x0e\x32$.milvus.proto.common.CompactionState\x12<\n\nmergeInfos\x18\x03 \x03(\x0b\x32(.milvus.proto.milvus.CompactionMergeInfo\"6\n\x13\x43ompactionMergeInfo\x12\x0f\n\x07sources\x18\x01 \x03(\x03\x12\x0e\n\x06target\x18\x02 \x01(\x03\"*\n\x14GetFlushStateRequest\x12\x12\n\nsegmentIDs\x18\x01 \x03(\x03\"U\n\x15GetFlushStateResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x0f\n\x07\x66lushed\x18\x02 \x01(\x08\"\xb6\x01\n\rImportRequest\x12\x17\n\x0f\x63ollection_name\x18\x01 \x01(\t\x12\x16\n\x0epartition_name\x18\x02 \x01(\t\x12\x15\n\rchannel_names\x18\x03 \x03(\t\x12\x11\n\trow_based\x18\x04 \x01(\x08\x12\r\n\x05\x66iles\x18\x05 \x03(\t\x12\x32\n\x07options\x18\x06 \x03(\x0b\x32!.milvus.proto.common.KeyValuePair:\x07\xca>\x04\x10\x12\x18\x01\"L\n\x0eImportResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\r\n\x05tasks\x18\x02 \x03(\x03\"%\n\x15GetImportStateRequest\x12\x0c\n\x04task\x18\x01 \x01(\x03\"\x97\x02\n\x16GetImportStateResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12/\n\x05state\x18\x02 \x01(\x0e\x32 .milvus.proto.common.ImportState\x12\x11\n\trow_count\x18\x03 \x01(\x03\x12\x0f\n\x07id_list\x18\x04 \x03(\x03\x12\x30\n\x05infos\x18\x05 \x03(\x0b\x32!.milvus.proto.common.KeyValuePair\x12\n\n\x02id\x18\x06 \x01(\x03\x12\x15\n\rcollection_id\x18\x07 \x01(\x03\x12\x13\n\x0bsegment_ids\x18\x08 \x03(\x03\x12\x11\n\tcreate_ts\x18\t \x01(\x03\"@\n\x16ListImportTasksRequest\x12\x17\n\x0f\x63ollection_name\x18\x01 \x01(\t\x12\r\n\x05limit\x18\x02 \x01(\x03\"\x82\x01\n\x17ListImportTasksResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12:\n\x05tasks\x18\x02 \x03(\x0b\x32+.milvus.proto.milvus.GetImportStateResponse\"p\n\x12GetReplicasRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x14\n\x0c\x63ollectionID\x18\x02 \x01(\x03\x12\x18\n\x10with_shard_nodes\x18\x03 \x01(\x08\"v\n\x13GetReplicasResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x32\n\x08replicas\x18\x02 \x03(\x0b\x32 .milvus.proto.milvus.ReplicaInfo\"\x9a\x01\n\x0bReplicaInfo\x12\x11\n\treplicaID\x18\x01 \x01(\x03\x12\x14\n\x0c\x63ollectionID\x18\x02 \x01(\x03\x12\x15\n\rpartition_ids\x18\x03 \x03(\x03\x12\x39\n\x0eshard_replicas\x18\x04 \x03(\x0b\x32!.milvus.proto.milvus.ShardReplica\x12\x10\n\x08node_ids\x18\x05 \x03(\x03\"`\n\x0cShardReplica\x12\x10\n\x08leaderID\x18\x01 \x01(\x03\x12\x13\n\x0bleader_addr\x18\x02 \x01(\t\x12\x17\n\x0f\x64m_channel_name\x18\x03 \x01(\t\x12\x10\n\x08node_ids\x18\x04 \x03(\x03\"\xbe\x01\n\x17\x43reateCredentialRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x10\n\x08username\x18\x02 \x01(\t\x12\x10\n\x08password\x18\x03 \x01(\t\x12\x1e\n\x16\x63reated_utc_timestamps\x18\x04 \x01(\x04\x12\x1f\n\x17modified_utc_timestamps\x18\x05 \x01(\x04:\x12\xca>\x0f\x08\x01\x10\x13\x18\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\"\xcd\x01\n\x17UpdateCredentialRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x10\n\x08username\x18\x02 \x01(\t\x12\x13\n\x0boldPassword\x18\x03 \x01(\t\x12\x13\n\x0bnewPassword\x18\x04 \x01(\t\x12\x1e\n\x16\x63reated_utc_timestamps\x18\x05 \x01(\x04\x12\x1f\n\x17modified_utc_timestamps\x18\x06 \x01(\x04:\t\xca>\x06\x08\x02\x10\x14\x18\x02\"k\n\x17\x44\x65leteCredentialRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x10\n\x08username\x18\x02 \x01(\t:\x12\xca>\x0f\x08\x01\x10\x15\x18\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\"W\n\x15ListCredUsersResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x11\n\tusernames\x18\x02 \x03(\t\"V\n\x14ListCredUsersRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase:\x12\xca>\x0f\x08\x01\x10\x16\x18\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\"\x1a\n\nRoleEntity\x12\x0c\n\x04name\x18\x01 \x01(\t\"\x1a\n\nUserEntity\x12\x0c\n\x04name\x18\x01 \x01(\t\"\x84\x01\n\x11\x43reateRoleRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12/\n\x06\x65ntity\x18\x02 \x01(\x0b\x32\x1f.milvus.proto.milvus.RoleEntity:\x12\xca>\x0f\x08\x01\x10\x13\x18\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\"d\n\x0f\x44ropRoleRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x11\n\trole_name\x18\x02 \x01(\t:\x12\xca>\x0f\x08\x01\x10\x15\x18\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\"\xb5\x01\n\x16OperateUserRoleRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x10\n\x08username\x18\x02 \x01(\t\x12\x11\n\trole_name\x18\x03 \x01(\t\x12\x36\n\x04type\x18\x04 \x01(\x0e\x32(.milvus.proto.milvus.OperateUserRoleType:\x12\xca>\x0f\x08\x01\x10\x17\x18\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\"\x9d\x01\n\x11SelectRoleRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12-\n\x04role\x18\x02 \x01(\x0b\x32\x1f.milvus.proto.milvus.RoleEntity\x12\x19\n\x11include_user_info\x18\x03 \x01(\x08:\x12\xca>\x0f\x08\x01\x10\x16\x18\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\"k\n\nRoleResult\x12-\n\x04role\x18\x01 \x01(\x0b\x32\x1f.milvus.proto.milvus.RoleEntity\x12.\n\x05users\x18\x02 \x03(\x0b\x32\x1f.milvus.proto.milvus.UserEntity\"s\n\x12SelectRoleResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x30\n\x07results\x18\x02 \x03(\x0b\x32\x1f.milvus.proto.milvus.RoleResult\"\x94\x01\n\x11SelectUserRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12-\n\x04user\x18\x02 \x01(\x0b\x32\x1f.milvus.proto.milvus.UserEntity\x12\x19\n\x11include_role_info\x18\x03 \x01(\x08:\t\xca>\x06\x08\x02\x10\x18\x18\x02\"k\n\nUserResult\x12-\n\x04user\x18\x01 \x01(\x0b\x32\x1f.milvus.proto.milvus.UserEntity\x12.\n\x05roles\x18\x02 \x03(\x0b\x32\x1f.milvus.proto.milvus.RoleEntity\"s\n\x12SelectUserResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x30\n\x07results\x18\x02 \x03(\x0b\x32\x1f.milvus.proto.milvus.UserResult\"\x1c\n\x0cObjectEntity\x12\x0c\n\x04name\x18\x01 \x01(\t\"\x1f\n\x0fPrivilegeEntity\x12\x0c\n\x04name\x18\x01 \x01(\t\"w\n\rGrantorEntity\x12-\n\x04user\x18\x01 \x01(\x0b\x32\x1f.milvus.proto.milvus.UserEntity\x12\x37\n\tprivilege\x18\x02 \x01(\x0b\x32$.milvus.proto.milvus.PrivilegeEntity\"L\n\x14GrantPrivilegeEntity\x12\x34\n\x08\x65ntities\x18\x01 \x03(\x0b\x32\".milvus.proto.milvus.GrantorEntity\"\xb9\x01\n\x0bGrantEntity\x12-\n\x04role\x18\x01 \x01(\x0b\x32\x1f.milvus.proto.milvus.RoleEntity\x12\x31\n\x06object\x18\x02 \x01(\x0b\x32!.milvus.proto.milvus.ObjectEntity\x12\x13\n\x0bobject_name\x18\x03 \x01(\t\x12\x33\n\x07grantor\x18\x04 \x01(\x0b\x32\".milvus.proto.milvus.GrantorEntity\"\x86\x01\n\x12SelectGrantRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x30\n\x06\x65ntity\x18\x02 \x01(\x0b\x32 .milvus.proto.milvus.GrantEntity:\x12\xca>\x0f\x08\x01\x10\x16\x18\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\"v\n\x13SelectGrantResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x32\n\x08\x65ntities\x18\x02 \x03(\x0b\x32 .milvus.proto.milvus.GrantEntity\"\xc4\x01\n\x17OperatePrivilegeRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x30\n\x06\x65ntity\x18\x02 \x01(\x0b\x32 .milvus.proto.milvus.GrantEntity\x12\x37\n\x04type\x18\x03 \x01(\x0e\x32).milvus.proto.milvus.OperatePrivilegeType:\x12\xca>\x0f\x08\x01\x10\x17\x18\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\"y\n\x19GetLoadingProgressRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x17\n\x0f\x63ollection_name\x18\x02 \x01(\t\x12\x17\n\x0fpartition_names\x18\x03 \x03(\t\"[\n\x1aGetLoadingProgressResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x10\n\x08progress\x18\x02 \x01(\x03\"\x1c\n\tMilvusExt\x12\x0f\n\x07version\x18\x01 \x01(\t\"\x13\n\x11GetVersionRequest\"%\n\x12GetVersionResponse\x12\x0f\n\x07version\x18\x01 \x01(\t*!\n\x08ShowType\x12\x07\n\x03\x41ll\x10\x00\x12\x0c\n\x08InMemory\x10\x01*@\n\x13OperateUserRoleType\x12\x11\n\rAddUserToRole\x10\x00\x12\x16\n\x12RemoveUserFromRole\x10\x01*-\n\x14OperatePrivilegeType\x12\t\n\x05Grant\x10\x00\x12\n\n\x06Revoke\x10\x01\x32\xbf.\n\rMilvusService\x12_\n\x10\x43reateCollection\x12,.milvus.proto.milvus.CreateCollectionRequest\x1a\x1b.milvus.proto.common.Status\"\x00\x12[\n\x0e\x44ropCollection\x12*.milvus.proto.milvus.DropCollectionRequest\x1a\x1b.milvus.proto.common.Status\"\x00\x12_\n\rHasCollection\x12).milvus.proto.milvus.HasCollectionRequest\x1a!.milvus.proto.milvus.BoolResponse\"\x00\x12[\n\x0eLoadCollection\x12*.milvus.proto.milvus.LoadCollectionRequest\x1a\x1b.milvus.proto.common.Status\"\x00\x12\x61\n\x11ReleaseCollection\x12-.milvus.proto.milvus.ReleaseCollectionRequest\x1a\x1b.milvus.proto.common.Status\"\x00\x12w\n\x12\x44\x65scribeCollection\x12..milvus.proto.milvus.DescribeCollectionRequest\x1a/.milvus.proto.milvus.DescribeCollectionResponse\"\x00\x12\x86\x01\n\x17GetCollectionStatistics\x12\x33.milvus.proto.milvus.GetCollectionStatisticsRequest\x1a\x34.milvus.proto.milvus.GetCollectionStatisticsResponse\"\x00\x12n\n\x0fShowCollections\x12+.milvus.proto.milvus.ShowCollectionsRequest\x1a,.milvus.proto.milvus.ShowCollectionsResponse\"\x00\x12]\n\x0f\x41lterCollection\x12+.milvus.proto.milvus.AlterCollectionRequest\x1a\x1b.milvus.proto.common.Status\"\x00\x12]\n\x0f\x43reatePartition\x12+.milvus.proto.milvus.CreatePartitionRequest\x1a\x1b.milvus.proto.common.Status\"\x00\x12Y\n\rDropPartition\x12).milvus.proto.milvus.DropPartitionRequest\x1a\x1b.milvus.proto.common.Status\"\x00\x12]\n\x0cHasPartition\x12(.milvus.proto.milvus.HasPartitionRequest\x1a!.milvus.proto.milvus.BoolResponse\"\x00\x12[\n\x0eLoadPartitions\x12*.milvus.proto.milvus.LoadPartitionsRequest\x1a\x1b.milvus.proto.common.Status\"\x00\x12\x61\n\x11ReleasePartitions\x12-.milvus.proto.milvus.ReleasePartitionsRequest\x1a\x1b.milvus.proto.common.Status\"\x00\x12\x83\x01\n\x16GetPartitionStatistics\x12\x32.milvus.proto.milvus.GetPartitionStatisticsRequest\x1a\x33.milvus.proto.milvus.GetPartitionStatisticsResponse\"\x00\x12k\n\x0eShowPartitions\x12*.milvus.proto.milvus.ShowPartitionsRequest\x1a+.milvus.proto.milvus.ShowPartitionsResponse\"\x00\x12w\n\x12GetLoadingProgress\x12..milvus.proto.milvus.GetLoadingProgressRequest\x1a/.milvus.proto.milvus.GetLoadingProgressResponse\"\x00\x12U\n\x0b\x43reateAlias\x12\'.milvus.proto.milvus.CreateAliasRequest\x1a\x1b.milvus.proto.common.Status\"\x00\x12Q\n\tDropAlias\x12%.milvus.proto.milvus.DropAliasRequest\x1a\x1b.milvus.proto.common.Status\"\x00\x12S\n\nAlterAlias\x12&.milvus.proto.milvus.AlterAliasRequest\x1a\x1b.milvus.proto.common.Status\"\x00\x12U\n\x0b\x43reateIndex\x12\'.milvus.proto.milvus.CreateIndexRequest\x1a\x1b.milvus.proto.common.Status\"\x00\x12h\n\rDescribeIndex\x12).milvus.proto.milvus.DescribeIndexRequest\x1a*.milvus.proto.milvus.DescribeIndexResponse\"\x00\x12h\n\rGetIndexState\x12).milvus.proto.milvus.GetIndexStateRequest\x1a*.milvus.proto.milvus.GetIndexStateResponse\"\x00\x12\x80\x01\n\x15GetIndexBuildProgress\x12\x31.milvus.proto.milvus.GetIndexBuildProgressRequest\x1a\x32.milvus.proto.milvus.GetIndexBuildProgressResponse\"\x00\x12Q\n\tDropIndex\x12%.milvus.proto.milvus.DropIndexRequest\x1a\x1b.milvus.proto.common.Status\"\x00\x12S\n\x06Insert\x12\".milvus.proto.milvus.InsertRequest\x1a#.milvus.proto.milvus.MutationResult\"\x00\x12S\n\x06\x44\x65lete\x12\".milvus.proto.milvus.DeleteRequest\x1a#.milvus.proto.milvus.MutationResult\"\x00\x12R\n\x06Search\x12\".milvus.proto.milvus.SearchRequest\x1a\".milvus.proto.milvus.SearchResults\"\x00\x12P\n\x05\x46lush\x12!.milvus.proto.milvus.FlushRequest\x1a\".milvus.proto.milvus.FlushResponse\"\x00\x12O\n\x05Query\x12!.milvus.proto.milvus.QueryRequest\x1a!.milvus.proto.milvus.QueryResults\"\x00\x12\x64\n\x0c\x43\x61lcDistance\x12(.milvus.proto.milvus.CalcDistanceRequest\x1a(.milvus.proto.milvus.CalcDistanceResults\"\x00\x12h\n\rGetFlushState\x12).milvus.proto.milvus.GetFlushStateRequest\x1a*.milvus.proto.milvus.GetFlushStateResponse\"\x00\x12\x89\x01\n\x18GetPersistentSegmentInfo\x12\x34.milvus.proto.milvus.GetPersistentSegmentInfoRequest\x1a\x35.milvus.proto.milvus.GetPersistentSegmentInfoResponse\"\x00\x12z\n\x13GetQuerySegmentInfo\x12/.milvus.proto.milvus.GetQuerySegmentInfoRequest\x1a\x30.milvus.proto.milvus.GetQuerySegmentInfoResponse\"\x00\x12\x62\n\x0bGetReplicas\x12\'.milvus.proto.milvus.GetReplicasRequest\x1a(.milvus.proto.milvus.GetReplicasResponse\"\x00\x12P\n\x05\x44ummy\x12!.milvus.proto.milvus.DummyRequest\x1a\".milvus.proto.milvus.DummyResponse\"\x00\x12\x65\n\x0cRegisterLink\x12(.milvus.proto.milvus.RegisterLinkRequest\x1a).milvus.proto.milvus.RegisterLinkResponse\"\x00\x12_\n\nGetMetrics\x12&.milvus.proto.milvus.GetMetricsRequest\x1a\'.milvus.proto.milvus.GetMetricsResponse\"\x00\x12l\n\x12GetComponentStates\x12..milvus.proto.milvus.GetComponentStatesRequest\x1a$.milvus.proto.milvus.ComponentStates\"\x00\x12U\n\x0bLoadBalance\x12\'.milvus.proto.milvus.LoadBalanceRequest\x1a\x1b.milvus.proto.common.Status\"\x00\x12w\n\x12GetCompactionState\x12..milvus.proto.milvus.GetCompactionStateRequest\x1a/.milvus.proto.milvus.GetCompactionStateResponse\"\x00\x12q\n\x10ManualCompaction\x12,.milvus.proto.milvus.ManualCompactionRequest\x1a-.milvus.proto.milvus.ManualCompactionResponse\"\x00\x12\x80\x01\n\x1bGetCompactionStateWithPlans\x12..milvus.proto.milvus.GetCompactionPlansRequest\x1a/.milvus.proto.milvus.GetCompactionPlansResponse\"\x00\x12S\n\x06Import\x12\".milvus.proto.milvus.ImportRequest\x1a#.milvus.proto.milvus.ImportResponse\"\x00\x12k\n\x0eGetImportState\x12*.milvus.proto.milvus.GetImportStateRequest\x1a+.milvus.proto.milvus.GetImportStateResponse\"\x00\x12n\n\x0fListImportTasks\x12+.milvus.proto.milvus.ListImportTasksRequest\x1a,.milvus.proto.milvus.ListImportTasksResponse\"\x00\x12_\n\x10\x43reateCredential\x12,.milvus.proto.milvus.CreateCredentialRequest\x1a\x1b.milvus.proto.common.Status\"\x00\x12_\n\x10UpdateCredential\x12,.milvus.proto.milvus.UpdateCredentialRequest\x1a\x1b.milvus.proto.common.Status\"\x00\x12_\n\x10\x44\x65leteCredential\x12,.milvus.proto.milvus.DeleteCredentialRequest\x1a\x1b.milvus.proto.common.Status\"\x00\x12h\n\rListCredUsers\x12).milvus.proto.milvus.ListCredUsersRequest\x1a*.milvus.proto.milvus.ListCredUsersResponse\"\x00\x12S\n\nCreateRole\x12&.milvus.proto.milvus.CreateRoleRequest\x1a\x1b.milvus.proto.common.Status\"\x00\x12O\n\x08\x44ropRole\x12$.milvus.proto.milvus.DropRoleRequest\x1a\x1b.milvus.proto.common.Status\"\x00\x12]\n\x0fOperateUserRole\x12+.milvus.proto.milvus.OperateUserRoleRequest\x1a\x1b.milvus.proto.common.Status\"\x00\x12_\n\nSelectRole\x12&.milvus.proto.milvus.SelectRoleRequest\x1a\'.milvus.proto.milvus.SelectRoleResponse\"\x00\x12_\n\nSelectUser\x12&.milvus.proto.milvus.SelectUserRequest\x1a\'.milvus.proto.milvus.SelectUserResponse\"\x00\x12_\n\x10OperatePrivilege\x12,.milvus.proto.milvus.OperatePrivilegeRequest\x1a\x1b.milvus.proto.common.Status\"\x00\x12\x62\n\x0bSelectGrant\x12\'.milvus.proto.milvus.SelectGrantRequest\x1a(.milvus.proto.milvus.SelectGrantResponse\"\x00\x12_\n\nGetVersion\x12&.milvus.proto.milvus.GetVersionRequest\x1a\'.milvus.proto.milvus.GetVersionResponse\"\x00\x12\x62\n\x0b\x43heckHealth\x12\'.milvus.proto.milvus.CheckHealthRequest\x1a(.milvus.proto.milvus.CheckHealthResponse\"\x00\x32u\n\x0cProxyService\x12\x65\n\x0cRegisterLink\x12(.milvus.proto.milvus.RegisterLinkRequest\x1a).milvus.proto.milvus.RegisterLinkResponse\"\x00:U\n\x0emilvus_ext_obj\x12\x1c.google.protobuf.FileOptions\x18\xe9\x07 \x01(\x0b\x32\x1e.milvus.proto.milvus.MilvusExtBU\n\x0eio.milvus.grpcB\x0bMilvusProtoP\x01Z1github.com/milvus-io/milvus-proto/go-api/milvuspb\xa0\x01\x01\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0cmilvus.proto\x12\x13milvus.proto.milvus\x1a\x0c\x63ommon.proto\x1a\x0cschema.proto\x1a google/protobuf/descriptor.proto\"y\n\x12\x43reateAliasRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\r\n\x05\x61lias\x18\x04 \x01(\t\"^\n\x10\x44ropAliasRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\r\n\x05\x61lias\x18\x03 \x01(\t\"x\n\x11\x41lterAliasRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\r\n\x05\x61lias\x18\x04 \x01(\t\"\xa0\x02\n\x17\x43reateCollectionRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0e\n\x06schema\x18\x04 \x01(\x0c\x12\x12\n\nshards_num\x18\x05 \x01(\x05\x12@\n\x11\x63onsistency_level\x18\x06 \x01(\x0e\x32%.milvus.proto.common.ConsistencyLevel\x12\x35\n\nproperties\x18\x07 \x03(\x0b\x32!.milvus.proto.common.KeyValuePair:\x12\xca>\x0f\x08\x01\x10\x01\x18\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\"\x81\x01\n\x15\x44ropCollectionRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t:\x12\xca>\x0f\x08\x01\x10\x02\x18\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\"\xcf\x01\n\x16\x41lterCollectionRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x14\n\x0c\x63ollectionID\x18\x04 \x01(\x03\x12\x35\n\nproperties\x18\x05 \x03(\x0b\x32!.milvus.proto.common.KeyValuePair:\x12\xca>\x0f\x08\x01\x10\x01\x18\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\"\x80\x01\n\x14HasCollectionRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x12\n\ntime_stamp\x18\x04 \x01(\x04\"J\n\x0c\x42oolResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\r\n\x05value\x18\x02 \x01(\x08\"L\n\x0eStringResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\r\n\x05value\x18\x02 \x01(\t\"\xaf\x01\n\x19\x44\x65scribeCollectionRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x14\n\x0c\x63ollectionID\x18\x04 \x01(\x03\x12\x12\n\ntime_stamp\x18\x05 \x01(\x04:\x12\xca>\x0f\x08\x01\x10\x03\x18\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\"\x81\x04\n\x1a\x44\x65scribeCollectionResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x35\n\x06schema\x18\x02 \x01(\x0b\x32%.milvus.proto.schema.CollectionSchema\x12\x14\n\x0c\x63ollectionID\x18\x03 \x01(\x03\x12\x1d\n\x15virtual_channel_names\x18\x04 \x03(\t\x12\x1e\n\x16physical_channel_names\x18\x05 \x03(\t\x12\x19\n\x11\x63reated_timestamp\x18\x06 \x01(\x04\x12\x1d\n\x15\x63reated_utc_timestamp\x18\x07 \x01(\x04\x12\x12\n\nshards_num\x18\x08 \x01(\x05\x12\x0f\n\x07\x61liases\x18\t \x03(\t\x12\x39\n\x0fstart_positions\x18\n \x03(\x0b\x32 .milvus.proto.common.KeyDataPair\x12@\n\x11\x63onsistency_level\x18\x0b \x01(\x0e\x32%.milvus.proto.common.ConsistencyLevel\x12\x17\n\x0f\x63ollection_name\x18\x0c \x01(\t\x12\x35\n\nproperties\x18\r \x03(\x0b\x32!.milvus.proto.common.KeyValuePair\"\x8e\x01\n\x15LoadCollectionRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x16\n\x0ereplica_number\x18\x04 \x01(\x05:\x07\xca>\x04\x10\x05\x18\x03\"y\n\x18ReleaseCollectionRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t:\x07\xca>\x04\x10\x06\x18\x03\"\xab\x01\n\x14GetStatisticsRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x17\n\x0fpartition_names\x18\x04 \x03(\t\x12\x1b\n\x13guarantee_timestamp\x18\x05 \x01(\x04:\x07\xca>\x04\x10\n\x18\x03\"v\n\x15GetStatisticsResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x30\n\x05stats\x18\x02 \x03(\x0b\x32!.milvus.proto.common.KeyValuePair\"\x7f\n\x1eGetCollectionStatisticsRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t:\x07\xca>\x04\x10\n\x18\x03\"\x80\x01\n\x1fGetCollectionStatisticsResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x30\n\x05stats\x18\x02 \x03(\x0b\x32!.milvus.proto.common.KeyValuePair\"\xc4\x01\n\x16ShowCollectionsRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x12\n\ntime_stamp\x18\x03 \x01(\x04\x12+\n\x04type\x18\x04 \x01(\x0e\x32\x1d.milvus.proto.milvus.ShowType\x12\x18\n\x10\x63ollection_names\x18\x05 \x03(\t:\x12\xca>\x0f\x08\x01\x10\x04\x18\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\"\xf3\x01\n\x17ShowCollectionsResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x18\n\x10\x63ollection_names\x18\x02 \x03(\t\x12\x16\n\x0e\x63ollection_ids\x18\x03 \x03(\x03\x12\x1a\n\x12\x63reated_timestamps\x18\x04 \x03(\x04\x12\x1e\n\x16\x63reated_utc_timestamps\x18\x05 \x03(\x04\x12\x1c\n\x14inMemory_percentages\x18\x06 \x03(\x03\x12\x1f\n\x17query_service_available\x18\x07 \x03(\x08\"\x86\x01\n\x16\x43reatePartitionRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x16\n\x0epartition_name\x18\x04 \x01(\t\"\x84\x01\n\x14\x44ropPartitionRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x16\n\x0epartition_name\x18\x04 \x01(\t\"\x83\x01\n\x13HasPartitionRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x16\n\x0epartition_name\x18\x04 \x01(\t\"\x9e\x01\n\x15LoadPartitionsRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x17\n\x0fpartition_names\x18\x04 \x03(\t\x12\x16\n\x0ereplica_number\x18\x05 \x01(\x05\"\x89\x01\n\x18ReleasePartitionsRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x17\n\x0fpartition_names\x18\x04 \x03(\t\"\x8d\x01\n\x1dGetPartitionStatisticsRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x16\n\x0epartition_name\x18\x04 \x01(\t\"\x7f\n\x1eGetPartitionStatisticsResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x30\n\x05stats\x18\x02 \x03(\x0b\x32!.milvus.proto.common.KeyValuePair\"\xc9\x01\n\x15ShowPartitionsRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x14\n\x0c\x63ollectionID\x18\x04 \x01(\x03\x12\x17\n\x0fpartition_names\x18\x05 \x03(\t\x12+\n\x04type\x18\x06 \x01(\x0e\x32\x1d.milvus.proto.milvus.ShowType\"\xce\x01\n\x16ShowPartitionsResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x17\n\x0fpartition_names\x18\x02 \x03(\t\x12\x14\n\x0cpartitionIDs\x18\x03 \x03(\x03\x12\x1a\n\x12\x63reated_timestamps\x18\x04 \x03(\x04\x12\x1e\n\x16\x63reated_utc_timestamps\x18\x05 \x03(\x04\x12\x1c\n\x14inMemory_percentages\x18\x06 \x03(\x03\"m\n\x16\x44\x65scribeSegmentRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x14\n\x0c\x63ollectionID\x18\x02 \x01(\x03\x12\x11\n\tsegmentID\x18\x03 \x01(\x03\"\x8f\x01\n\x17\x44\x65scribeSegmentResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x0f\n\x07indexID\x18\x02 \x01(\x03\x12\x0f\n\x07\x62uildID\x18\x03 \x01(\x03\x12\x14\n\x0c\x65nable_index\x18\x04 \x01(\x08\x12\x0f\n\x07\x66ieldID\x18\x05 \x01(\x03\"l\n\x13ShowSegmentsRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x14\n\x0c\x63ollectionID\x18\x02 \x01(\x03\x12\x13\n\x0bpartitionID\x18\x03 \x01(\x03\"W\n\x14ShowSegmentsResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x12\n\nsegmentIDs\x18\x02 \x03(\x03\"\xd4\x01\n\x12\x43reateIndexRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x12\n\nfield_name\x18\x04 \x01(\t\x12\x37\n\x0c\x65xtra_params\x18\x05 \x03(\x0b\x32!.milvus.proto.common.KeyValuePair\x12\x12\n\nindex_name\x18\x06 \x01(\t:\x07\xca>\x04\x10\x0b\x18\x03\"\x9d\x01\n\x14\x44\x65scribeIndexRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x12\n\nfield_name\x18\x04 \x01(\t\x12\x12\n\nindex_name\x18\x05 \x01(\t:\x07\xca>\x04\x10\x0c\x18\x03\"\xf9\x01\n\x10IndexDescription\x12\x12\n\nindex_name\x18\x01 \x01(\t\x12\x0f\n\x07indexID\x18\x02 \x01(\x03\x12\x31\n\x06params\x18\x03 \x03(\x0b\x32!.milvus.proto.common.KeyValuePair\x12\x12\n\nfield_name\x18\x04 \x01(\t\x12\x14\n\x0cindexed_rows\x18\x05 \x01(\x03\x12\x12\n\ntotal_rows\x18\x06 \x01(\x03\x12.\n\x05state\x18\x07 \x01(\x0e\x32\x1f.milvus.proto.common.IndexState\x12\x1f\n\x17index_state_fail_reason\x18\x08 \x01(\t\"\x87\x01\n\x15\x44\x65scribeIndexResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x41\n\x12index_descriptions\x18\x02 \x03(\x0b\x32%.milvus.proto.milvus.IndexDescription\"\xa5\x01\n\x1cGetIndexBuildProgressRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x12\n\nfield_name\x18\x04 \x01(\t\x12\x12\n\nindex_name\x18\x05 \x01(\t:\x07\xca>\x04\x10\x0c\x18\x03\"v\n\x1dGetIndexBuildProgressResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x14\n\x0cindexed_rows\x18\x02 \x01(\x03\x12\x12\n\ntotal_rows\x18\x03 \x01(\x03\"\x9d\x01\n\x14GetIndexStateRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x12\n\nfield_name\x18\x04 \x01(\t\x12\x12\n\nindex_name\x18\x05 \x01(\t:\x07\xca>\x04\x10\x0c\x18\x03\"\x89\x01\n\x15GetIndexStateResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12.\n\x05state\x18\x02 \x01(\x0e\x32\x1f.milvus.proto.common.IndexState\x12\x13\n\x0b\x66\x61il_reason\x18\x03 \x01(\t\"\x99\x01\n\x10\x44ropIndexRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x12\n\nfield_name\x18\x04 \x01(\t\x12\x12\n\nindex_name\x18\x05 \x01(\t:\x07\xca>\x04\x10\r\x18\x03\"\xe0\x01\n\rInsertRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x16\n\x0epartition_name\x18\x04 \x01(\t\x12\x33\n\x0b\x66ields_data\x18\x05 \x03(\x0b\x32\x1e.milvus.proto.schema.FieldData\x12\x11\n\thash_keys\x18\x06 \x03(\r\x12\x10\n\x08num_rows\x18\x07 \x01(\r:\x07\xca>\x04\x10\x08\x18\x03\"\xf0\x01\n\x0eMutationResult\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12%\n\x03IDs\x18\x02 \x01(\x0b\x32\x18.milvus.proto.schema.IDs\x12\x12\n\nsucc_index\x18\x03 \x03(\r\x12\x11\n\terr_index\x18\x04 \x03(\r\x12\x14\n\x0c\x61\x63knowledged\x18\x05 \x01(\x08\x12\x12\n\ninsert_cnt\x18\x06 \x01(\x03\x12\x12\n\ndelete_cnt\x18\x07 \x01(\x03\x12\x12\n\nupsert_cnt\x18\x08 \x01(\x03\x12\x11\n\ttimestamp\x18\t \x01(\x04\"\xa7\x01\n\rDeleteRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x16\n\x0epartition_name\x18\x04 \x01(\t\x12\x0c\n\x04\x65xpr\x18\x05 \x01(\t\x12\x11\n\thash_keys\x18\x06 \x03(\r:\x07\xca>\x04\x10\t\x18\x03\"\xf3\x02\n\rSearchRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x17\n\x0fpartition_names\x18\x04 \x03(\t\x12\x0b\n\x03\x64sl\x18\x05 \x01(\t\x12\x19\n\x11placeholder_group\x18\x06 \x01(\x0c\x12.\n\x08\x64sl_type\x18\x07 \x01(\x0e\x32\x1c.milvus.proto.common.DslType\x12\x15\n\routput_fields\x18\x08 \x03(\t\x12\x38\n\rsearch_params\x18\t \x03(\x0b\x32!.milvus.proto.common.KeyValuePair\x12\x18\n\x10travel_timestamp\x18\n \x01(\x04\x12\x1b\n\x13guarantee_timestamp\x18\x0b \x01(\x04\x12\n\n\x02nq\x18\x0c \x01(\x03:\x07\xca>\x04\x10\x0e\x18\x03\"5\n\x04Hits\x12\x0b\n\x03IDs\x18\x01 \x03(\x03\x12\x10\n\x08row_data\x18\x02 \x03(\x0c\x12\x0e\n\x06scores\x18\x03 \x03(\x02\"\x8d\x01\n\rSearchResults\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x36\n\x07results\x18\x02 \x01(\x0b\x32%.milvus.proto.schema.SearchResultData\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\"n\n\x0c\x46lushRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x18\n\x10\x63ollection_names\x18\x03 \x03(\t:\x07\xca>\x04\x10\x0f \x03\"\x9b\x04\n\rFlushResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12G\n\x0b\x63oll_segIDs\x18\x03 \x03(\x0b\x32\x32.milvus.proto.milvus.FlushResponse.CollSegIDsEntry\x12R\n\x11\x66lush_coll_segIDs\x18\x04 \x03(\x0b\x32\x37.milvus.proto.milvus.FlushResponse.FlushCollSegIDsEntry\x12N\n\x0f\x63oll_seal_times\x18\x05 \x03(\x0b\x32\x35.milvus.proto.milvus.FlushResponse.CollSealTimesEntry\x1aQ\n\x0f\x43ollSegIDsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12-\n\x05value\x18\x02 \x01(\x0b\x32\x1e.milvus.proto.schema.LongArray:\x02\x38\x01\x1aV\n\x14\x46lushCollSegIDsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12-\n\x05value\x18\x02 \x01(\x0b\x32\x1e.milvus.proto.schema.LongArray:\x02\x38\x01\x1a\x34\n\x12\x43ollSealTimesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x03:\x02\x38\x01\"\x9b\x02\n\x0cQueryRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07\x64\x62_name\x18\x02 \x01(\t\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\x12\x0c\n\x04\x65xpr\x18\x04 \x01(\t\x12\x15\n\routput_fields\x18\x05 \x03(\t\x12\x17\n\x0fpartition_names\x18\x06 \x03(\t\x12\x18\n\x10travel_timestamp\x18\x07 \x01(\x04\x12\x1b\n\x13guarantee_timestamp\x18\x08 \x01(\x04\x12\x37\n\x0cquery_params\x18\t \x03(\x0b\x32!.milvus.proto.common.KeyValuePair:\x07\xca>\x04\x10\x10\x18\x03\"\x89\x01\n\x0cQueryResults\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x33\n\x0b\x66ields_data\x18\x02 \x03(\x0b\x32\x1e.milvus.proto.schema.FieldData\x12\x17\n\x0f\x63ollection_name\x18\x03 \x01(\t\"}\n\tVectorIDs\x12\x17\n\x0f\x63ollection_name\x18\x01 \x01(\t\x12\x12\n\nfield_name\x18\x02 \x01(\t\x12*\n\x08id_array\x18\x03 \x01(\x0b\x32\x18.milvus.proto.schema.IDs\x12\x17\n\x0fpartition_names\x18\x04 \x03(\t\"\x83\x01\n\x0cVectorsArray\x12\x32\n\x08id_array\x18\x01 \x01(\x0b\x32\x1e.milvus.proto.milvus.VectorIDsH\x00\x12\x36\n\ndata_array\x18\x02 \x01(\x0b\x32 .milvus.proto.schema.VectorFieldH\x00\x42\x07\n\x05\x61rray\"\xdd\x01\n\x13\x43\x61lcDistanceRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x32\n\x07op_left\x18\x02 \x01(\x0b\x32!.milvus.proto.milvus.VectorsArray\x12\x33\n\x08op_right\x18\x03 \x01(\x0b\x32!.milvus.proto.milvus.VectorsArray\x12\x31\n\x06params\x18\x04 \x03(\x0b\x32!.milvus.proto.common.KeyValuePair\"\xb5\x01\n\x13\x43\x61lcDistanceResults\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x31\n\x08int_dist\x18\x02 \x01(\x0b\x32\x1d.milvus.proto.schema.IntArrayH\x00\x12\x35\n\nfloat_dist\x18\x03 \x01(\x0b\x32\x1f.milvus.proto.schema.FloatArrayH\x00\x42\x07\n\x05\x61rray\"\x99\x01\n\x15PersistentSegmentInfo\x12\x11\n\tsegmentID\x18\x01 \x01(\x03\x12\x14\n\x0c\x63ollectionID\x18\x02 \x01(\x03\x12\x13\n\x0bpartitionID\x18\x03 \x01(\x03\x12\x10\n\x08num_rows\x18\x04 \x01(\x03\x12\x30\n\x05state\x18\x05 \x01(\x0e\x32!.milvus.proto.common.SegmentState\"u\n\x1fGetPersistentSegmentInfoRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0e\n\x06\x64\x62Name\x18\x02 \x01(\t\x12\x16\n\x0e\x63ollectionName\x18\x03 \x01(\t\"\x8a\x01\n GetPersistentSegmentInfoResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x39\n\x05infos\x18\x02 \x03(\x0b\x32*.milvus.proto.milvus.PersistentSegmentInfo\"\xec\x01\n\x10QuerySegmentInfo\x12\x11\n\tsegmentID\x18\x01 \x01(\x03\x12\x14\n\x0c\x63ollectionID\x18\x02 \x01(\x03\x12\x13\n\x0bpartitionID\x18\x03 \x01(\x03\x12\x10\n\x08mem_size\x18\x04 \x01(\x03\x12\x10\n\x08num_rows\x18\x05 \x01(\x03\x12\x12\n\nindex_name\x18\x06 \x01(\t\x12\x0f\n\x07indexID\x18\x07 \x01(\x03\x12\x0e\n\x06nodeID\x18\x08 \x01(\x03\x12\x30\n\x05state\x18\t \x01(\x0e\x32!.milvus.proto.common.SegmentState\x12\x0f\n\x07nodeIds\x18\n \x03(\x03\"p\n\x1aGetQuerySegmentInfoRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0e\n\x06\x64\x62Name\x18\x02 \x01(\t\x12\x16\n\x0e\x63ollectionName\x18\x03 \x01(\t\"\x80\x01\n\x1bGetQuerySegmentInfoResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x34\n\x05infos\x18\x02 \x03(\x0b\x32%.milvus.proto.milvus.QuerySegmentInfo\"$\n\x0c\x44ummyRequest\x12\x14\n\x0crequest_type\x18\x01 \x01(\t\"!\n\rDummyResponse\x12\x10\n\x08response\x18\x01 \x01(\t\"\x15\n\x13RegisterLinkRequest\"r\n\x14RegisterLinkResponse\x12-\n\x07\x61\x64\x64ress\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.Address\x12+\n\x06status\x18\x02 \x01(\x0b\x32\x1b.milvus.proto.common.Status\"P\n\x11GetMetricsRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x0f\n\x07request\x18\x02 \x01(\t\"k\n\x12GetMetricsResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x10\n\x08response\x18\x02 \x01(\t\x12\x16\n\x0e\x63omponent_name\x18\x03 \x01(\t\"\x98\x01\n\rComponentInfo\x12\x0e\n\x06nodeID\x18\x01 \x01(\x03\x12\x0c\n\x04role\x18\x02 \x01(\t\x12\x32\n\nstate_code\x18\x03 \x01(\x0e\x32\x1e.milvus.proto.common.StateCode\x12\x35\n\nextra_info\x18\x04 \x03(\x0b\x32!.milvus.proto.common.KeyValuePair\"\xb2\x01\n\x0f\x43omponentStates\x12\x31\n\x05state\x18\x01 \x01(\x0b\x32\".milvus.proto.milvus.ComponentInfo\x12?\n\x13subcomponent_states\x18\x02 \x03(\x0b\x32\".milvus.proto.milvus.ComponentInfo\x12+\n\x06status\x18\x03 \x01(\x0b\x32\x1b.milvus.proto.common.Status\"\x1b\n\x19GetComponentStatesRequest\"\xa5\x01\n\x12LoadBalanceRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x12\n\nsrc_nodeID\x18\x02 \x01(\x03\x12\x13\n\x0b\x64st_nodeIDs\x18\x03 \x03(\x03\x12\x19\n\x11sealed_segmentIDs\x18\x04 \x03(\x03\x12\x16\n\x0e\x63ollectionName\x18\x05 \x01(\t:\x07\xca>\x04\x10\x11\x18\x05\"L\n\x17ManualCompactionRequest\x12\x14\n\x0c\x63ollectionID\x18\x01 \x01(\x03\x12\x12\n\ntimetravel\x18\x02 \x01(\x04:\x07\xca>\x04\x10\x07\x18\x01\"]\n\x18ManualCompactionResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x14\n\x0c\x63ompactionID\x18\x02 \x01(\x03\"1\n\x19GetCompactionStateRequest\x12\x14\n\x0c\x63ompactionID\x18\x01 \x01(\x03\"\xdd\x01\n\x1aGetCompactionStateResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x33\n\x05state\x18\x02 \x01(\x0e\x32$.milvus.proto.common.CompactionState\x12\x17\n\x0f\x65xecutingPlanNo\x18\x03 \x01(\x03\x12\x15\n\rtimeoutPlanNo\x18\x04 \x01(\x03\x12\x17\n\x0f\x63ompletedPlanNo\x18\x05 \x01(\x03\x12\x14\n\x0c\x66\x61iledPlanNo\x18\x06 \x01(\x03\"1\n\x19GetCompactionPlansRequest\x12\x14\n\x0c\x63ompactionID\x18\x01 \x01(\x03\"\xbc\x01\n\x1aGetCompactionPlansResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x33\n\x05state\x18\x02 \x01(\x0e\x32$.milvus.proto.common.CompactionState\x12<\n\nmergeInfos\x18\x03 \x03(\x0b\x32(.milvus.proto.milvus.CompactionMergeInfo\"6\n\x13\x43ompactionMergeInfo\x12\x0f\n\x07sources\x18\x01 \x03(\x03\x12\x0e\n\x06target\x18\x02 \x01(\x03\"*\n\x14GetFlushStateRequest\x12\x12\n\nsegmentIDs\x18\x01 \x03(\x03\"U\n\x15GetFlushStateResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x0f\n\x07\x66lushed\x18\x02 \x01(\x08\"\xb6\x01\n\rImportRequest\x12\x17\n\x0f\x63ollection_name\x18\x01 \x01(\t\x12\x16\n\x0epartition_name\x18\x02 \x01(\t\x12\x15\n\rchannel_names\x18\x03 \x03(\t\x12\x11\n\trow_based\x18\x04 \x01(\x08\x12\r\n\x05\x66iles\x18\x05 \x03(\t\x12\x32\n\x07options\x18\x06 \x03(\x0b\x32!.milvus.proto.common.KeyValuePair:\x07\xca>\x04\x10\x12\x18\x01\"L\n\x0eImportResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\r\n\x05tasks\x18\x02 \x03(\x03\"%\n\x15GetImportStateRequest\x12\x0c\n\x04task\x18\x01 \x01(\x03\"\x97\x02\n\x16GetImportStateResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12/\n\x05state\x18\x02 \x01(\x0e\x32 .milvus.proto.common.ImportState\x12\x11\n\trow_count\x18\x03 \x01(\x03\x12\x0f\n\x07id_list\x18\x04 \x03(\x03\x12\x30\n\x05infos\x18\x05 \x03(\x0b\x32!.milvus.proto.common.KeyValuePair\x12\n\n\x02id\x18\x06 \x01(\x03\x12\x15\n\rcollection_id\x18\x07 \x01(\x03\x12\x13\n\x0bsegment_ids\x18\x08 \x03(\x03\x12\x11\n\tcreate_ts\x18\t \x01(\x03\"@\n\x16ListImportTasksRequest\x12\x17\n\x0f\x63ollection_name\x18\x01 \x01(\t\x12\r\n\x05limit\x18\x02 \x01(\x03\"\x82\x01\n\x17ListImportTasksResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12:\n\x05tasks\x18\x02 \x03(\x0b\x32+.milvus.proto.milvus.GetImportStateResponse\"p\n\x12GetReplicasRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x14\n\x0c\x63ollectionID\x18\x02 \x01(\x03\x12\x18\n\x10with_shard_nodes\x18\x03 \x01(\x08\"v\n\x13GetReplicasResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x32\n\x08replicas\x18\x02 \x03(\x0b\x32 .milvus.proto.milvus.ReplicaInfo\"\x9a\x01\n\x0bReplicaInfo\x12\x11\n\treplicaID\x18\x01 \x01(\x03\x12\x14\n\x0c\x63ollectionID\x18\x02 \x01(\x03\x12\x15\n\rpartition_ids\x18\x03 \x03(\x03\x12\x39\n\x0eshard_replicas\x18\x04 \x03(\x0b\x32!.milvus.proto.milvus.ShardReplica\x12\x10\n\x08node_ids\x18\x05 \x03(\x03\"`\n\x0cShardReplica\x12\x10\n\x08leaderID\x18\x01 \x01(\x03\x12\x13\n\x0bleader_addr\x18\x02 \x01(\t\x12\x17\n\x0f\x64m_channel_name\x18\x03 \x01(\t\x12\x10\n\x08node_ids\x18\x04 \x03(\x03\"\xbe\x01\n\x17\x43reateCredentialRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x10\n\x08username\x18\x02 \x01(\t\x12\x10\n\x08password\x18\x03 \x01(\t\x12\x1e\n\x16\x63reated_utc_timestamps\x18\x04 \x01(\x04\x12\x1f\n\x17modified_utc_timestamps\x18\x05 \x01(\x04:\x12\xca>\x0f\x08\x01\x10\x13\x18\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\"\xcd\x01\n\x17UpdateCredentialRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x10\n\x08username\x18\x02 \x01(\t\x12\x13\n\x0boldPassword\x18\x03 \x01(\t\x12\x13\n\x0bnewPassword\x18\x04 \x01(\t\x12\x1e\n\x16\x63reated_utc_timestamps\x18\x05 \x01(\x04\x12\x1f\n\x17modified_utc_timestamps\x18\x06 \x01(\x04:\t\xca>\x06\x08\x02\x10\x14\x18\x02\"k\n\x17\x44\x65leteCredentialRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x10\n\x08username\x18\x02 \x01(\t:\x12\xca>\x0f\x08\x01\x10\x15\x18\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\"W\n\x15ListCredUsersResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x11\n\tusernames\x18\x02 \x03(\t\"V\n\x14ListCredUsersRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase:\x12\xca>\x0f\x08\x01\x10\x16\x18\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\"\x1a\n\nRoleEntity\x12\x0c\n\x04name\x18\x01 \x01(\t\"\x1a\n\nUserEntity\x12\x0c\n\x04name\x18\x01 \x01(\t\"\x84\x01\n\x11\x43reateRoleRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12/\n\x06\x65ntity\x18\x02 \x01(\x0b\x32\x1f.milvus.proto.milvus.RoleEntity:\x12\xca>\x0f\x08\x01\x10\x13\x18\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\"d\n\x0f\x44ropRoleRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x11\n\trole_name\x18\x02 \x01(\t:\x12\xca>\x0f\x08\x01\x10\x15\x18\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\"\xb5\x01\n\x16OperateUserRoleRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x10\n\x08username\x18\x02 \x01(\t\x12\x11\n\trole_name\x18\x03 \x01(\t\x12\x36\n\x04type\x18\x04 \x01(\x0e\x32(.milvus.proto.milvus.OperateUserRoleType:\x12\xca>\x0f\x08\x01\x10\x17\x18\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\"\x9d\x01\n\x11SelectRoleRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12-\n\x04role\x18\x02 \x01(\x0b\x32\x1f.milvus.proto.milvus.RoleEntity\x12\x19\n\x11include_user_info\x18\x03 \x01(\x08:\x12\xca>\x0f\x08\x01\x10\x16\x18\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\"k\n\nRoleResult\x12-\n\x04role\x18\x01 \x01(\x0b\x32\x1f.milvus.proto.milvus.RoleEntity\x12.\n\x05users\x18\x02 \x03(\x0b\x32\x1f.milvus.proto.milvus.UserEntity\"s\n\x12SelectRoleResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x30\n\x07results\x18\x02 \x03(\x0b\x32\x1f.milvus.proto.milvus.RoleResult\"\x94\x01\n\x11SelectUserRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12-\n\x04user\x18\x02 \x01(\x0b\x32\x1f.milvus.proto.milvus.UserEntity\x12\x19\n\x11include_role_info\x18\x03 \x01(\x08:\t\xca>\x06\x08\x02\x10\x18\x18\x02\"k\n\nUserResult\x12-\n\x04user\x18\x01 \x01(\x0b\x32\x1f.milvus.proto.milvus.UserEntity\x12.\n\x05roles\x18\x02 \x03(\x0b\x32\x1f.milvus.proto.milvus.RoleEntity\"s\n\x12SelectUserResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x30\n\x07results\x18\x02 \x03(\x0b\x32\x1f.milvus.proto.milvus.UserResult\"\x1c\n\x0cObjectEntity\x12\x0c\n\x04name\x18\x01 \x01(\t\"\x1f\n\x0fPrivilegeEntity\x12\x0c\n\x04name\x18\x01 \x01(\t\"w\n\rGrantorEntity\x12-\n\x04user\x18\x01 \x01(\x0b\x32\x1f.milvus.proto.milvus.UserEntity\x12\x37\n\tprivilege\x18\x02 \x01(\x0b\x32$.milvus.proto.milvus.PrivilegeEntity\"L\n\x14GrantPrivilegeEntity\x12\x34\n\x08\x65ntities\x18\x01 \x03(\x0b\x32\".milvus.proto.milvus.GrantorEntity\"\xb9\x01\n\x0bGrantEntity\x12-\n\x04role\x18\x01 \x01(\x0b\x32\x1f.milvus.proto.milvus.RoleEntity\x12\x31\n\x06object\x18\x02 \x01(\x0b\x32!.milvus.proto.milvus.ObjectEntity\x12\x13\n\x0bobject_name\x18\x03 \x01(\t\x12\x33\n\x07grantor\x18\x04 \x01(\x0b\x32\".milvus.proto.milvus.GrantorEntity\"\x86\x01\n\x12SelectGrantRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x30\n\x06\x65ntity\x18\x02 \x01(\x0b\x32 .milvus.proto.milvus.GrantEntity:\x12\xca>\x0f\x08\x01\x10\x16\x18\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\"v\n\x13SelectGrantResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x32\n\x08\x65ntities\x18\x02 \x03(\x0b\x32 .milvus.proto.milvus.GrantEntity\"\xc4\x01\n\x17OperatePrivilegeRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x30\n\x06\x65ntity\x18\x02 \x01(\x0b\x32 .milvus.proto.milvus.GrantEntity\x12\x37\n\x04type\x18\x03 \x01(\x0e\x32).milvus.proto.milvus.OperatePrivilegeType:\x12\xca>\x0f\x08\x01\x10\x17\x18\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\"y\n\x19GetLoadingProgressRequest\x12*\n\x04\x62\x61se\x18\x01 \x01(\x0b\x32\x1c.milvus.proto.common.MsgBase\x12\x17\n\x0f\x63ollection_name\x18\x02 \x01(\t\x12\x17\n\x0fpartition_names\x18\x03 \x03(\t\"[\n\x1aGetLoadingProgressResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x10\n\x08progress\x18\x02 \x01(\x03\"\x1c\n\tMilvusExt\x12\x0f\n\x07version\x18\x01 \x01(\t\"\x13\n\x11GetVersionRequest\"R\n\x12GetVersionResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x0f\n\x07version\x18\x02 \x01(\t\"\x14\n\x12\x43heckHealthRequest\"f\n\x13\x43heckHealthResponse\x12+\n\x06status\x18\x01 \x01(\x0b\x32\x1b.milvus.proto.common.Status\x12\x11\n\tisHealthy\x18\x02 \x01(\x08\x12\x0f\n\x07reasons\x18\x03 \x03(\t*!\n\x08ShowType\x12\x07\n\x03\x41ll\x10\x00\x12\x0c\n\x08InMemory\x10\x01*@\n\x13OperateUserRoleType\x12\x11\n\rAddUserToRole\x10\x00\x12\x16\n\x12RemoveUserFromRole\x10\x01*-\n\x14OperatePrivilegeType\x12\t\n\x05Grant\x10\x00\x12\n\n\x06Revoke\x10\x01\x32\xbf.\n\rMilvusService\x12_\n\x10\x43reateCollection\x12,.milvus.proto.milvus.CreateCollectionRequest\x1a\x1b.milvus.proto.common.Status\"\x00\x12[\n\x0e\x44ropCollection\x12*.milvus.proto.milvus.DropCollectionRequest\x1a\x1b.milvus.proto.common.Status\"\x00\x12_\n\rHasCollection\x12).milvus.proto.milvus.HasCollectionRequest\x1a!.milvus.proto.milvus.BoolResponse\"\x00\x12[\n\x0eLoadCollection\x12*.milvus.proto.milvus.LoadCollectionRequest\x1a\x1b.milvus.proto.common.Status\"\x00\x12\x61\n\x11ReleaseCollection\x12-.milvus.proto.milvus.ReleaseCollectionRequest\x1a\x1b.milvus.proto.common.Status\"\x00\x12w\n\x12\x44\x65scribeCollection\x12..milvus.proto.milvus.DescribeCollectionRequest\x1a/.milvus.proto.milvus.DescribeCollectionResponse\"\x00\x12\x86\x01\n\x17GetCollectionStatistics\x12\x33.milvus.proto.milvus.GetCollectionStatisticsRequest\x1a\x34.milvus.proto.milvus.GetCollectionStatisticsResponse\"\x00\x12n\n\x0fShowCollections\x12+.milvus.proto.milvus.ShowCollectionsRequest\x1a,.milvus.proto.milvus.ShowCollectionsResponse\"\x00\x12]\n\x0f\x41lterCollection\x12+.milvus.proto.milvus.AlterCollectionRequest\x1a\x1b.milvus.proto.common.Status\"\x00\x12]\n\x0f\x43reatePartition\x12+.milvus.proto.milvus.CreatePartitionRequest\x1a\x1b.milvus.proto.common.Status\"\x00\x12Y\n\rDropPartition\x12).milvus.proto.milvus.DropPartitionRequest\x1a\x1b.milvus.proto.common.Status\"\x00\x12]\n\x0cHasPartition\x12(.milvus.proto.milvus.HasPartitionRequest\x1a!.milvus.proto.milvus.BoolResponse\"\x00\x12[\n\x0eLoadPartitions\x12*.milvus.proto.milvus.LoadPartitionsRequest\x1a\x1b.milvus.proto.common.Status\"\x00\x12\x61\n\x11ReleasePartitions\x12-.milvus.proto.milvus.ReleasePartitionsRequest\x1a\x1b.milvus.proto.common.Status\"\x00\x12\x83\x01\n\x16GetPartitionStatistics\x12\x32.milvus.proto.milvus.GetPartitionStatisticsRequest\x1a\x33.milvus.proto.milvus.GetPartitionStatisticsResponse\"\x00\x12k\n\x0eShowPartitions\x12*.milvus.proto.milvus.ShowPartitionsRequest\x1a+.milvus.proto.milvus.ShowPartitionsResponse\"\x00\x12w\n\x12GetLoadingProgress\x12..milvus.proto.milvus.GetLoadingProgressRequest\x1a/.milvus.proto.milvus.GetLoadingProgressResponse\"\x00\x12U\n\x0b\x43reateAlias\x12\'.milvus.proto.milvus.CreateAliasRequest\x1a\x1b.milvus.proto.common.Status\"\x00\x12Q\n\tDropAlias\x12%.milvus.proto.milvus.DropAliasRequest\x1a\x1b.milvus.proto.common.Status\"\x00\x12S\n\nAlterAlias\x12&.milvus.proto.milvus.AlterAliasRequest\x1a\x1b.milvus.proto.common.Status\"\x00\x12U\n\x0b\x43reateIndex\x12\'.milvus.proto.milvus.CreateIndexRequest\x1a\x1b.milvus.proto.common.Status\"\x00\x12h\n\rDescribeIndex\x12).milvus.proto.milvus.DescribeIndexRequest\x1a*.milvus.proto.milvus.DescribeIndexResponse\"\x00\x12h\n\rGetIndexState\x12).milvus.proto.milvus.GetIndexStateRequest\x1a*.milvus.proto.milvus.GetIndexStateResponse\"\x00\x12\x80\x01\n\x15GetIndexBuildProgress\x12\x31.milvus.proto.milvus.GetIndexBuildProgressRequest\x1a\x32.milvus.proto.milvus.GetIndexBuildProgressResponse\"\x00\x12Q\n\tDropIndex\x12%.milvus.proto.milvus.DropIndexRequest\x1a\x1b.milvus.proto.common.Status\"\x00\x12S\n\x06Insert\x12\".milvus.proto.milvus.InsertRequest\x1a#.milvus.proto.milvus.MutationResult\"\x00\x12S\n\x06\x44\x65lete\x12\".milvus.proto.milvus.DeleteRequest\x1a#.milvus.proto.milvus.MutationResult\"\x00\x12R\n\x06Search\x12\".milvus.proto.milvus.SearchRequest\x1a\".milvus.proto.milvus.SearchResults\"\x00\x12P\n\x05\x46lush\x12!.milvus.proto.milvus.FlushRequest\x1a\".milvus.proto.milvus.FlushResponse\"\x00\x12O\n\x05Query\x12!.milvus.proto.milvus.QueryRequest\x1a!.milvus.proto.milvus.QueryResults\"\x00\x12\x64\n\x0c\x43\x61lcDistance\x12(.milvus.proto.milvus.CalcDistanceRequest\x1a(.milvus.proto.milvus.CalcDistanceResults\"\x00\x12h\n\rGetFlushState\x12).milvus.proto.milvus.GetFlushStateRequest\x1a*.milvus.proto.milvus.GetFlushStateResponse\"\x00\x12\x89\x01\n\x18GetPersistentSegmentInfo\x12\x34.milvus.proto.milvus.GetPersistentSegmentInfoRequest\x1a\x35.milvus.proto.milvus.GetPersistentSegmentInfoResponse\"\x00\x12z\n\x13GetQuerySegmentInfo\x12/.milvus.proto.milvus.GetQuerySegmentInfoRequest\x1a\x30.milvus.proto.milvus.GetQuerySegmentInfoResponse\"\x00\x12\x62\n\x0bGetReplicas\x12\'.milvus.proto.milvus.GetReplicasRequest\x1a(.milvus.proto.milvus.GetReplicasResponse\"\x00\x12P\n\x05\x44ummy\x12!.milvus.proto.milvus.DummyRequest\x1a\".milvus.proto.milvus.DummyResponse\"\x00\x12\x65\n\x0cRegisterLink\x12(.milvus.proto.milvus.RegisterLinkRequest\x1a).milvus.proto.milvus.RegisterLinkResponse\"\x00\x12_\n\nGetMetrics\x12&.milvus.proto.milvus.GetMetricsRequest\x1a\'.milvus.proto.milvus.GetMetricsResponse\"\x00\x12l\n\x12GetComponentStates\x12..milvus.proto.milvus.GetComponentStatesRequest\x1a$.milvus.proto.milvus.ComponentStates\"\x00\x12U\n\x0bLoadBalance\x12\'.milvus.proto.milvus.LoadBalanceRequest\x1a\x1b.milvus.proto.common.Status\"\x00\x12w\n\x12GetCompactionState\x12..milvus.proto.milvus.GetCompactionStateRequest\x1a/.milvus.proto.milvus.GetCompactionStateResponse\"\x00\x12q\n\x10ManualCompaction\x12,.milvus.proto.milvus.ManualCompactionRequest\x1a-.milvus.proto.milvus.ManualCompactionResponse\"\x00\x12\x80\x01\n\x1bGetCompactionStateWithPlans\x12..milvus.proto.milvus.GetCompactionPlansRequest\x1a/.milvus.proto.milvus.GetCompactionPlansResponse\"\x00\x12S\n\x06Import\x12\".milvus.proto.milvus.ImportRequest\x1a#.milvus.proto.milvus.ImportResponse\"\x00\x12k\n\x0eGetImportState\x12*.milvus.proto.milvus.GetImportStateRequest\x1a+.milvus.proto.milvus.GetImportStateResponse\"\x00\x12n\n\x0fListImportTasks\x12+.milvus.proto.milvus.ListImportTasksRequest\x1a,.milvus.proto.milvus.ListImportTasksResponse\"\x00\x12_\n\x10\x43reateCredential\x12,.milvus.proto.milvus.CreateCredentialRequest\x1a\x1b.milvus.proto.common.Status\"\x00\x12_\n\x10UpdateCredential\x12,.milvus.proto.milvus.UpdateCredentialRequest\x1a\x1b.milvus.proto.common.Status\"\x00\x12_\n\x10\x44\x65leteCredential\x12,.milvus.proto.milvus.DeleteCredentialRequest\x1a\x1b.milvus.proto.common.Status\"\x00\x12h\n\rListCredUsers\x12).milvus.proto.milvus.ListCredUsersRequest\x1a*.milvus.proto.milvus.ListCredUsersResponse\"\x00\x12S\n\nCreateRole\x12&.milvus.proto.milvus.CreateRoleRequest\x1a\x1b.milvus.proto.common.Status\"\x00\x12O\n\x08\x44ropRole\x12$.milvus.proto.milvus.DropRoleRequest\x1a\x1b.milvus.proto.common.Status\"\x00\x12]\n\x0fOperateUserRole\x12+.milvus.proto.milvus.OperateUserRoleRequest\x1a\x1b.milvus.proto.common.Status\"\x00\x12_\n\nSelectRole\x12&.milvus.proto.milvus.SelectRoleRequest\x1a\'.milvus.proto.milvus.SelectRoleResponse\"\x00\x12_\n\nSelectUser\x12&.milvus.proto.milvus.SelectUserRequest\x1a\'.milvus.proto.milvus.SelectUserResponse\"\x00\x12_\n\x10OperatePrivilege\x12,.milvus.proto.milvus.OperatePrivilegeRequest\x1a\x1b.milvus.proto.common.Status\"\x00\x12\x62\n\x0bSelectGrant\x12\'.milvus.proto.milvus.SelectGrantRequest\x1a(.milvus.proto.milvus.SelectGrantResponse\"\x00\x12_\n\nGetVersion\x12&.milvus.proto.milvus.GetVersionRequest\x1a\'.milvus.proto.milvus.GetVersionResponse\"\x00\x12\x62\n\x0b\x43heckHealth\x12\'.milvus.proto.milvus.CheckHealthRequest\x1a(.milvus.proto.milvus.CheckHealthResponse\"\x00\x32u\n\x0cProxyService\x12\x65\n\x0cRegisterLink\x12(.milvus.proto.milvus.RegisterLinkRequest\x1a).milvus.proto.milvus.RegisterLinkResponse\"\x00:U\n\x0emilvus_ext_obj\x12\x1c.google.protobuf.FileOptions\x18\xe9\x07 \x01(\x0b\x32\x1e.milvus.proto.milvus.MilvusExtBU\n\x0eio.milvus.grpcB\x0bMilvusProtoP\x01Z1github.com/milvus-io/milvus-proto/go-api/milvuspb\xa0\x01\x01\x62\x06proto3') _SHOWTYPE = DESCRIPTOR.enum_types_by_name['ShowType'] ShowType = enum_type_wrapper.EnumTypeWrapper(_SHOWTYPE) @@ -36,8 +36,6 @@ MILVUS_EXT_OBJ_FIELD_NUMBER = 1001 milvus_ext_obj = DESCRIPTOR.extensions_by_name['milvus_ext_obj'] -_CHECKHEALTHREQUEST = DESCRIPTOR.message_types_by_name['CheckHealthRequest'] -_CHECKHEALTHRESPONSE = DESCRIPTOR.message_types_by_name['CheckHealthResponse'] _CREATEALIASREQUEST = DESCRIPTOR.message_types_by_name['CreateAliasRequest'] _DROPALIASREQUEST = DESCRIPTOR.message_types_by_name['DropAliasRequest'] _ALTERALIASREQUEST = DESCRIPTOR.message_types_by_name['AlterAliasRequest'] @@ -160,20 +158,8 @@ _MILVUSEXT = DESCRIPTOR.message_types_by_name['MilvusExt'] _GETVERSIONREQUEST = DESCRIPTOR.message_types_by_name['GetVersionRequest'] _GETVERSIONRESPONSE = DESCRIPTOR.message_types_by_name['GetVersionResponse'] -CheckHealthRequest = _reflection.GeneratedProtocolMessageType('CheckHealthRequest', (_message.Message,), { - 'DESCRIPTOR' : _CHECKHEALTHREQUEST, - '__module__' : 'milvus_pb2' - # @@protoc_insertion_point(class_scope:milvus.proto.milvus.CheckHealthRequest) - }) -_sym_db.RegisterMessage(CheckHealthRequest) - -CheckHealthResponse = _reflection.GeneratedProtocolMessageType('CheckHealthResponse', (_message.Message,), { - 'DESCRIPTOR' : _CHECKHEALTHRESPONSE, - '__module__' : 'milvus_pb2' - # @@protoc_insertion_point(class_scope:milvus.proto.milvus.CheckHealthResponse) - }) -_sym_db.RegisterMessage(CheckHealthResponse) - +_CHECKHEALTHREQUEST = DESCRIPTOR.message_types_by_name['CheckHealthRequest'] +_CHECKHEALTHRESPONSE = DESCRIPTOR.message_types_by_name['CheckHealthResponse'] CreateAliasRequest = _reflection.GeneratedProtocolMessageType('CreateAliasRequest', (_message.Message,), { 'DESCRIPTOR' : _CREATEALIASREQUEST, '__module__' : 'milvus_pb2' @@ -1031,6 +1017,20 @@ }) _sym_db.RegisterMessage(GetVersionResponse) +CheckHealthRequest = _reflection.GeneratedProtocolMessageType('CheckHealthRequest', (_message.Message,), { + 'DESCRIPTOR' : _CHECKHEALTHREQUEST, + '__module__' : 'milvus_pb2' + # @@protoc_insertion_point(class_scope:milvus.proto.milvus.CheckHealthRequest) + }) +_sym_db.RegisterMessage(CheckHealthRequest) + +CheckHealthResponse = _reflection.GeneratedProtocolMessageType('CheckHealthResponse', (_message.Message,), { + 'DESCRIPTOR' : _CHECKHEALTHRESPONSE, + '__module__' : 'milvus_pb2' + # @@protoc_insertion_point(class_scope:milvus.proto.milvus.CheckHealthResponse) + }) +_sym_db.RegisterMessage(CheckHealthResponse) + _MILVUSSERVICE = DESCRIPTOR.services_by_name['MilvusService'] _PROXYSERVICE = DESCRIPTOR.services_by_name['ProxyService'] if _descriptor._USE_C_DESCRIPTORS == False: @@ -1110,262 +1110,262 @@ _SELECTGRANTREQUEST._serialized_options = b'\312>\017\010\001\020\026\030\377\377\377\377\377\377\377\377\377\001' _OPERATEPRIVILEGEREQUEST._options = None _OPERATEPRIVILEGEREQUEST._serialized_options = b'\312>\017\010\001\020\027\030\377\377\377\377\377\377\377\377\377\001' - _SHOWTYPE._serialized_start=16844 - _SHOWTYPE._serialized_end=16877 - _OPERATEUSERROLETYPE._serialized_start=16879 - _OPERATEUSERROLETYPE._serialized_end=16943 - _OPERATEPRIVILEGETYPE._serialized_start=16945 - _OPERATEPRIVILEGETYPE._serialized_end=16990 - _CHECKHEALTHREQUEST._serialized_start=99 - _CHECKHEALTHREQUEST._serialized_end=119 - _CHECKHEALTHRESPONSE._serialized_start=121 - _CHECKHEALTHRESPONSE._serialized_end=178 - _CREATEALIASREQUEST._serialized_start=180 - _CREATEALIASREQUEST._serialized_end=301 - _DROPALIASREQUEST._serialized_start=303 - _DROPALIASREQUEST._serialized_end=397 - _ALTERALIASREQUEST._serialized_start=399 - _ALTERALIASREQUEST._serialized_end=519 - _CREATECOLLECTIONREQUEST._serialized_start=522 - _CREATECOLLECTIONREQUEST._serialized_end=810 - _DROPCOLLECTIONREQUEST._serialized_start=813 - _DROPCOLLECTIONREQUEST._serialized_end=942 - _ALTERCOLLECTIONREQUEST._serialized_start=945 - _ALTERCOLLECTIONREQUEST._serialized_end=1152 - _HASCOLLECTIONREQUEST._serialized_start=1155 - _HASCOLLECTIONREQUEST._serialized_end=1283 - _BOOLRESPONSE._serialized_start=1285 - _BOOLRESPONSE._serialized_end=1359 - _STRINGRESPONSE._serialized_start=1361 - _STRINGRESPONSE._serialized_end=1437 - _DESCRIBECOLLECTIONREQUEST._serialized_start=1440 - _DESCRIBECOLLECTIONREQUEST._serialized_end=1615 - _DESCRIBECOLLECTIONRESPONSE._serialized_start=1618 - _DESCRIBECOLLECTIONRESPONSE._serialized_end=2131 - _LOADCOLLECTIONREQUEST._serialized_start=2134 - _LOADCOLLECTIONREQUEST._serialized_end=2276 - _RELEASECOLLECTIONREQUEST._serialized_start=2278 - _RELEASECOLLECTIONREQUEST._serialized_end=2399 - _GETSTATISTICSREQUEST._serialized_start=2402 - _GETSTATISTICSREQUEST._serialized_end=2573 - _GETSTATISTICSRESPONSE._serialized_start=2575 - _GETSTATISTICSRESPONSE._serialized_end=2693 - _GETCOLLECTIONSTATISTICSREQUEST._serialized_start=2695 - _GETCOLLECTIONSTATISTICSREQUEST._serialized_end=2822 - _GETCOLLECTIONSTATISTICSRESPONSE._serialized_start=2825 - _GETCOLLECTIONSTATISTICSRESPONSE._serialized_end=2953 - _SHOWCOLLECTIONSREQUEST._serialized_start=2956 - _SHOWCOLLECTIONSREQUEST._serialized_end=3152 - _SHOWCOLLECTIONSRESPONSE._serialized_start=3155 - _SHOWCOLLECTIONSRESPONSE._serialized_end=3398 - _CREATEPARTITIONREQUEST._serialized_start=3401 - _CREATEPARTITIONREQUEST._serialized_end=3535 - _DROPPARTITIONREQUEST._serialized_start=3538 - _DROPPARTITIONREQUEST._serialized_end=3670 - _HASPARTITIONREQUEST._serialized_start=3673 - _HASPARTITIONREQUEST._serialized_end=3804 - _LOADPARTITIONSREQUEST._serialized_start=3807 - _LOADPARTITIONSREQUEST._serialized_end=3965 - _RELEASEPARTITIONSREQUEST._serialized_start=3968 - _RELEASEPARTITIONSREQUEST._serialized_end=4105 - _GETPARTITIONSTATISTICSREQUEST._serialized_start=4108 - _GETPARTITIONSTATISTICSREQUEST._serialized_end=4249 - _GETPARTITIONSTATISTICSRESPONSE._serialized_start=4251 - _GETPARTITIONSTATISTICSRESPONSE._serialized_end=4378 - _SHOWPARTITIONSREQUEST._serialized_start=4381 - _SHOWPARTITIONSREQUEST._serialized_end=4582 - _SHOWPARTITIONSRESPONSE._serialized_start=4585 - _SHOWPARTITIONSRESPONSE._serialized_end=4791 - _DESCRIBESEGMENTREQUEST._serialized_start=4793 - _DESCRIBESEGMENTREQUEST._serialized_end=4902 - _DESCRIBESEGMENTRESPONSE._serialized_start=4905 - _DESCRIBESEGMENTRESPONSE._serialized_end=5048 - _SHOWSEGMENTSREQUEST._serialized_start=5050 - _SHOWSEGMENTSREQUEST._serialized_end=5158 - _SHOWSEGMENTSRESPONSE._serialized_start=5160 - _SHOWSEGMENTSRESPONSE._serialized_end=5247 - _CREATEINDEXREQUEST._serialized_start=5250 - _CREATEINDEXREQUEST._serialized_end=5462 - _DESCRIBEINDEXREQUEST._serialized_start=5465 - _DESCRIBEINDEXREQUEST._serialized_end=5622 - _INDEXDESCRIPTION._serialized_start=5625 - _INDEXDESCRIPTION._serialized_end=5874 - _DESCRIBEINDEXRESPONSE._serialized_start=5877 - _DESCRIBEINDEXRESPONSE._serialized_end=6012 - _GETINDEXBUILDPROGRESSREQUEST._serialized_start=6015 - _GETINDEXBUILDPROGRESSREQUEST._serialized_end=6180 - _GETINDEXBUILDPROGRESSRESPONSE._serialized_start=6182 - _GETINDEXBUILDPROGRESSRESPONSE._serialized_end=6300 - _GETINDEXSTATEREQUEST._serialized_start=6303 - _GETINDEXSTATEREQUEST._serialized_end=6460 - _GETINDEXSTATERESPONSE._serialized_start=6463 - _GETINDEXSTATERESPONSE._serialized_end=6600 - _DROPINDEXREQUEST._serialized_start=6603 - _DROPINDEXREQUEST._serialized_end=6756 - _INSERTREQUEST._serialized_start=6759 - _INSERTREQUEST._serialized_end=6983 - _MUTATIONRESULT._serialized_start=6986 - _MUTATIONRESULT._serialized_end=7226 - _DELETEREQUEST._serialized_start=7229 - _DELETEREQUEST._serialized_end=7396 - _SEARCHREQUEST._serialized_start=7399 - _SEARCHREQUEST._serialized_end=7770 - _HITS._serialized_start=7772 - _HITS._serialized_end=7825 - _SEARCHRESULTS._serialized_start=7828 - _SEARCHRESULTS._serialized_end=7969 - _FLUSHREQUEST._serialized_start=7971 - _FLUSHREQUEST._serialized_end=8081 - _FLUSHRESPONSE._serialized_start=8084 - _FLUSHRESPONSE._serialized_end=8623 - _FLUSHRESPONSE_COLLSEGIDSENTRY._serialized_start=8400 - _FLUSHRESPONSE_COLLSEGIDSENTRY._serialized_end=8481 - _FLUSHRESPONSE_FLUSHCOLLSEGIDSENTRY._serialized_start=8483 - _FLUSHRESPONSE_FLUSHCOLLSEGIDSENTRY._serialized_end=8569 - _FLUSHRESPONSE_COLLSEALTIMESENTRY._serialized_start=8571 - _FLUSHRESPONSE_COLLSEALTIMESENTRY._serialized_end=8623 - _QUERYREQUEST._serialized_start=8626 - _QUERYREQUEST._serialized_end=8909 - _QUERYRESULTS._serialized_start=8912 - _QUERYRESULTS._serialized_end=9049 - _VECTORIDS._serialized_start=9051 - _VECTORIDS._serialized_end=9176 - _VECTORSARRAY._serialized_start=9179 - _VECTORSARRAY._serialized_end=9310 - _CALCDISTANCEREQUEST._serialized_start=9313 - _CALCDISTANCEREQUEST._serialized_end=9534 - _CALCDISTANCERESULTS._serialized_start=9537 - _CALCDISTANCERESULTS._serialized_end=9718 - _PERSISTENTSEGMENTINFO._serialized_start=9721 - _PERSISTENTSEGMENTINFO._serialized_end=9874 - _GETPERSISTENTSEGMENTINFOREQUEST._serialized_start=9876 - _GETPERSISTENTSEGMENTINFOREQUEST._serialized_end=9993 - _GETPERSISTENTSEGMENTINFORESPONSE._serialized_start=9996 - _GETPERSISTENTSEGMENTINFORESPONSE._serialized_end=10134 - _QUERYSEGMENTINFO._serialized_start=10137 - _QUERYSEGMENTINFO._serialized_end=10373 - _GETQUERYSEGMENTINFOREQUEST._serialized_start=10375 - _GETQUERYSEGMENTINFOREQUEST._serialized_end=10487 - _GETQUERYSEGMENTINFORESPONSE._serialized_start=10490 - _GETQUERYSEGMENTINFORESPONSE._serialized_end=10618 - _DUMMYREQUEST._serialized_start=10620 - _DUMMYREQUEST._serialized_end=10656 - _DUMMYRESPONSE._serialized_start=10658 - _DUMMYRESPONSE._serialized_end=10691 - _REGISTERLINKREQUEST._serialized_start=10693 - _REGISTERLINKREQUEST._serialized_end=10714 - _REGISTERLINKRESPONSE._serialized_start=10716 - _REGISTERLINKRESPONSE._serialized_end=10830 - _GETMETRICSREQUEST._serialized_start=10832 - _GETMETRICSREQUEST._serialized_end=10912 - _GETMETRICSRESPONSE._serialized_start=10914 - _GETMETRICSRESPONSE._serialized_end=11021 - _COMPONENTINFO._serialized_start=11024 - _COMPONENTINFO._serialized_end=11176 - _COMPONENTSTATES._serialized_start=11179 - _COMPONENTSTATES._serialized_end=11357 - _GETCOMPONENTSTATESREQUEST._serialized_start=11359 - _GETCOMPONENTSTATESREQUEST._serialized_end=11386 - _LOADBALANCEREQUEST._serialized_start=11389 - _LOADBALANCEREQUEST._serialized_end=11554 - _MANUALCOMPACTIONREQUEST._serialized_start=11556 - _MANUALCOMPACTIONREQUEST._serialized_end=11632 - _MANUALCOMPACTIONRESPONSE._serialized_start=11634 - _MANUALCOMPACTIONRESPONSE._serialized_end=11727 - _GETCOMPACTIONSTATEREQUEST._serialized_start=11729 - _GETCOMPACTIONSTATEREQUEST._serialized_end=11778 - _GETCOMPACTIONSTATERESPONSE._serialized_start=11781 - _GETCOMPACTIONSTATERESPONSE._serialized_end=12002 - _GETCOMPACTIONPLANSREQUEST._serialized_start=12004 - _GETCOMPACTIONPLANSREQUEST._serialized_end=12053 - _GETCOMPACTIONPLANSRESPONSE._serialized_start=12056 - _GETCOMPACTIONPLANSRESPONSE._serialized_end=12244 - _COMPACTIONMERGEINFO._serialized_start=12246 - _COMPACTIONMERGEINFO._serialized_end=12300 - _GETFLUSHSTATEREQUEST._serialized_start=12302 - _GETFLUSHSTATEREQUEST._serialized_end=12344 - _GETFLUSHSTATERESPONSE._serialized_start=12346 - _GETFLUSHSTATERESPONSE._serialized_end=12431 - _IMPORTREQUEST._serialized_start=12434 - _IMPORTREQUEST._serialized_end=12616 - _IMPORTRESPONSE._serialized_start=12618 - _IMPORTRESPONSE._serialized_end=12694 - _GETIMPORTSTATEREQUEST._serialized_start=12696 - _GETIMPORTSTATEREQUEST._serialized_end=12733 - _GETIMPORTSTATERESPONSE._serialized_start=12736 - _GETIMPORTSTATERESPONSE._serialized_end=13015 - _LISTIMPORTTASKSREQUEST._serialized_start=13017 - _LISTIMPORTTASKSREQUEST._serialized_end=13081 - _LISTIMPORTTASKSRESPONSE._serialized_start=13084 - _LISTIMPORTTASKSRESPONSE._serialized_end=13214 - _GETREPLICASREQUEST._serialized_start=13216 - _GETREPLICASREQUEST._serialized_end=13328 - _GETREPLICASRESPONSE._serialized_start=13330 - _GETREPLICASRESPONSE._serialized_end=13448 - _REPLICAINFO._serialized_start=13451 - _REPLICAINFO._serialized_end=13605 - _SHARDREPLICA._serialized_start=13607 - _SHARDREPLICA._serialized_end=13703 - _CREATECREDENTIALREQUEST._serialized_start=13706 - _CREATECREDENTIALREQUEST._serialized_end=13896 - _UPDATECREDENTIALREQUEST._serialized_start=13899 - _UPDATECREDENTIALREQUEST._serialized_end=14104 - _DELETECREDENTIALREQUEST._serialized_start=14106 - _DELETECREDENTIALREQUEST._serialized_end=14213 - _LISTCREDUSERSRESPONSE._serialized_start=14215 - _LISTCREDUSERSRESPONSE._serialized_end=14302 - _LISTCREDUSERSREQUEST._serialized_start=14304 - _LISTCREDUSERSREQUEST._serialized_end=14390 - _ROLEENTITY._serialized_start=14392 - _ROLEENTITY._serialized_end=14418 - _USERENTITY._serialized_start=14420 - _USERENTITY._serialized_end=14446 - _CREATEROLEREQUEST._serialized_start=14449 - _CREATEROLEREQUEST._serialized_end=14581 - _DROPROLEREQUEST._serialized_start=14583 - _DROPROLEREQUEST._serialized_end=14683 - _OPERATEUSERROLEREQUEST._serialized_start=14686 - _OPERATEUSERROLEREQUEST._serialized_end=14867 - _SELECTROLEREQUEST._serialized_start=14870 - _SELECTROLEREQUEST._serialized_end=15027 - _ROLERESULT._serialized_start=15029 - _ROLERESULT._serialized_end=15136 - _SELECTROLERESPONSE._serialized_start=15138 - _SELECTROLERESPONSE._serialized_end=15253 - _SELECTUSERREQUEST._serialized_start=15256 - _SELECTUSERREQUEST._serialized_end=15404 - _USERRESULT._serialized_start=15406 - _USERRESULT._serialized_end=15513 - _SELECTUSERRESPONSE._serialized_start=15515 - _SELECTUSERRESPONSE._serialized_end=15630 - _OBJECTENTITY._serialized_start=15632 - _OBJECTENTITY._serialized_end=15660 - _PRIVILEGEENTITY._serialized_start=15662 - _PRIVILEGEENTITY._serialized_end=15693 - _GRANTORENTITY._serialized_start=15695 - _GRANTORENTITY._serialized_end=15814 - _GRANTPRIVILEGEENTITY._serialized_start=15816 - _GRANTPRIVILEGEENTITY._serialized_end=15892 - _GRANTENTITY._serialized_start=15895 - _GRANTENTITY._serialized_end=16080 - _SELECTGRANTREQUEST._serialized_start=16083 - _SELECTGRANTREQUEST._serialized_end=16217 - _SELECTGRANTRESPONSE._serialized_start=16219 - _SELECTGRANTRESPONSE._serialized_end=16337 - _OPERATEPRIVILEGEREQUEST._serialized_start=16340 - _OPERATEPRIVILEGEREQUEST._serialized_end=16536 - _GETLOADINGPROGRESSREQUEST._serialized_start=16538 - _GETLOADINGPROGRESSREQUEST._serialized_end=16659 - _GETLOADINGPROGRESSRESPONSE._serialized_start=16661 - _GETLOADINGPROGRESSRESPONSE._serialized_end=16752 - _MILVUSEXT._serialized_start=16754 - _MILVUSEXT._serialized_end=16782 - _GETVERSIONREQUEST._serialized_start=16784 - _GETVERSIONREQUEST._serialized_end=16803 - _GETVERSIONRESPONSE._serialized_start=16805 - _GETVERSIONRESPONSE._serialized_end=16842 - _MILVUSSERVICE._serialized_start=16993 - _MILVUSSERVICE._serialized_end=22944 - _PROXYSERVICE._serialized_start=22946 - _PROXYSERVICE._serialized_end=23063 + _SHOWTYPE._serialized_start=16934 + _SHOWTYPE._serialized_end=16967 + _OPERATEUSERROLETYPE._serialized_start=16969 + _OPERATEUSERROLETYPE._serialized_end=17033 + _OPERATEPRIVILEGETYPE._serialized_start=17035 + _OPERATEPRIVILEGETYPE._serialized_end=17080 + _CREATEALIASREQUEST._serialized_start=99 + _CREATEALIASREQUEST._serialized_end=220 + _DROPALIASREQUEST._serialized_start=222 + _DROPALIASREQUEST._serialized_end=316 + _ALTERALIASREQUEST._serialized_start=318 + _ALTERALIASREQUEST._serialized_end=438 + _CREATECOLLECTIONREQUEST._serialized_start=441 + _CREATECOLLECTIONREQUEST._serialized_end=729 + _DROPCOLLECTIONREQUEST._serialized_start=732 + _DROPCOLLECTIONREQUEST._serialized_end=861 + _ALTERCOLLECTIONREQUEST._serialized_start=864 + _ALTERCOLLECTIONREQUEST._serialized_end=1071 + _HASCOLLECTIONREQUEST._serialized_start=1074 + _HASCOLLECTIONREQUEST._serialized_end=1202 + _BOOLRESPONSE._serialized_start=1204 + _BOOLRESPONSE._serialized_end=1278 + _STRINGRESPONSE._serialized_start=1280 + _STRINGRESPONSE._serialized_end=1356 + _DESCRIBECOLLECTIONREQUEST._serialized_start=1359 + _DESCRIBECOLLECTIONREQUEST._serialized_end=1534 + _DESCRIBECOLLECTIONRESPONSE._serialized_start=1537 + _DESCRIBECOLLECTIONRESPONSE._serialized_end=2050 + _LOADCOLLECTIONREQUEST._serialized_start=2053 + _LOADCOLLECTIONREQUEST._serialized_end=2195 + _RELEASECOLLECTIONREQUEST._serialized_start=2197 + _RELEASECOLLECTIONREQUEST._serialized_end=2318 + _GETSTATISTICSREQUEST._serialized_start=2321 + _GETSTATISTICSREQUEST._serialized_end=2492 + _GETSTATISTICSRESPONSE._serialized_start=2494 + _GETSTATISTICSRESPONSE._serialized_end=2612 + _GETCOLLECTIONSTATISTICSREQUEST._serialized_start=2614 + _GETCOLLECTIONSTATISTICSREQUEST._serialized_end=2741 + _GETCOLLECTIONSTATISTICSRESPONSE._serialized_start=2744 + _GETCOLLECTIONSTATISTICSRESPONSE._serialized_end=2872 + _SHOWCOLLECTIONSREQUEST._serialized_start=2875 + _SHOWCOLLECTIONSREQUEST._serialized_end=3071 + _SHOWCOLLECTIONSRESPONSE._serialized_start=3074 + _SHOWCOLLECTIONSRESPONSE._serialized_end=3317 + _CREATEPARTITIONREQUEST._serialized_start=3320 + _CREATEPARTITIONREQUEST._serialized_end=3454 + _DROPPARTITIONREQUEST._serialized_start=3457 + _DROPPARTITIONREQUEST._serialized_end=3589 + _HASPARTITIONREQUEST._serialized_start=3592 + _HASPARTITIONREQUEST._serialized_end=3723 + _LOADPARTITIONSREQUEST._serialized_start=3726 + _LOADPARTITIONSREQUEST._serialized_end=3884 + _RELEASEPARTITIONSREQUEST._serialized_start=3887 + _RELEASEPARTITIONSREQUEST._serialized_end=4024 + _GETPARTITIONSTATISTICSREQUEST._serialized_start=4027 + _GETPARTITIONSTATISTICSREQUEST._serialized_end=4168 + _GETPARTITIONSTATISTICSRESPONSE._serialized_start=4170 + _GETPARTITIONSTATISTICSRESPONSE._serialized_end=4297 + _SHOWPARTITIONSREQUEST._serialized_start=4300 + _SHOWPARTITIONSREQUEST._serialized_end=4501 + _SHOWPARTITIONSRESPONSE._serialized_start=4504 + _SHOWPARTITIONSRESPONSE._serialized_end=4710 + _DESCRIBESEGMENTREQUEST._serialized_start=4712 + _DESCRIBESEGMENTREQUEST._serialized_end=4821 + _DESCRIBESEGMENTRESPONSE._serialized_start=4824 + _DESCRIBESEGMENTRESPONSE._serialized_end=4967 + _SHOWSEGMENTSREQUEST._serialized_start=4969 + _SHOWSEGMENTSREQUEST._serialized_end=5077 + _SHOWSEGMENTSRESPONSE._serialized_start=5079 + _SHOWSEGMENTSRESPONSE._serialized_end=5166 + _CREATEINDEXREQUEST._serialized_start=5169 + _CREATEINDEXREQUEST._serialized_end=5381 + _DESCRIBEINDEXREQUEST._serialized_start=5384 + _DESCRIBEINDEXREQUEST._serialized_end=5541 + _INDEXDESCRIPTION._serialized_start=5544 + _INDEXDESCRIPTION._serialized_end=5793 + _DESCRIBEINDEXRESPONSE._serialized_start=5796 + _DESCRIBEINDEXRESPONSE._serialized_end=5931 + _GETINDEXBUILDPROGRESSREQUEST._serialized_start=5934 + _GETINDEXBUILDPROGRESSREQUEST._serialized_end=6099 + _GETINDEXBUILDPROGRESSRESPONSE._serialized_start=6101 + _GETINDEXBUILDPROGRESSRESPONSE._serialized_end=6219 + _GETINDEXSTATEREQUEST._serialized_start=6222 + _GETINDEXSTATEREQUEST._serialized_end=6379 + _GETINDEXSTATERESPONSE._serialized_start=6382 + _GETINDEXSTATERESPONSE._serialized_end=6519 + _DROPINDEXREQUEST._serialized_start=6522 + _DROPINDEXREQUEST._serialized_end=6675 + _INSERTREQUEST._serialized_start=6678 + _INSERTREQUEST._serialized_end=6902 + _MUTATIONRESULT._serialized_start=6905 + _MUTATIONRESULT._serialized_end=7145 + _DELETEREQUEST._serialized_start=7148 + _DELETEREQUEST._serialized_end=7315 + _SEARCHREQUEST._serialized_start=7318 + _SEARCHREQUEST._serialized_end=7689 + _HITS._serialized_start=7691 + _HITS._serialized_end=7744 + _SEARCHRESULTS._serialized_start=7747 + _SEARCHRESULTS._serialized_end=7888 + _FLUSHREQUEST._serialized_start=7890 + _FLUSHREQUEST._serialized_end=8000 + _FLUSHRESPONSE._serialized_start=8003 + _FLUSHRESPONSE._serialized_end=8542 + _FLUSHRESPONSE_COLLSEGIDSENTRY._serialized_start=8319 + _FLUSHRESPONSE_COLLSEGIDSENTRY._serialized_end=8400 + _FLUSHRESPONSE_FLUSHCOLLSEGIDSENTRY._serialized_start=8402 + _FLUSHRESPONSE_FLUSHCOLLSEGIDSENTRY._serialized_end=8488 + _FLUSHRESPONSE_COLLSEALTIMESENTRY._serialized_start=8490 + _FLUSHRESPONSE_COLLSEALTIMESENTRY._serialized_end=8542 + _QUERYREQUEST._serialized_start=8545 + _QUERYREQUEST._serialized_end=8828 + _QUERYRESULTS._serialized_start=8831 + _QUERYRESULTS._serialized_end=8968 + _VECTORIDS._serialized_start=8970 + _VECTORIDS._serialized_end=9095 + _VECTORSARRAY._serialized_start=9098 + _VECTORSARRAY._serialized_end=9229 + _CALCDISTANCEREQUEST._serialized_start=9232 + _CALCDISTANCEREQUEST._serialized_end=9453 + _CALCDISTANCERESULTS._serialized_start=9456 + _CALCDISTANCERESULTS._serialized_end=9637 + _PERSISTENTSEGMENTINFO._serialized_start=9640 + _PERSISTENTSEGMENTINFO._serialized_end=9793 + _GETPERSISTENTSEGMENTINFOREQUEST._serialized_start=9795 + _GETPERSISTENTSEGMENTINFOREQUEST._serialized_end=9912 + _GETPERSISTENTSEGMENTINFORESPONSE._serialized_start=9915 + _GETPERSISTENTSEGMENTINFORESPONSE._serialized_end=10053 + _QUERYSEGMENTINFO._serialized_start=10056 + _QUERYSEGMENTINFO._serialized_end=10292 + _GETQUERYSEGMENTINFOREQUEST._serialized_start=10294 + _GETQUERYSEGMENTINFOREQUEST._serialized_end=10406 + _GETQUERYSEGMENTINFORESPONSE._serialized_start=10409 + _GETQUERYSEGMENTINFORESPONSE._serialized_end=10537 + _DUMMYREQUEST._serialized_start=10539 + _DUMMYREQUEST._serialized_end=10575 + _DUMMYRESPONSE._serialized_start=10577 + _DUMMYRESPONSE._serialized_end=10610 + _REGISTERLINKREQUEST._serialized_start=10612 + _REGISTERLINKREQUEST._serialized_end=10633 + _REGISTERLINKRESPONSE._serialized_start=10635 + _REGISTERLINKRESPONSE._serialized_end=10749 + _GETMETRICSREQUEST._serialized_start=10751 + _GETMETRICSREQUEST._serialized_end=10831 + _GETMETRICSRESPONSE._serialized_start=10833 + _GETMETRICSRESPONSE._serialized_end=10940 + _COMPONENTINFO._serialized_start=10943 + _COMPONENTINFO._serialized_end=11095 + _COMPONENTSTATES._serialized_start=11098 + _COMPONENTSTATES._serialized_end=11276 + _GETCOMPONENTSTATESREQUEST._serialized_start=11278 + _GETCOMPONENTSTATESREQUEST._serialized_end=11305 + _LOADBALANCEREQUEST._serialized_start=11308 + _LOADBALANCEREQUEST._serialized_end=11473 + _MANUALCOMPACTIONREQUEST._serialized_start=11475 + _MANUALCOMPACTIONREQUEST._serialized_end=11551 + _MANUALCOMPACTIONRESPONSE._serialized_start=11553 + _MANUALCOMPACTIONRESPONSE._serialized_end=11646 + _GETCOMPACTIONSTATEREQUEST._serialized_start=11648 + _GETCOMPACTIONSTATEREQUEST._serialized_end=11697 + _GETCOMPACTIONSTATERESPONSE._serialized_start=11700 + _GETCOMPACTIONSTATERESPONSE._serialized_end=11921 + _GETCOMPACTIONPLANSREQUEST._serialized_start=11923 + _GETCOMPACTIONPLANSREQUEST._serialized_end=11972 + _GETCOMPACTIONPLANSRESPONSE._serialized_start=11975 + _GETCOMPACTIONPLANSRESPONSE._serialized_end=12163 + _COMPACTIONMERGEINFO._serialized_start=12165 + _COMPACTIONMERGEINFO._serialized_end=12219 + _GETFLUSHSTATEREQUEST._serialized_start=12221 + _GETFLUSHSTATEREQUEST._serialized_end=12263 + _GETFLUSHSTATERESPONSE._serialized_start=12265 + _GETFLUSHSTATERESPONSE._serialized_end=12350 + _IMPORTREQUEST._serialized_start=12353 + _IMPORTREQUEST._serialized_end=12535 + _IMPORTRESPONSE._serialized_start=12537 + _IMPORTRESPONSE._serialized_end=12613 + _GETIMPORTSTATEREQUEST._serialized_start=12615 + _GETIMPORTSTATEREQUEST._serialized_end=12652 + _GETIMPORTSTATERESPONSE._serialized_start=12655 + _GETIMPORTSTATERESPONSE._serialized_end=12934 + _LISTIMPORTTASKSREQUEST._serialized_start=12936 + _LISTIMPORTTASKSREQUEST._serialized_end=13000 + _LISTIMPORTTASKSRESPONSE._serialized_start=13003 + _LISTIMPORTTASKSRESPONSE._serialized_end=13133 + _GETREPLICASREQUEST._serialized_start=13135 + _GETREPLICASREQUEST._serialized_end=13247 + _GETREPLICASRESPONSE._serialized_start=13249 + _GETREPLICASRESPONSE._serialized_end=13367 + _REPLICAINFO._serialized_start=13370 + _REPLICAINFO._serialized_end=13524 + _SHARDREPLICA._serialized_start=13526 + _SHARDREPLICA._serialized_end=13622 + _CREATECREDENTIALREQUEST._serialized_start=13625 + _CREATECREDENTIALREQUEST._serialized_end=13815 + _UPDATECREDENTIALREQUEST._serialized_start=13818 + _UPDATECREDENTIALREQUEST._serialized_end=14023 + _DELETECREDENTIALREQUEST._serialized_start=14025 + _DELETECREDENTIALREQUEST._serialized_end=14132 + _LISTCREDUSERSRESPONSE._serialized_start=14134 + _LISTCREDUSERSRESPONSE._serialized_end=14221 + _LISTCREDUSERSREQUEST._serialized_start=14223 + _LISTCREDUSERSREQUEST._serialized_end=14309 + _ROLEENTITY._serialized_start=14311 + _ROLEENTITY._serialized_end=14337 + _USERENTITY._serialized_start=14339 + _USERENTITY._serialized_end=14365 + _CREATEROLEREQUEST._serialized_start=14368 + _CREATEROLEREQUEST._serialized_end=14500 + _DROPROLEREQUEST._serialized_start=14502 + _DROPROLEREQUEST._serialized_end=14602 + _OPERATEUSERROLEREQUEST._serialized_start=14605 + _OPERATEUSERROLEREQUEST._serialized_end=14786 + _SELECTROLEREQUEST._serialized_start=14789 + _SELECTROLEREQUEST._serialized_end=14946 + _ROLERESULT._serialized_start=14948 + _ROLERESULT._serialized_end=15055 + _SELECTROLERESPONSE._serialized_start=15057 + _SELECTROLERESPONSE._serialized_end=15172 + _SELECTUSERREQUEST._serialized_start=15175 + _SELECTUSERREQUEST._serialized_end=15323 + _USERRESULT._serialized_start=15325 + _USERRESULT._serialized_end=15432 + _SELECTUSERRESPONSE._serialized_start=15434 + _SELECTUSERRESPONSE._serialized_end=15549 + _OBJECTENTITY._serialized_start=15551 + _OBJECTENTITY._serialized_end=15579 + _PRIVILEGEENTITY._serialized_start=15581 + _PRIVILEGEENTITY._serialized_end=15612 + _GRANTORENTITY._serialized_start=15614 + _GRANTORENTITY._serialized_end=15733 + _GRANTPRIVILEGEENTITY._serialized_start=15735 + _GRANTPRIVILEGEENTITY._serialized_end=15811 + _GRANTENTITY._serialized_start=15814 + _GRANTENTITY._serialized_end=15999 + _SELECTGRANTREQUEST._serialized_start=16002 + _SELECTGRANTREQUEST._serialized_end=16136 + _SELECTGRANTRESPONSE._serialized_start=16138 + _SELECTGRANTRESPONSE._serialized_end=16256 + _OPERATEPRIVILEGEREQUEST._serialized_start=16259 + _OPERATEPRIVILEGEREQUEST._serialized_end=16455 + _GETLOADINGPROGRESSREQUEST._serialized_start=16457 + _GETLOADINGPROGRESSREQUEST._serialized_end=16578 + _GETLOADINGPROGRESSRESPONSE._serialized_start=16580 + _GETLOADINGPROGRESSRESPONSE._serialized_end=16671 + _MILVUSEXT._serialized_start=16673 + _MILVUSEXT._serialized_end=16701 + _GETVERSIONREQUEST._serialized_start=16703 + _GETVERSIONREQUEST._serialized_end=16722 + _GETVERSIONRESPONSE._serialized_start=16724 + _GETVERSIONRESPONSE._serialized_end=16806 + _CHECKHEALTHREQUEST._serialized_start=16808 + _CHECKHEALTHREQUEST._serialized_end=16828 + _CHECKHEALTHRESPONSE._serialized_start=16830 + _CHECKHEALTHRESPONSE._serialized_end=16932 + _MILVUSSERVICE._serialized_start=17083 + _MILVUSSERVICE._serialized_end=23034 + _PROXYSERVICE._serialized_start=23036 + _PROXYSERVICE._serialized_end=23153 # @@protoc_insertion_point(module_scope) diff --git a/pymilvus/orm/collection.py b/pymilvus/orm/collection.py index 21e8807cd..1fcad03af 100644 --- a/pymilvus/orm/collection.py +++ b/pymilvus/orm/collection.py @@ -41,62 +41,51 @@ from .future import SearchFuture, MutationFuture from .utility import _get_connection from .default_config import DefaultConfig -from ..client.types import CompactionState, CompactionPlans, Replica -from ..client.types import get_consistency_level, cmp_consistency_level +from ..client.types import CompactionState, CompactionPlans, Replica, get_consistency_level, cmp_consistency_level from ..client.constants import DEFAULT_CONSISTENCY_LEVEL from ..client.configs import DefaultConfigs class Collection: - """ This is a class corresponding to collection in milvus. """ + def __init__(self, name: str, schema: CollectionSchema=None, using: str="default", shards_num: int=2, **kwargs): + """ Constructs a collection by name, schema and other parameters. - def __init__(self, name, schema=None, using="default", shards_num=2, **kwargs): - """ - Constructs a collection by name, schema and other parameters. - Connection information is contained in kwargs. - - :param name: the name of collection - :type name: str + Args: + name (``str``): the name of collection + schema (``CollectionSchema``, optional): the schema of collection, defaults to None. + using (``str``, optional): Milvus connection alias name, defaults to 'default'. + shards_num (``int``, optional): how many shards will the insert data be divided, defaults to 2. + **kwargs (``dict``): - :param schema: the schema of collection - :type schema: class `schema.CollectionSchema` + * *consistency_level* (``int/ str``) + Which consistency level to use when searching in the collection. + Options of consistency level: Strong, Bounded, Eventually, Session, Customized. - :param using: Milvus link of create collection - :type using: str + Note: this parameter can be overwritten by the same parameter specified in search. - :param shards_num: How wide to scale collection. Corresponds to how many active datanodes - can be used on insert. - :type shards_num: int + * *properties* (``dict``, optional) + Collection properties. - :param kwargs: - * *consistency_level* (``str/int``) -- - Which consistency level to use when searching in the collection. For details, see - https://github.com/milvus-io/milvus/blob/master/docs/developer_guides/how-guarantee-ts-works.md. - Options of consistency level: Strong, Bounded, Eventually, Session, Customized. - Note: this parameter can be overwritten by the same parameter specified in search. + * *timeout* (``float``) + An optional duration of time in seconds to allow for the RPCs. + If timeout is not set, the client keeps waiting until the server responds or an error occurs. - * *properties* (``dictionary``) -- + Raises: + SchemaNotReadyException: if the schema is wrong. - :example: + Examples: >>> from pymilvus import connections, Collection, FieldSchema, CollectionSchema, DataType >>> connections.connect() - >>> fields = [ ... FieldSchema("film_id", DataType.INT64, is_primary=True), ... FieldSchema("films", dtype=DataType.FLOAT_VECTOR, dim=128) ... ] - >>> description="This is a new collection description." - >>> schema = CollectionSchema(fields=fields, description=description) - >>> collection = Collection(name="test_collection_init", schema=schema) + >>> schema = CollectionSchema(fields=fields) + >>> properties = {"collection.ttl.seconds": 1800} + >>> collection = Collection(name="test_collection_init", schema=schema, properties=properties) >>> collection.name 'test_collection_init' - >>> collection.description - 'This is a new collection description.' - >>> collection.is_empty - True - >>> collection.num_entities - 0 """ self._name = name self._using = using @@ -134,6 +123,9 @@ def __init__(self, name, schema=None, using="default", shards_num=2, **kwargs): else: raise SchemaNotReadyException(message=ExceptionsMessage.SchemaType) + self._schema_dict = self._schema.to_dict() + self._schema_dict["consistency_level"] = self._consistency_level + def __repr__(self): _dict = { 'name': self.name, @@ -204,22 +196,12 @@ def construct_from_dataframe(cls, name, dataframe, **kwargs): @property def schema(self) -> CollectionSchema: - """ - Returns the schema of the collection. - - :return schema.CollectionSchema: - Schema of the collection. - """ + """CollectionSchema: schema of the collection. """ return self._schema @property def aliases(self, **kwargs) -> list: - """ - Returns the aliases of the collection. - - :return list[str]: - Aliases of the collection. - """ + """List[str]: all the aliases of the collection. """ conn = self._get_connection() resp = conn.describe_collection(self._name, **kwargs) aliases = resp["aliases"] @@ -227,89 +209,24 @@ def aliases(self, **kwargs) -> list: @property def description(self) -> str: - """ - Returns a text description of the collection. - - :return str: - Collection description text, returned when the operation succeeds. - - :example: - >>> from pymilvus import connections, Collection, FieldSchema, CollectionSchema, DataType - >>> connections.connect() - >>> fields = [ - ... FieldSchema("film_id", DataType.INT64, is_primary=True), - ... FieldSchema("films", dtype=DataType.FLOAT_VECTOR, dim=128) - ... ] - >>> description="This is an example text description." - >>> schema = CollectionSchema(fields=fields, description=description) - >>> collection = Collection(name="test_collection_description", schema=schema) - >>> collection.description - 'This is an example text description.' - """ - + """str: a text description of the collection. """ return self._schema.description @property def name(self) -> str: - """ - Returns the collection name. - - :return str: - The collection name, returned when the operation succeeds. - - :example: - >>> from pymilvus import connections, Collection, FieldSchema, CollectionSchema, DataType - >>> connections.connect() - >>> fields = [ - ... FieldSchema("film_id", DataType.INT64, is_primary=True), - ... FieldSchema("films", dtype=DataType.FLOAT_VECTOR, dim=128) - ... ] - >>> schema = CollectionSchema(fields) - >>> collection = Collection("test_collection_name", schema) - >>> collection.name - 'test_collection_name' - """ + """str: the name of the collection. """ return self._name @property def is_empty(self) -> bool: - """ - Whether the collection is empty. - This method need to call `num_entities <#pymilvus.Collection.num_entities>`_. - - :return bool: - * True: The collection is empty. - * False: The collection is gfghnot empty. - - :example: - >>> from pymilvus import connections, Collection, FieldSchema, CollectionSchema, DataType - >>> connections.connect() - >>> schema = CollectionSchema([ - ... FieldSchema("film_id", DataType.INT64, is_primary=True), - ... FieldSchema("films", dtype=DataType.FLOAT_VECTOR, dim=2) - ... ]) - >>> collection = Collection("test_collection_is_empty", schema) - >>> collection.is_empty - True - >>> collection.insert([[1], [[1.0, 2.0]]]) - - >>> collection.is_empty - False - """ + """bool: whether the collection is empty or not.""" return self.num_entities == 0 - # read-only @property def num_entities(self, **kwargs) -> int: - """ - Returns the number of entities in the collection. - - :return int: - Number of entities in the collection. - - :raises CollectionNotExistException: If the collection does not exist. + """int: The number of entities in the collection, not real time. - :example: + Examples: >>> from pymilvus import connections, Collection, FieldSchema, CollectionSchema, DataType >>> connections.connect() >>> schema = CollectionSchema([ @@ -321,8 +238,11 @@ def num_entities(self, **kwargs) -> int: 0 >>> collection.insert([[1, 2], [[1.0, 2.0], [3.0, 4.0]]]) >>> collection.num_entities + 0 + >>> collection.flush() + >>> collection.num_entities 2 - """ + """ conn = self._get_connection() stats = conn.get_collection_stats(collection_name=self._name, **kwargs) result = {stat.key: stat.value for stat in stats} @@ -331,44 +251,42 @@ def num_entities(self, **kwargs) -> int: @property def primary_field(self) -> FieldSchema: - """ - Returns the primary field of the collection. + """FieldSchema: the primary field of the collection.""" + return self._schema.primary_field - :return schema.FieldSchema: - The primary field of the collection. + def flush(self, timeout=None, **kwargs): + """ Seal all segments in the collection. Inserts after flushing will be written into + new segments. Only sealed segments can be indexed. - :example: + Args: + timeout (float): an optional duration of time in seconds to allow for the RPCs. + If timeout is not set, the client keeps waiting until the server responds or an error occurs. + + Examples: >>> from pymilvus import connections, Collection, FieldSchema, CollectionSchema, DataType >>> connections.connect() - >>> schema = CollectionSchema([ + >>> fields = [ ... FieldSchema("film_id", DataType.INT64, is_primary=True), - ... FieldSchema("film_length", DataType.INT64, description="length in miniute"), - ... FieldSchema("films", dtype=DataType.FLOAT_VECTOR, dim=2) - ... ]) - >>> collection = Collection("test_collection_primary_field", schema) - >>> collection.primary_field.name - 'film_id' + ... FieldSchema("films", dtype=DataType.FLOAT_VECTOR, dim=128) + ... ] + >>> schema = CollectionSchema(fields=fields) + >>> collection = Collection(name="test_collection_flush", schema=schema) + >>> collection.insert([[1, 2], [[1.0, 2.0], [3.0, 4.0]]]) + >>> collection.flush() + >>> collection.num_entities + 2 """ - return self._schema.primary_field - - def flush(self, timeout=None, **kwargs): - """ Flush """ conn = self._get_connection() conn.flush([self.name], timeout=timeout, **kwargs) def drop(self, timeout=None, **kwargs): - """ - Drops the collection together with its index files. + """ Drops the collection. The same as `utility.drop_collection()` - :param timeout: - * *timeout* (``float``) -- - An optional duration of time in seconds to allow for the RPC. - If timeout is set to None, - the client keeps waiting until the server responds or an error occurs. - - :raises CollectionNotExistException: If the collection does not exist. + Args: + timeout (float, optional): an optional duration of time in seconds to allow for the RPCs. + If timeout is not set, the client keeps waiting until the server responds or an error occurs. - :example: + Examples: >>> from pymilvus import connections, Collection, FieldSchema, CollectionSchema, DataType >>> connections.connect() >>> schema = CollectionSchema([ @@ -386,27 +304,45 @@ def drop(self, timeout=None, **kwargs): conn.drop_collection(self._name, timeout=timeout, **kwargs) def set_properties(self, properties, timeout=None, **kwargs): + """ Set properties for the collection + + Args: + properties (``dict``): collection properties. + only support collection TTL with key `collection.ttl.seconds` + timeout (``float``, optional): an optional duration of time in seconds to allow for the RPCs. + If timeout is not set, the client keeps waiting until the server responds or an error occurs. + + Examples: + >>> from pymilvus import connections, Collection, FieldSchema, CollectionSchema, DataType + >>> connections.connect() + >>> fields = [ + ... FieldSchema("film_id", DataType.INT64, is_primary=True), + ... FieldSchema("films", dtype=DataType.FLOAT_VECTOR, dim=128) + ... ] + >>> schema = CollectionSchema(fields=fields) + >>> collection = Collection("test_set_properties", schema) + >>> collection.set_properties({"collection.ttl.seconds": 60}) + """ conn = self._get_connection() conn.alter_collection(self.name, properties=properties, timeout=timeout) def load(self, partition_names=None, replica_number=1, timeout=None, **kwargs): - """ Load the collection from disk to memory. + """ Load the data into memory. - :param partition_names: The specified partitions to load. - :type partition_names: list[str] - - :param timeout: An optional duration of time in seconds to allow for the RPC. If timeout - is set to None, the client keeps waiting until the server responds or error occurs. - :type timeout: float + Args: + partition_names (``List[str]``): The specified partitions to load. + replica_number (``int``, optional): The replica number to load, defaults to 1. + timeout (``float``, optional): an optional duration of time in seconds to allow for the RPCs. + If timeout is not set, the client keeps waiting until the server responds or an error occurs. + **kwargs (``dict``, optional): - :param kwargs: - * *_async* (``bool``) -- Indicate if invoke asynchronously. + * *_async*(``bool``) + Indicate if invoke asynchronously. - :raises CollectionNotExistException: If the collection does not exist. - :raises ParamError: If the parameters are invalid. - :raises BaseException: If the specified field, index or partition does not exist. + Raises: + MilvusException: If anything goes wrong. - :example: + Examples: >>> from pymilvus import connections, Collection, FieldSchema, CollectionSchema, DataType >>> connections.connect() >>> schema = CollectionSchema([ @@ -415,6 +351,7 @@ def load(self, partition_names=None, replica_number=1, timeout=None, **kwargs): ... ]) >>> collection = Collection("test_collection_load", schema) >>> collection.insert([[1, 2], [[1.0, 2.0], [3.0, 4.0]]]) + >>> collection.create_index("films", {"index_type": "FLAT", "metric_type": "L2", "params": {}}) >>> collection.load() """ conn = self._get_connection() @@ -424,18 +361,13 @@ def load(self, partition_names=None, replica_number=1, timeout=None, **kwargs): conn.load_collection(self._name, replica_number=replica_number, timeout=timeout, **kwargs) def release(self, timeout=None, **kwargs): - """ - Releases the collection from memory. + """ Releases the collection data from memory. - :param timeout: - * *timeout* (``float``) -- - An optional duration of time in seconds to allow for the RPC. If timeout - is set to None, the client keeps waiting until the server responds or an error occurs. - - :raises CollectionNotExistException: If collection does not exist. - :raises BaseException: If collection has not been loaded to memory. + Args: + timeout (``float``, optional): an optional duration of time in seconds to allow for the RPCs. + If timeout is not set, the client keeps waiting until the server responds or an error occurs. - :example: + Examples: >>> from pymilvus import connections, Collection, FieldSchema, CollectionSchema, DataType >>> connections.connect() >>> schema = CollectionSchema([ @@ -444,6 +376,7 @@ def release(self, timeout=None, **kwargs): ... ]) >>> collection = Collection("test_collection_release", schema) >>> collection.insert([[1, 2], [[1.0, 2.0], [3.0, 4.0]]]) + >>> collection.create_index("films", {"index_type": "FLAT", "metric_type": "L2", "params": {}}) >>> collection.load() >>> collection.release() """ @@ -454,19 +387,17 @@ def insert(self, data: [List, pandas.DataFrame], partition_name: str=None, timeo """ Insert data into the collection. Args: - data (list, tuple, pandas.DataFrame): The specified data to insert - partition_name (str): The partition name which the data will be inserted to, + data (``list/tuple/pandas.DataFrame``): The specified data to insert + partition_name (``str``): The partition name which the data will be inserted to, if partition name is not passed, then the data will be inserted to "_default" partition - timeout (float, optional): A duration of time in seconds to allow for the RPC. Defaults to None. + timeout (``float``, optional): A duration of time in seconds to allow for the RPC. Defaults to None. If timeout is set to None, the client keeps waiting until the server responds or an error occurs. Returns: MutationResult: contains 2 properties `insert_count`, and, `primary_keys` `insert_count`: how may entites have been inserted into Milvus, `primary_keys`: list of primary keys of the inserted entities Raises: - CollectionNotExistException: If the specified collection does not exist. - ParamError: If input parameters are invalid. - MilvusException: If the specified partition does not exist. + MilvusException: If anything goes wrong. Examples: >>> from pymilvus import connections, Collection, FieldSchema, CollectionSchema, DataType @@ -500,38 +431,30 @@ def insert(self, data: [List, pandas.DataFrame], partition_name: str=None, timeo return MutationResult(res) def delete(self, expr, partition_name=None, timeout=None, **kwargs): - """ - Delete entities with an expression condition. - And return results to show how many entities will be deleted. + """ Delete entities with an expression condition. - :param expr: The expression to specify entities to be deleted - :type expr: str - - :param partition_name: Name of partitions that contain entities - :type partition_name: str - - :param timeout: An optional duration of time in seconds to allow for the RPC. When timeout - is set to None, client waits until server response or error occur - :type timeout: float + Args: + expr (``str``): The specified data to insert. + partition_names (``List[str]``): Name of partitions to delete entities. + timeout (``float``, optional): A duration of time in seconds to allow for the RPC. Defaults to None. + If timeout is set to None, the client keeps waiting until the server responds or an error occurs. - :return: A MutationResult object contains a property named `delete_count` represents how many - entities will be deleted. - :rtype: MutationResult + Returns: + MutationResult: contains `delete_count` properties represents how many entities might be deleted. - :raises RpcError: If gRPC encounter an error - :raises ParamError: If parameters are invalid - :raises BaseException: If the return result from server is not ok + Raises: + MilvusException: If anything goes wrong. - :example: + Examples: >>> from pymilvus import connections, Collection, FieldSchema, CollectionSchema, DataType >>> import random >>> connections.connect() >>> schema = CollectionSchema([ ... FieldSchema("film_id", DataType.INT64, is_primary=True), ... FieldSchema("film_date", DataType.INT64), - ... FieldSchema("films", dtype=DataType.FLOAT_VECTOR, dim=2) + ... FieldSchema("films", dtype=DataType.FLOAT_VECTOR, dim=2), ... ]) - >>> collection = Collection("test_collection_query", schema) + >>> collection = Collection("test_collection_delete", schema) >>> # insert >>> data = [ ... [i for i in range(10)], @@ -539,11 +462,7 @@ def delete(self, expr, partition_name=None, timeout=None, **kwargs): ... [[random.random() for _ in range(2)] for _ in range(10)], ... ] >>> collection.insert(data) - >>> collection.num_entities - - >>> expr = "film_id in [ 0, 1 ]" - >>> res = collection.delete(expr) - >>> assert len(res) == 2 + >>> res = collection.delete("film_id in [ 0, 1 ]") >>> print(f"- Deleted entities: {res}") - Delete results: [0, 1] """ @@ -556,68 +475,104 @@ def delete(self, expr, partition_name=None, timeout=None, **kwargs): def search(self, data, anns_field, param, limit, expr=None, partition_names=None, output_fields=None, timeout=None, round_decimal=-1, **kwargs): - """ - Conducts a vector similarity search with an optional boolean expression as filter. - - :param data: The vectors of search data, the length of data is number of query (nq), the - dim of every vector in data must be equal to vector field's of collection. - :type data: list[list[float]] - :param anns_field: The vector field used to search of collection. - :type anns_field: str - :param param: The parameters of search, such as ``nprobe``. - :type param: dict - :param limit: The max number of returned record, also known as ``topk``. - :type limit: int - :param expr: The boolean expression used to filter attribute. - :type expr: str - :param partition_names: The names of partitions to search. - :type partition_names: list[str] - :param output_fields: The fields to return in the search result, not supported now. - :type output_fields: list[str] - :param timeout: An optional duration of time in seconds to allow for the RPC. When timeout - is set to None, client waits until server response or error occur. - :type timeout: float - :param round_decimal: The specified number of decimal places of returned distance - :type round_decimal: int - :param kwargs: - * *_async* (``bool``) -- - Indicate if invoke asynchronously. When value is true, method returns a - SearchFuture object; otherwise, method returns results from server directly. - * *_callback* (``function``) -- - The callback function which is invoked after server response successfully. - It functions only if _async is set to True. - * *consistency_level* (``str/int``) -- - Which consistency level to use when searching in the collection. See details in - https://github.com/milvus-io/milvus/blob/master/docs/developer_guides/how-guarantee-ts-works.md. - Options of consistency level: Strong, Bounded, Eventually, Session, Customized. - Note: this parameter will overwrite the same parameter specified when user created the collection, - if no consistency level was specified, search will use the consistency level when you create the - collection. - * *guarantee_timestamp* (``int``) -- - This function instructs Milvus to see all operations performed before a provided timestamp. If no - such timestamp is provided, then Milvus will search all operations performed to date. - Note: only used in Customized consistency level. - * *graceful_time* (``int``) -- - Only used in bounded consistency level. If graceful_time is set, PyMilvus will use current timestamp minus - the graceful_time as the `guarantee_timestamp`. This option is 5s by default if not set. - * *travel_timestamp* (``int``) -- - Users can specify a timestamp in a search to get results based on a data view - at a specified point in time. - - :return: SearchResult: SearchResult is iterable and is a 2d-array-like class, the first dimension is - the number of vectors to query (nq), the second dimension is the number of limit(topk). - :rtype: SearchResult - - :raises RpcError: If gRPC encounter an error. - :raises ParamError: If parameters are invalid. - :raises DataTypeNotMatchException: If wrong type of param is passed. - :raises BaseException: If the return result from server is not ok. - - :example: + """ Conducts a vector similarity search with an optional boolean expression as filter. + + Args: + data (``List[List[float]]``): The vectors of search data. + the length of data is number of query (nq), and the dim of every vector in data must be equal to + the vector field's of collection. + anns_field (``str``): The name of the vector field used to search of collection. + param (``dict[str, Any]``): + + The parameters of search. The followings are valid keys of param. + + * *nprobe*, *ef*, *search_k*, etc + Corresponding search params for a certain index. + + * *metric_type* (``str``) + similar metricy types, the value must be of type str. + + * *offset* (``int``, optional) + offset for pagination. + + * *limit* (``int``, optional) + limit for the search results and pagination. + + example for param:: + + { + "nprobe": 128, + "metric_type": "L2", + "offset": 10, + "limit": 10, + } + + limit (``int``): The max number of returned record, also known as `topk`. + expr (``str``): The boolean expression used to filter attribute. Default to None. + + example for expr:: + + "id_field >= 0", "id_field in [1, 2, 3, 4]" + + partition_names (``List[str]``, optional): The names of partitions to search on. Default to None. + output_fields (``List[str]``, optional): + The name of fields to return in the search result. Can only get scalar fields. + round_decimal (``int``, optional): The specified number of decimal places of returned distance. + Defaults to -1 means no round to returned distance. + timeout (``float``, optional): A duration of time in seconds to allow for the RPC. Defaults to None. + If timeout is set to None, the client keeps waiting until the server responds or an error occurs. + **kwargs (``dict``): Optional search params + + * *_async* (``bool``, optional) + Indicate if invoke asynchronously. + Returns a SearchFuture if True, else returns results from server directly. + + * *_callback* (``function``, optional) + The callback function which is invoked after server response successfully. + It functions only if _async is set to True. + + * *consistency_level* (``str/int``, optional) + Which consistency level to use when searching in the collection. + + Options of consistency level: Strong, Bounded, Eventually, Session, Customized. + + Note: this parameter will overwrite the same parameter specified when user created the collection, + if no consistency level was specified, search will use the consistency level when you create the + collection. + + * *guarantee_timestamp* (``int``, optional) + Instructs Milvus to see all operations performed before this timestamp. + By default Milvus will search all operations performed to date. + + Note: only valid in Customized consistency level. + + * *graceful_time* (``int``, optional) + Search will use the (current_timestamp - the graceful_time) as the + `guarantee_timestamp`. By default with 5s. + + Note: only valid in Bounded consistency level + + * *travel_timestamp* (``int``, optional) + A specific timestamp to get results based on a data view at. + + Returns: + SearchResult: + Returns ``SearchResult`` if `_async` is False , otherwise ``SearchFuture`` + + .. _Metric type documentations: + https://milvus.io/docs/v2.2.x/metric.md + .. _Index documentations: + https://milvus.io/docs/v2.2.x/index.md + .. _How guarantee ts works: + https://github.com/milvus-io/milvus/blob/master/docs/developer_guides/how-guarantee-ts-works.md + + Raises: + MilvusException: If anything goes wrong + + Examples: >>> from pymilvus import connections, Collection, FieldSchema, CollectionSchema, DataType >>> import random >>> connections.connect() - >>> schema = CollectionSchema([ ... FieldSchema("film_id", DataType.INT64, is_primary=True), ... FieldSchema("films", dtype=DataType.FLOAT_VECTOR, dim=2) @@ -629,14 +584,13 @@ def search(self, data, anns_field, param, limit, expr=None, partition_names=None ... [[random.random() for _ in range(2)] for _ in range(10)], ... ] >>> collection.insert(data) - >>> collection.num_entities - 10 + >>> collection.create_index("films", {"index_type": "FLAT", "metric_type": "L2", "params": {}}) >>> collection.load() >>> # search >>> search_param = { ... "data": [[1.0, 1.0]], ... "anns_field": "films", - ... "param": {"metric_type": "L2"}, + ... "param": {"metric_type": "L2", "offset": 1}, ... "limit": 2, ... "expr": "film_id > 0", ... } @@ -653,67 +607,64 @@ def search(self, data, anns_field, param, limit, expr=None, partition_names=None raise DataTypeNotMatchException(message=ExceptionsMessage.ExprType % type(expr)) conn = self._get_connection() - schema_dict = self._schema.to_dict() - schema_dict["consistency_level"] = self._consistency_level res = conn.search(self._name, data, anns_field, param, limit, expr, - partition_names, output_fields, round_decimal, timeout=timeout, schema=schema_dict, **kwargs) + partition_names, output_fields, round_decimal, timeout=timeout, + collection_schema=self._schema_dict, **kwargs) if kwargs.get("_async", False): return SearchFuture(res) return SearchResult(res) def query(self, expr, output_fields=None, partition_names=None, timeout=None, **kwargs): - """ - Query with a set of criteria, and results in a list of records that match the query exactly. - - :param expr: The query expression - :type expr: str - - :param output_fields: A list of fields to return - :type output_fields: list[str] - - :param partition_names: Name of partitions that contain entities - :type partition_names: list[str] - - :param timeout: An optional duration of time in seconds to allow for the RPC. When timeout - is set to None, client waits until server response or error occur - :type timeout: float - - :param kwargs: - * *consistency_level* (``str/int``) -- - Which consistency level to use during a query on the collection. For details, see - https://github.com/milvus-io/milvus/blob/master/docs/developer_guides/how-guarantee-ts-works.md. - Options of consistency level: Strong, Bounded, Eventually, Session, Customized. - Note: this parameter will overwrite the same parameter specified when user created the collection, - if no consistency level was specified, query will use the consistency level when you create the - collection. - * *guarantee_timestamp* (``int``) -- - This function instructs Milvus to see all operations performed before a provided timestamp. If no - such timestamp is specified, Milvus queries all operations performed to date. - Note: only used in Customized consistency level. - * *graceful_time* (``int``) -- - Only used in bounded consistency level. If graceful_time is set, PyMilvus will use current timestamp minus - the graceful_time as the `guarantee_timestamp`. This option is 5s by default if not set. - * *travel_timestamp* (``int``) -- - Users can specify a timestamp in a search to get results based on a data view - at a specified point in time. - * *offset* (``int``) -- - Combined with limit to enable pagination - * *limit* (``int``) -- - Combined with limit to enable pagination - - :return: A list that contains all results - :rtype: list - - :raises RpcError: If gRPC encounter an error - :raises ParamError: If parameters are invalid - :raises DataTypeNotMatchException: If wrong type of param is passed - :raises BaseException: If the return result from server is not ok - - :example: + """ Query with expressions + + Args: + expr (``str``): The query expression. + output_fields(``List[str]``): A list of field names to return. Defaults to None. + partition_names: (``List[str]``, optional): A list of partition names to query in. Defaults to None. + timeout (``float``, optional): A duration of time in seconds to allow for the RPC. Defaults to None. + If timeout is set to None, the client keeps waiting until the server responds or an error occurs. + **kwargs (``dict``, optional): + + * *consistency_level* (``str/int``, optional) + Which consistency level to use when searching in the collection. + + Options of consistency level: Strong, Bounded, Eventually, Session, Customized. + + Note: this parameter will overwrite the same parameter specified when user created the collection, + if no consistency level was specified, search will use the consistency level when you create the + collection. + + * *guarantee_timestamp* (``int``, optional) + Instructs Milvus to see all operations performed before this timestamp. + By default Milvus will search all operations performed to date. + + Note: only valid in Customized consistency level. + + * *graceful_time* (``int``, optional) + Search will use the (current_timestamp - the graceful_time) as the + `guarantee_timestamp`. By default with 5s. + + Note: only valid in Bounded consistency level + + * *travel_timestamp* (``int``, optional) + A specific timestamp to get results based on a data view at. + + * *offset* (``int``) + Combined with limit to enable pagination + + * *limit* (``int``) + Combined with limit to enable pagination + + Returns: + List, contains all results + + Raises: + MilvusException: If anything goes wrong + + Examples: >>> from pymilvus import connections, Collection, FieldSchema, CollectionSchema, DataType >>> import random >>> connections.connect() - >>> schema = CollectionSchema([ ... FieldSchema("film_id", DataType.INT64, is_primary=True), ... FieldSchema("film_date", DataType.INT64), @@ -727,15 +678,14 @@ def query(self, expr, output_fields=None, partition_names=None, timeout=None, ** ... [[random.random() for _ in range(2)] for _ in range(10)], ... ] >>> collection.insert(data) - >>> collection.num_entities - 10 + >>> collection.create_index("films", {"index_type": "FLAT", "metric_type": "L2", "params": {}}) >>> collection.load() >>> # query - >>> expr = "film_id in [ 0, 1 ]" - >>> res = collection.query(expr, output_fields=["film_date"]) - >>> assert len(res) == 2 + >>> expr = "film_id <= 1" + >>> res = collection.query(expr, output_fields=["film_date"], offset=1, limit=1) + >>> assert len(res) == 1 >>> print(f"- Query results: {res}") - - Query results: [{'film_id': 0, 'film_date': 2000}, {'film_id': 1, 'film_date': 2001}] + - Query results: [{'film_id': 1, 'film_date': 2001}] """ if not isinstance(expr, str): raise DataTypeNotMatchException(message=ExceptionsMessage.ExprType % type(expr)) @@ -747,19 +697,15 @@ def query(self, expr, output_fields=None, partition_names=None, timeout=None, ** return res @property - def partitions(self, **kwargs) -> list: - """ - Return all partitions of the collection. + def partitions(self, **kwargs) -> List[Partition]: + """ List[Partition]: List of Partition object. - :return list[Partition]: - List of Partition object, return when operation is successful. - - :raises CollectionNotExistException: If collection doesn't exist. + Raises: + MilvusException: If anything goes wrong. - :example: + Examples: >>> from pymilvus import connections, Collection, FieldSchema, CollectionSchema, DataType >>> connections.connect() - >>> schema = CollectionSchema([ ... FieldSchema("film_id", DataType.INT64, is_primary=True), ... FieldSchema("films", dtype=DataType.FLOAT_VECTOR, dim=2) @@ -776,22 +722,20 @@ def partitions(self, **kwargs) -> list: return partitions def partition(self, partition_name, **kwargs) -> Partition: - """ - Return the partition corresponding to name. Return None if not existed. + """ Get the existing partition object according to name. Return None if not existed. - :param partition_name: The name of the partition to get. - :type partition_name: str + Args: + partition_name (``str``): The name of the partition to get. - :return Partition: - Partition object corresponding to partition_name. + Returns: + Partition: Partition object corresponding to partition_name. - :raises CollectionNotExistException: If collection doesn't exist. - :raises BaseException: If partition doesn't exist. + Raises: + MilvusException: If anything goes wrong. - :example: + Examples: >>> from pymilvus import connections, Collection, FieldSchema, CollectionSchema, DataType >>> connections.connect() - >>> schema = CollectionSchema([ ... FieldSchema("film_id", DataType.INT64, is_primary=True), ... FieldSchema("films", dtype=DataType.FLOAT_VECTOR, dim=2) @@ -799,30 +743,25 @@ def partition(self, partition_name, **kwargs) -> Partition: >>> collection = Collection("test_collection_partition", schema) >>> collection.partition("_default") {"name": "_default", "description": "", "num_entities": 0} - >>> collection.partition("partition") - """ if self.has_partition(partition_name, **kwargs) is False: return None return Partition(self, partition_name, construct_only=True, **kwargs) - def create_partition(self, partition_name, description="", **kwargs): - """ - Create the partition corresponding to name if not existed. - - :param partition_name: The name of the partition to create. - :type partition_name: str + def create_partition(self, partition_name, description="", **kwargs) -> Partition: + """ Create a new partition corresponding to name if not existed. - :param description: The description of the partition corresponding to name. - :type description: str + Args: + partition_name (``str``): The name of the partition to create. + description (``str``, optional): The description of this partition. - :return Partition: - Partition object corresponding to partition_name. + Returns: + Partition: Partition object corresponding to partition_name. - :raises CollectionNotExistException: If collection doesn't exist. - :raises BaseException: If partition doesn't exist. + Raises: + MilvusException: If anything goes wrong. - :example: + Examples: >>> from pymilvus import connections, Collection, FieldSchema, CollectionSchema, DataType >>> connections.connect() >>> schema = CollectionSchema([ @@ -840,22 +779,20 @@ def create_partition(self, partition_name, description="", **kwargs): return Partition(self, partition_name, description=description, **kwargs) def has_partition(self, partition_name, timeout=None, **kwargs) -> bool: - """ - Checks if a specified partition exists. + """ Checks if a specified partition exists. - :param partition_name: The name of the partition to check - :type partition_name: str - - :param timeout: An optional duration of time in seconds to allow for the RPC. When timeout - is set to None, client waits until server response or error occur - :type timeout: float + Args: + partition_name (``str``): The name of the partition to check. + timeout (``float``, optional): An optional duration of time in seconds to allow for the RPC. When timeout + is set to None, client waits until server response or error occur. - :return bool: - Whether a specified partition exists. + Returns: + bool: True if exists, otherwise false. - :raises CollectionNotExistException: If collection doesn't exist. + Raises: + MilvusException: If anything goes wrong. - :example: + Examples: >>> from pymilvus import connections, Collection, FieldSchema, CollectionSchema, DataType >>> connections.connect() >>> schema = CollectionSchema([ @@ -874,21 +811,18 @@ def has_partition(self, partition_name, timeout=None, **kwargs) -> bool: return conn.has_partition(self._name, partition_name, timeout=timeout, **kwargs) def drop_partition(self, partition_name, timeout=None, **kwargs): - """ - Drop the partition and its corresponding index files. - - :param partition_name: The name of the partition to drop. - :type partition_name: str + """ Drop the partition in this collection. - :param timeout: - * *timeout* (``float``) -- - An optional duration of time in seconds to allow for the RPC. If timeout - is set to None, the client keeps waiting until the server responds or an error occurs. + Args: + partition_name (``str``): The name of the partition to drop. + timeout (``float``, optional): An optional duration of time in seconds to allow for the RPC. When timeout + is set to None, client waits until server response or error occur. - :raises CollectionNotExistException: If collection doesn't exist. - :raises BaseException: If partition doesn't exist. + Raises: + PartitionNotExistException: If the partition doesn't exists. + MilvusException: If anything goes wrong. - :example: + Examples: >>> from pymilvus import connections, Collection, FieldSchema, CollectionSchema, DataType >>> connections.connect() >>> schema = CollectionSchema([ @@ -910,16 +844,10 @@ def drop_partition(self, partition_name, timeout=None, **kwargs): return conn.drop_partition(self._name, partition_name, timeout=timeout, **kwargs) @property - def indexes(self, **kwargs) -> list: - """ - Returns all indexes of the collection. + def indexes(self, **kwargs) -> List[Index]: + """List[Index]: list of indexes of this collection. - :return list[Index]: - List of Index objects, returned when this operation is successful. - - :raises CollectionNotExistException: If the collection does not exist. - - :example: + Examples: >>> from pymilvus import connections, Collection, FieldSchema, CollectionSchema, DataType >>> connections.connect() >>> schema = CollectionSchema([ @@ -944,20 +872,20 @@ def indexes(self, **kwargs) -> list: return indexes def index(self, **kwargs) -> Index: - """ - Fetches the index object of the of the specified name. + """Get the index object of index name. - :param kwargs: - * *index_name* (``str``) -- - The name of index. If no index is specified, the default index name is used. + Args: + **kwargs (``dict``): + * *index_name* (``str``) + The name of index. If no index is specified, the default index name is used. - :return Index: - Index object corresponding to index_name. + Returns: + Index: Index object corresponding to index_name. - :raises CollectionNotExistException: If the collection does not exist. - :raises BaseException: If the specified index does not exist. + Raises: + IndexNotExistException: If the index doesn't exists. - :example: + Examples: >>> from pymilvus import connections, Collection, FieldSchema, CollectionSchema, DataType >>> connections.connect() >>> schema = CollectionSchema([ @@ -983,37 +911,30 @@ def index(self, **kwargs) -> Index: return Index(self, field_name, tmp_index, construct_only=True, index_name=index_name) raise IndexNotExistException(message=ExceptionsMessage.IndexNotExist) - def create_index(self, field_name, index_params={}, timeout=None, **kwargs) -> Index: - """ - Creates index for a specified field. Return Index Object. - - :param field_name: The name of the field to create an index for. - :type field_name: str - - :param index_params: The indexing parameters. - :type index_params: dict - - :param timeout: An optional duration of time in seconds to allow for the RPC. When timeout - is set to None, client waits until server response or error occur - :type timeout: float - - :param kwargs: - * *_async* (``bool``) -- - Indicate if invoke asynchronously. When value is true, method returns a IndexFuture object; - otherwise, method returns results from server. - * *_callback* (``function``) -- - The callback function which is invoked after server response successfully. It only take - effect when _async is set to True. - * *index_name* (``str``) -- - The name of index which will be created. Then you can use the index name to check the state of index. - If no index name is specified, the default index name is used. - - :raises CollectionNotExistException: If the collection does not exist. - :raises ParamError: If the index parameters are invalid. - :raises BaseException: If field does not exist. - :raises BaseException: If the index has been created. - - :example: + def create_index(self, field_name, index_params={}, timeout=None, **kwargs): + """Creates index for a specified field, with a index name. + + Args: + field_name (``str``): The name of the field to create index + index_params (``dict``): The parameters to index + * *index_type* (``str``) + "index_type" as the key, example values: "FLAT", "IVF_FLAT", etc. + + * *metric_type* (``str``) + "metric_type" as the key, examples values: "L2", "IP", "JACCARD". + + * *params* (``dict``) + "params" as the key, corresponding index params. + + timeout (``float``, optional): An optional duration of time in seconds to allow for the RPC. When timeout + is set to None, client waits until server response or error occur. + index_name (``str``): The name of index which will be created, must be unique. + If no index name is specified, the default index name will be used. + + Raises: + MilvusException: If anything goes wrong. + + Examples: >>> from pymilvus import connections, Collection, FieldSchema, CollectionSchema, DataType >>> connections.connect() >>> schema = CollectionSchema([ @@ -1021,34 +942,28 @@ def create_index(self, field_name, index_params={}, timeout=None, **kwargs) -> I ... FieldSchema("films", dtype=DataType.FLOAT_VECTOR, dim=2) ... ]) >>> collection = Collection("test_collection_create_index", schema) - >>> index = {"index_type": "IVF_FLAT", "params": {"nlist": 128}, "metric_type": "L2"} - >>> collection.create_index("films", index) + >>> index_params = {"index_type": "IVF_FLAT", "params": {"nlist": 128}, "metric_type": "L2"} + >>> collection.create_index("films", index_params, index_name="idx") Status(code=0, message='') - >>> collection.index() - """ conn = self._get_connection() - return conn.create_index(self._name, field_name, index_params, - timeout=timeout, **kwargs) + return conn.create_index(self._name, field_name, index_params, timeout=timeout, **kwargs) def has_index(self, timeout=None, **kwargs) -> bool: - """ - Checks whether a specified index exists. + """ Check whether a specified index exists. - :param timeout: An optional duration of time in seconds to allow for the RPC. When timeout - is set to None, client waits until server response or error occur - :type timeout: float - - :param kwargs: - * *index_name* (``str``) -- - The name of index. If no index is specified, the default index name is used. + Args: + timeout (``float``, optional): An optional duration of time in seconds to allow for the RPC. When timeout + is set to None, client waits until server response or error occur. - :return bool: - Whether the specified index exists. + **kwargs (``dict``): + * *index_name* (``str``) + The name of index. If no index is specified, the default index name will be used. - :raises CollectionNotExistException: If the collection does not exist. + Returns: + bool: Whether the specified index exists. - :example: + Examples: >>> from pymilvus import connections, Collection, FieldSchema, CollectionSchema, DataType >>> connections.connect() >>> schema = CollectionSchema([ @@ -1064,29 +979,24 @@ def has_index(self, timeout=None, **kwargs) -> bool: conn = self._get_connection() copy_kwargs = copy.deepcopy(kwargs) index_name = copy_kwargs.pop("index_name", DefaultConfigs.IndexName) - # TODO(yukun): Need field name, but provide index name if conn.describe_index(self._name, index_name, timeout=timeout, **copy_kwargs) is None: return False return True def drop_index(self, timeout=None, **kwargs): - """ - Drop index and its corresponding index files. - - :param timeout: - * *timeout* (``float``) -- - An optional duration of time in seconds to allow for the RPC. If timeout - is set to None, the client keeps waiting until the server responds or an error occurs. - Optional. A duration of time in seconds. + """ Drop index and its corresponding index files. + Args: + timeout (``float``, optional): An optional duration of time in seconds to allow for the RPC. When timeout + is set to None, client waits until server response or error occur. - :param kwargs: - * *index_name* (``str``) -- - The name of index. If no index is specified, the default index name is used. + **kwargs (``dict``): + * *index_name* (``str``) + The name of index. If no index is specified, the default index name will be used. - :raises CollectionNotExistException: If the collection does not exist. - :raises BaseException: If the index does not exist or has been dropped. + Raises: + MilvusException: If anything goes wrong. - :example: + Examples: >>> from pymilvus import connections, Collection, FieldSchema, CollectionSchema, DataType >>> connections.connect() >>> schema = CollectionSchema([ @@ -1111,78 +1021,64 @@ def drop_index(self, timeout=None, **kwargs): index.drop(timeout=timeout, **kwargs) def compact(self, timeout=None, **kwargs): - """ - Compact merge the small segments in a collection - - :param collection_name: The name of the collection. - :type collection_name: str. - - :param timeout: An optional duration of time in seconds to allow for the RPC. When timeout - is set to None, client waits until server response or error occur - :type timeout: float + """ Compact merge the small segments in a collection - :raises BaseException: If the collection does not exist. + Args: + timeout (``float``, optional): An optional duration of time in seconds to allow for the RPC. When timeout + is set to None, client waits until server response or error occur. - :example: + Raises: + MilvusException: If anything goes wrong. """ conn = self._get_connection() self.compaction_id = conn.compact(self._name, timeout=timeout, **kwargs) def get_compaction_state(self, timeout=None, **kwargs) -> CompactionState: - """ - get_compaction_state returns the current collection's compaction state - - :param timeout: An optional duration of time in seconds to allow for the RPC. When timeout - is set to None, client waits until server response or error occur - :type timeout: float + """ Get the current compaction state - :raises BaseException: If the collection does not exist. + Args: + timeout (``float``, optional): An optional duration of time in seconds to allow for the RPC. When timeout + is set to None, client waits until server response or error occur. - :example: + Raises: + MilvusException: If anything goes wrong. """ conn = self._get_connection() return conn.get_compaction_state(self.compaction_id, timeout=timeout, **kwargs) def wait_for_compaction_completed(self, timeout=None, **kwargs) -> CompactionState: - """ - Block until the current collection's compaction completed - - :param timeout: The timeout for this method, unit: second - when timeout is set to None, client waits until compaction completed or error occur - :type timeout: float + """ Block until the current collection's compaction completed - :raises BaseException: If the time is up and the compression has not been completed + Args: + timeout (``float``, optional): An optional duration of time in seconds to allow for the RPC. When timeout + is set to None, client waits until server response or error occur. - :example: + Raises: + MilvusException: If anything goes wrong. """ conn = self._get_connection() return conn.wait_for_compaction_completed(self.compaction_id, timeout=timeout, **kwargs) def get_compaction_plans(self, timeout=None, **kwargs) -> CompactionPlans: - """ - get_compaction_state returns the current collection's compaction state - - :param timeout: An optional duration of time in seconds to allow for the RPC. When timeout - is set to None, client waits until server response or error occur - :type timeout: float + """Get the current compaction plans - :raises BaseException: If the collection does not exist. - - :example: + Args: + timeout (``float``, optional): An optional duration of time in seconds to allow for the RPC. When timeout + is set to None, client waits until server response or error occur. + Returns: + CompactionPlans: All the plans' states of this compaction. """ conn = self._get_connection() return conn.get_compaction_plans(self.compaction_id, timeout=timeout, **kwargs) def get_replicas(self, timeout=None, **kwargs) -> Replica: - """get_replicas returns the current collection's replica information - - :param timeout: An optional duration of time in seconds to allow for the RPC. When timeout - is set to None, client waits until server response or error occur - :type timeout: float + """Get the current loaded replica information - :raises BaseException: If the collection does not exist. - - :example: + Args: + timeout (``float``, optional): An optional duration of time in seconds to allow for the RPC. When timeout + is set to None, client waits until server response or error occur. + Returns: + Replica: All the replica information. """ conn = self._get_connection() return conn.get_replicas(self.name, timeout=timeout, **kwargs) diff --git a/pymilvus/orm/partition.py b/pymilvus/orm/partition.py index e57ebda87..71c58a40b 100644 --- a/pymilvus/orm/partition.py +++ b/pymilvus/orm/partition.py @@ -27,8 +27,8 @@ class Partition: - # TODO: Need a place to store the description def __init__(self, collection, name, description="", **kwargs): + # TODO: Need a place to store the description from .collection import Collection if not isinstance(collection, Collection): raise CollectionNotExistException(message=ExceptionsMessage.CollectionType) @@ -61,10 +61,10 @@ def _get_connection(self): @property def description(self) -> str: - """ - Return the description text. + """ Return the description text. - :return str: Partition description text, return when operation is successful + :return: Partition description + :rtype: str :example: >>> from pymilvus import connections, Collection, Partition, FieldSchema, CollectionSchema, DataType @@ -349,70 +349,107 @@ def delete(self, expr, timeout=None, **kwargs): def search(self, data, anns_field, param, limit, expr=None, output_fields=None, timeout=None, round_decimal=-1, **kwargs): - """ - Vector similarity search with an optional boolean expression as filters. - - :param data: The vectors of search data, the length of data is number of query (nq), the - dim of every vector in data must be equal to vector field's of collection. - :type data: list[list[float]] - :param anns_field: The vector field used to search of collection. - :type anns_field: str - :param param: The parameters of search, such as nprobe, etc. - :type param: dict - :param limit: The max number of returned record, we also called this parameter as topk. - :param round_decimal: The specified number of decimal places of returned distance - :type round_decimal: int - :param expr: The boolean expression used to filter attribute. - :type expr: str - :param output_fields: The fields to return in the search result, not supported now. - :type output_fields: list[str] - :param timeout: An optional duration of time in seconds to allow for the RPC. When timeout - is set to None, client waits until server response or error occur. - :type timeout: float - :param kwargs: - * *_async* (``bool``) -- - Indicate if invoke asynchronously. When value is true, method returns a - SearchFuture object; otherwise, method returns results from server directly. - * *_callback* (``function``) -- - The callback function which is invoked after server response successfully. It only - takes effect when _async is set to True. - * *consistency_level* (``str/int``) -- - Which consistency level to use when searching in the partition. For details, see - https://github.com/milvus-io/milvus/blob/master/docs/developer_guides/how-guarantee-ts-works.md. + """ Conducts a vector similarity search with an optional boolean expression as filter. - Note: this parameter will overwrite the same parameter specified when user created the collection, - if no consistency level was specified, search will use collection consistency level. + Args: + data (``List[List[float]]``): The vectors of search data. + the length of data is number of query (nq), and the dim of every vector in data must be equal to + the vector field's of collection. + anns_field (``str``): The name of the vector field used to search of collection. + param (``dict[str, Any]``): - * *guarantee_timestamp* (``int``) -- - This function instructs Milvus to see all operations performed before a provided timestamp. If no - such timestamp is provided, then Milvus will search all operations performed to date. - Note: only used in Customized consistency level. - * *graceful_time* (``int``) -- - Only used in bounded consistency level. If graceful_time is set, PyMilvus will use current timestamp minus - the graceful_time as the `guarantee_timestamp`. This option is 5s by default if not set. - * *travel_timestamp* (``int``) -- - Users can specify a timestamp in a search to get results based on a data view - at a specified point in time. + The parameters of search. The followings are valid keys of param. + + * *nprobe*, *ef*, *search_k*, etc + Corresponding search params for a certain index. + + * *metric_type* (``str``) + similar metricy types, the value must be of type str. + + * *offset* (``int``, optional) + offset for pagination. - :return: SearchResult: - SearchResult is iterable and is a 2d-array-like class, the first dimension is - the number of vectors to query (nq), the second dimension is the number of limit(topk). - :rtype: SearchResult + * *limit* (``int``, optional) + limit for the search results and pagination. - :raises RpcError: If gRPC encounter an error. - :raises ParamError: If parameters are invalid. - :raises BaseException: If the return result from server is not ok. + example for param:: + + { + "nprobe": 128, + "metric_type": "L2", + "offset": 10, + "limit": 10, + } + + limit (``int``): The max number of returned record, also known as `topk`. + expr (``str``): The boolean expression used to filter attribute. Default to None. + + example for expr:: + + "id_field >= 0", "id_field in [1, 2, 3, 4]" + + output_fields (``List[str]``, optional): + The name of fields to return in the search result. Can only get scalar fields. + round_decimal (``int``, optional): The specified number of decimal places of returned distance + Defaults to -1 means no round to returned distance. + **kwargs (``dict``): Optional search params + + * *_async* (``bool``, optional) + Indicate if invoke asynchronously. + Returns a SearchFuture if True, else returns results from server directly. + + * *_callback* (``function``, optional) + The callback function which is invoked after server response successfully. + It functions only if _async is set to True. + + * *consistency_level* (``str/int``, optional) + Which consistency level to use when searching in the collection. + + Options of consistency level: Strong, Bounded, Eventually, Session, Customized. + + Note: this parameter will overwrite the same parameter specified when user created the collection, + if no consistency level was specified, search will use the consistency level when you create the + collection. + + * *guarantee_timestamp* (``int``, optional) + Instructs Milvus to see all operations performed before this timestamp. + By default Milvus will search all operations performed to date. + + Note: only valid in Customized consistency level. + + * *graceful_time* (``int``, optional) + Search will use the (current_timestamp - the graceful_time) as the + `guarantee_timestamp`. By default with 5s. + + Note: only valid in Bounded consistency level + + * *travel_timestamp* (``int``, optional) + A specific timestamp to get results based on a data view at. + + Returns: + SearchResult: + Returns ``SearchResult`` if `_async` is False , otherwise ``SearchFuture`` + + .. _Metric type documentations: + https://milvus.io/docs/v2.2.x/metric.md + .. _Index documentations: + https://milvus.io/docs/v2.2.x/index.md + .. _How guarantee ts works: + https://github.com/milvus-io/milvus/blob/master/docs/developer_guides/how-guarantee-ts-works.md + + Raises: + MilvusException: If anything goes wrong :example: >>> from pymilvus import connections, Collection, FieldSchema, CollectionSchema, DataType >>> import random >>> connections.connect() - >>> schema = CollectionSchema([ ... FieldSchema("film_id", DataType.INT64, is_primary=True), ... FieldSchema("films", dtype=DataType.FLOAT_VECTOR, dim=2) ... ]) >>> collection = Collection("test_collection_search", schema) + >>> collection.create_index("films", {"index_type": "FLAT", "metric_type": "L2", "params": {}}) >>> partition = Partition(collection, "comedy", "comedy films") >>> # insert >>> data = [ @@ -420,8 +457,6 @@ def search(self, data, anns_field, param, limit, ... [[random.random() for _ in range(2)] for _ in range(10)], ... ] >>> partition.insert(data) - >>> partition.num_entities - 10 >>> partition.load() >>> # search >>> search_param = { @@ -444,7 +479,7 @@ def search(self, data, anns_field, param, limit, schema_dict = self._schema.to_dict() schema_dict["consistency_level"] = self._consistency_level res = conn.search(self._collection.name, data, anns_field, param, limit, expr, [self._name], output_fields, - round_decimal=round_decimal, timeout=timeout, schema=schema_dict, **kwargs) + round_decimal=round_decimal, timeout=timeout, collection_schema=schema_dict, **kwargs) if kwargs.get("_async", False): return SearchFuture(res) return SearchResult(res) @@ -478,7 +513,7 @@ def query(self, expr, output_fields=None, timeout=None, **kwargs): the graceful_time as the `guarantee_timestamp`. This option is 5s by default if not set. * *travel_timestamp* (``int``) -- Users can specify a timestamp in a search to get results based on a data view - at a specified point in time. + at a specified point in time. :return: A list that contains all results :rtype: list diff --git a/pymilvus/orm/role.py b/pymilvus/orm/role.py index 2a8f76a6c..61202fdee 100644 --- a/pymilvus/orm/role.py +++ b/pymilvus/orm/role.py @@ -22,12 +22,30 @@ def name(self): def create(self): """ Create a role It will success if the role isn't existed, otherwise fail. + + :example: + >>> from pymilvus import connections, utility + >>> from pymilvus.orm.role import Role + >>> connections.connect() + >>> role = Role(name=role_name) + >>> role.create() + >>> roles = utility.list_roles() + >>> print(f"roles in Milvus: {roles}") """ return self._get_connection().create_role(self._name) def drop(self): """ Drop a role It will success if the role is existed, otherwise fail. + + :example: + >>> from pymilvus import connections, utility + >>> from pymilvus.orm.role import Role + >>> connections.connect() + >>> role = Role(name=role_name) + >>> role.drop() + >>> roles = utility.list_roles() + >>> print(f"roles in Milvus: {roles}") """ return self._get_connection().drop_role(self._name) @@ -36,6 +54,15 @@ def add_user(self, username: str): The user will get permissions that the role are allowed to perform operations. :param username: user name. :type username: str + + :example: + >>> from pymilvus import connections + >>> from pymilvus.orm.role import Role + >>> connections.connect() + >>> role = Role(name=role_name) + >>> role.add_user(username) + >>> users = role.get_users() + >>> print(f"users added to the role: {users}") """ return self._get_connection().add_user_to_role(username, self._name) @@ -44,6 +71,15 @@ def remove_user(self, username: str): The user will remove permissions that the role are allowed to perform operations. :param username: user name. :type username: str + + :example: + >>> from pymilvus import connections + >>> from pymilvus.orm.role import Role + >>> connections.connect() + >>> role = Role(name=role_name) + >>> role.remove_user(username) + >>> users = role.get_users() + >>> print(f"users added to the role: {users}") """ return self._get_connection().remove_user_from_role(username, self._name) @@ -54,6 +90,14 @@ def get_users(self): RoleInfo groups: - UserItem: , + + :example: + >>> from pymilvus import connections + >>> from pymilvus.orm.role import Role + >>> connections.connect() + >>> role = Role(name=role_name) + >>> users = role.get_users() + >>> print(f"users added to the role: {users}") """ roles = self._get_connection().select_one_role(self._name, True) if len(roles.groups) == 0: @@ -64,6 +108,14 @@ def is_exist(self): """ Check whether the role is existed. :return a bool value It will be True if the role is existed, otherwise False. + + :example: + >>> from pymilvus import connections + >>> from pymilvus.orm.role import Role + >>> connections.connect() + >>> role = Role(name=role_name) + >>> is_exist = role.is_exist() + >>> print(f"the role: {is_exist}") """ roles = self._get_connection().select_one_role(self._name, False) return len(roles.groups) != 0 @@ -76,6 +128,13 @@ def grant(self, object: str, object_name: str, privilege: str): :type object_name: str :param privilege: privilege name. :type privilege: str + + :example: + >>> from pymilvus import connections + >>> from pymilvus.orm.role import Role + >>> connections.connect() + >>> role = Role(role_name) + >>> role.grant("Collection", collection_name, "Insert") """ return self._get_connection().grant_privilege(self._name, object, object_name, privilege) @@ -87,6 +146,13 @@ def revoke(self, object: str, object_name: str, privilege: str): :type object_name: str :param privilege: privilege name. :type privilege: str + + :example: + >>> from pymilvus import connections + >>> from pymilvus.orm.role import Role + >>> connections.connect() + >>> role = Role(role_name) + >>> role.revoke("Collection", collection_name, "Insert") """ return self._get_connection().revoke_privilege(self._name, object, object_name, privilege) @@ -101,6 +167,13 @@ def list_grant(self, object: str, object_name: str): GrantInfo groups: - GrantItem: , , , , + + :example: + >>> from pymilvus import connections + >>> from pymilvus.orm.role import Role + >>> connections.connect() + >>> role = Role(role_name) + >>> role.list_grant("Collection", collection_name) """ return self._get_connection().select_grant_for_role_and_object(self._name, object, object_name) @@ -111,5 +184,12 @@ def list_grants(self): GrantInfo groups: - GrantItem: , , , , + + :example: + >>> from pymilvus import connections + >>> from pymilvus.orm.role import Role + >>> connections.connect() + >>> role = Role(role_name) + >>> role.list_grants() """ return self._get_connection().select_grant_for_one_role(self._name) diff --git a/pymilvus/orm/utility.py b/pymilvus/orm/utility.py index cdd8f63e5..543769fbf 100644 --- a/pymilvus/orm/utility.py +++ b/pymilvus/orm/utility.py @@ -670,6 +670,17 @@ def do_bulk_insert(collection_name: str, files: list, partition_name=None, timeo :raises BaseException: If collection_name doesn't exist. :raises BaseException: If the files input is illegal. + + :example: + >>> from pymilvus import connections, Collection, FieldSchema, CollectionSchema, DataType, utility + >>> connections.connect() + >>> schema = CollectionSchema([ + ... FieldSchema("film_id", DataType.INT64, is_primary=True), + ... FieldSchema("films", dtype=DataType.FLOAT_VECTOR, dim=2) + ... ]) + >>> collection = Collection("test_collection_bulk_insert", schema) + >>> task_id = utility.do_bulk_insert(collection_name=collection.name, files=['data.json']) + >>> print(task_id) """ return _get_connection(using).do_bulk_insert(collection_name, partition_name, files, timeout=timeout, **kwargs) @@ -682,6 +693,13 @@ def get_bulk_insert_state(task_id, timeout=None, using="default", **kwargs) -> B :return: BulkInsertState :rtype: BulkInsertState + + :example: + >>> from pymilvus import connections, utility, BulkInsertState + >>> connections.connect() + >>> state = utility.get_bulk_insert_state(task_id=id) # the id is returned by do_bulk_insert() + >>> if state.state == BulkInsertState.ImportFailed or state.state == BulkInsertState.ImportFailedAndCleaned: + >>> print("task id:", state.task_id, "failed, reason:", state.failed_reason) """ return _get_connection(using).get_bulk_insert_state(task_id, timeout=timeout, **kwargs) @@ -698,6 +716,11 @@ def list_bulk_insert_tasks(limit=0, collection_name=None, timeout=None, using="d :return: list[BulkInsertState] :rtype: list[BulkInsertState] + :example: + >>> from pymilvus import connections, utility, BulkInsertState + >>> connections.connect() + >>> tasks = utility.list_bulk_insert_tasks(collection_name=collection_name) + >>> print(tasks) """ return _get_connection(using).list_bulk_insert_tasks(limit, collection_name, timeout=timeout, **kwargs) @@ -714,6 +737,13 @@ def reset_password(user: str, old_password: str, new_password: str, using="defau :type old_password: str :param new_password: the newly password of this user. :type new_password: str + + :example: + >>> from pymilvus import connections, utility + >>> connections.connect() + >>> utility.reset_password(user, old_password, new_password) + >>> users = utility.list_usernames() + >>> print(f"users in Milvus: {users}") """ return _get_connection(using).reset_password(user, old_password, new_password) @@ -724,6 +754,14 @@ def create_user(user: str, password: str, using="default"): :type user: str :param password: the password. :type password: str + + :example: + >>> from pymilvus import connections, utility + >>> connections.connect() + >>> utility.create_user(user, password) + >>> connections.connect(user=user, password=password) + >>> users = utility.list_usernames() + >>> print(f"users in Milvus: {users}") """ return _get_connection(using).create_user(user, password) @@ -741,6 +779,14 @@ def update_password(user: str, old_password, new_password: str, using="default") :type old_password: str :param new_password: the newly password of this user. :type new_password: str + + :example: + >>> from pymilvus import connections, utility + >>> connections.connect() + >>> utility.update_password(user, old_password, new_password) + >>> connections.connect(user=user, password=new_password) + >>> users = utility.list_usernames() + >>> print(f"users in Milvus: {users}") """ return _get_connection(using).update_password(user, old_password, new_password) @@ -749,6 +795,13 @@ def delete_user(user: str, using="default"): """ Delete User corresponding to the username. :param user: the user name. :type user: str + + :example: + >>> from pymilvus import connections, utility + >>> connections.connect() + >>> utility.delete_user(user) + >>> users = utility.list_usernames() + >>> print(f"users in Milvus: {users}") """ return _get_connection(using).delete_user(user) @@ -757,6 +810,12 @@ def list_usernames(using="default"): """ List all usernames. :return list of str: The usernames in Milvus instances. + + :example: + >>> from pymilvus import connections, utility + >>> connections.connect() + >>> users = utility.list_usernames() + >>> print(f"users in Milvus: {users}") """ return _get_connection(using).list_usernames() @@ -766,6 +825,12 @@ def list_roles(include_user_info: bool, using="default"): :param include_user_info: whether to obtain the user information associated with roles :type include_user_info: bool :return RoleInfo + + :example: + >>> from pymilvus import connections, utility + >>> connections.connect() + >>> roles = utility.list_roles() + >>> print(f"roles in Milvus: {roles}") """ return _get_connection(using).select_all_role(include_user_info) @@ -777,6 +842,12 @@ def list_user(username: str, include_role_info: bool, using="default"): :param include_role_info: whether to obtain the role information associated with the user :type include_role_info: bool :return UserInfo + + :example: + >>> from pymilvus import connections, utility + >>> connections.connect() + >>> user = utility.list_user(username, include_role_info) + >>> print(f"user info: {user}") """ return _get_connection(using).select_one_user(username, include_role_info) @@ -786,5 +857,11 @@ def list_users(include_role_info: bool, using="default"): :param include_role_info: whether to obtain the role information associated with users :type include_role_info: bool :return UserInfo + + :example: + >>> from pymilvus import connections, utility + >>> connections.connect() + >>> users = utility.list_users(include_role_info) + >>> print(f"users info: {users}") """ return _get_connection(using).select_all_user(include_role_info) diff --git a/requirements.txt b/requirements.txt index cefdacaaa..7e73d8fd1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -15,17 +15,16 @@ toml==0.10.2 ujson>=2.0.0,<=5.4.0 urllib3==1.26.5 sklearn==0.0 -m2r==0.2.1 -mistune==2.0.3 -Sphinx==2.3.1 -sphinx-copybutton==0.3.1 -sphinx-rtd-theme==0.4.3 -sphinxcontrib-applehelp==1.0.1 -sphinxcontrib-devhelp==1.0.1 -sphinxcontrib-htmlhelp==1.0.2 -sphinxcontrib-jsmath==1.0.1 -sphinxcontrib-qthelp==1.0.2 -sphinxcontrib-serializinghtml==1.1.3 +m2r==0.3.1 +Sphinx==4.0.0 +sphinx-copybutton +sphinx-rtd-theme +sphinxcontrib-applehelp +sphinxcontrib-devhelp +sphinxcontrib-htmlhelp +sphinxcontrib-jsmath +sphinxcontrib-qthelp +sphinxcontrib-serializinghtml sphinxcontrib-napoleon sphinxcontrib-prettyspecialmethods pytest>=5.3.4 diff --git a/tests/test_prepare.py b/tests/test_prepare.py index 2d5ba1206..7265ade20 100644 --- a/tests/test_prepare.py +++ b/tests/test_prepare.py @@ -26,7 +26,7 @@ def test_search_requests_with_expr_offset(self): "offset": 10, } - ret = Prepare.search_requests_with_expr("name", data, "v", search_params, 100, schema=schema) + ret = Prepare.search_requests_with_expr("name", data, "v", search_params, 100, schema) offset_exists = False for p in ret[0].search_params: