Client
index
/home/yangxuan/vecwise_engine/python/sdk/client/Client.py

 
Modules
       
milvus.thrift.MilvusService
thrift.protocol.TBinaryProtocol
thrift.transport.TSocket
thrift.transport.TTransport
logging
milvus.thrift.ttypes

 
Classes
       
builtins.object
Prepare
client.Abstract.ConnectIntf(builtins.object)
Milvus

 
class Milvus(client.Abstract.ConnectIntf)
    SDK client abstract class
 
Connection is a abstract class
 
 
Method resolution order:
Milvus
client.Abstract.ConnectIntf
builtins.object

Methods defined here:
__init__(self)
Initialize self.  See help(type(self)) for accurate signature.
__repr__(self)
Return repr(self).
add_vectors(self, table_name, records)
Add vectors to table
 
:param table_name: table name been inserted
:param records: List[RowRecord], list of vectors been inserted
 
        `Please use Prepare.row_record generate records`
 
:returns:
    Status : indicate if vectors inserted successfully
    ids :list of id, after inserted every vector is given a id
client_version(self)
Provide client version
 
:return: Client version
connect(self, host='localhost', port='9090', uri=None)
Connect method should be called before any operations
Server will be connected after connect return OK
Should be implemented
 
:type  host: str
:param host: host
 
:type  port: str
:param port: port
 
:type  uri: str
:param uri: (Optional) uri
 
:return Status,  indicate if connect is successful
create_table(self, param)
Create table
 
:param param: Provide table information to be created,
 
        `Please use Prepare.table_schema generate param`
 
:return: Status, indicate if operation is successful
delete_table(self, table_name)
Delete table
 
:param table_name: Name of the table being deleted
 
:return: Status, indicate if operation is successful
describe_table(self, table_name)
Show table information
 
:param table_name: str, which table to be shown
 
:returns:
    Status: indicate if query is successful
    table_schema: TableSchema, return when operation is successful
disconnect(self)
Disconnect, server will be disconnected after disconnect return SUCCESS
Should be implemented
 
:return Status,  indicate if connect is successful
get_table_row_count(self, table_name)
Get table row count
 
:type  table_name, str
:param table_name, target table name.
 
:returns:
    Status: indicate if operation is successful
    res: int, table row count
search_vectors(self, table_name, top_k, query_records, query_ranges=None)
Query vectors in a table
 
:param table_name: str, table name been queried
:param query_records: list[QueryRecord], all vectors going to be queried
 
        `Please use Prepare.query_record generate QueryRecord`
 
:param top_k: int, how many similar vectors will be searched
:param query_ranges, (Optional) list[Range], search range
 
:returns:
    Status:  indicate if query is successful
    res: list[TopKQueryResult], return when operation is successful
server_status(self, cmd=None)
Provide server status
 
:return: Server status
server_version(self)
Provide server version
 
:return: Server version
show_tables(self)
Show all tables in database
 
:return:
    Status: indicate if this operation is successful
    tables: list[str], list of table names, return when operation
            is successful

Data descriptors defined here:
connected

Data descriptors inherited from client.Abstract.ConnectIntf:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
class Prepare(builtins.object)
     Class methods defined here:
range(start, end) from builtins.type
:param start: str, (Required) range start
:param end: str (Required) range end
 
:return Range
row_record(vector_data) from builtins.type
Record inserted
 
:param vector_data: float binary str, (Required) a binary str
table_schema(table_name, dimension, index_type=<IndexType.INVALIDE: 0>, store_raw_vector=False) from builtins.type
:param table_name: str, (Required) name of table
:param index_type: IndexType, (Required) index type, default = IndexType.INVALID
:param dimension: int64, (Optional) dimension of the table
:param store_raw_vector: bool, (Optional) default = False
 
:return: TableSchema

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
Data
        LOGGER = <Logger Client (WARNING)>
__NAME__ = 'Thrift_Client'
__VERSION__ = '0.0.1'