logo
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Readme
Files and versions

Updated 5 months ago

ann-insert

ANN Insert Operator: MilvusClient


Desription

Insert data into Milvus collections. Please make sure you have created Milvus Collection before loading the data.


Code Example

Example

import towhee

from towhee import ops

p = (
        towhee.pipe.input('collection_name', 'vec')
        .map(('collection_name', 'vec'), (), ops.ann_insert.osschat_milvus(host='127.0.0.1', port='19530'))
        .output()
        )

p(vec)

Load Collection

Please load the Collection after inserted data.

collection.load()


Factory Constructor

Create the operator via the following factory method:

ann_insert.milvus_client(host, port, user= None, password=None, collection_schema=None, index_params=None)

Parameters:

You must provide at least one valid value for uri or host/port. The order of use: uri > host/port, token > user/password.

uri: str

The uri for Milvus, defaults to "http://localhost:19530"

host: str

The host for Milvus.

port: str

The port for Milvus.

token: str

The token for Milvus.

user: str

The user for Zilliz Cloud, defaults to None.

password: str

The password for Zilliz Cloud, defaults to None.


Interface

Insert Milvus data.

Parameters:

collection_name: str

The collection name for Milvus.

data: list

The data to insert into milvus.

Returns: MutationResult

A MutationResult object contains insert_count represents how many and a primary_keys of primary keys.

Jael Gu 332d50c42d Fix bug 7 Commits
file-icon .gitattributes
1.1 KiB
download-icon
Initial commit 11 months ago
file-icon README.md
1.6 KiB
download-icon
Update 7 months ago
file-icon __init__.py
119 B
download-icon
Add osschat-milvus 11 months ago
file-icon milvus_client.py
2.4 KiB
download-icon
Fix bug 5 months ago
file-icon requirements.txt
9 B
download-icon
Add osschat-milvus 11 months ago