pymilvus

Example

You can find a example script in example.py.

Module Contents

Version

Get version of pymilvus by Milvus.__version__.

Client

milvus.Milvus

alias of milvus.client.grpc_client.GrpcMilvus

class milvus.Prepare[source]

Bases: object

classmethod cmd(cmd)[source]
classmethod delete_param(table_name, start_date, end_date)[source]
classmethod index(index_type, nlist)[source]
Parameters
  • index_type (IndexType) -- index type

  • nlist --

Returns

classmethod index_param(table_name, index_param)[source]
classmethod insert_param(table_name, vectors, ids=None)[source]
classmethod range(start_date, end_date)[source]

Parser a 'yyyy-mm-dd' like str or date/datetime object to Range object

Range: (start_date, end_date]

start_date : '2019-05-25'

Parameters
  • start_date (str, date, datetime) -- start date

  • end_date (str, date, datetime) -- end date

Returns

Range object

classmethod ranges(ranges)[source]

prepare query_ranges

Parameters

ranges -- prepare query_ranges

Returns

list[Range]

classmethod search_param(table_name, query_records, query_ranges, topk, nprobe)[source]
classmethod search_vector_in_files_param(table_name, query_records, query_ranges, topk, nprobe, ids)[source]
classmethod table_name(table_name)[source]
classmethod table_schema(param)[source]
Parameters

param (dict) --

(Required)

`example param={'table_name': 'name',

'dimension': 16, 'index_file_size': 1024 'metric_type': MetricType.L2 }`

Returns

ttypes.TableSchema object