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 6 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('vec')
        .map('vec', (), ops.ann_insert.milvus_client(host='127.0.0.1', port='19530', collection_name='test_collection'))
        .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, collection_name, user= None, password=None, collection_schema=None, index_params=None)

Parameters:

host: str

The host for Milvus.

port: str

The port for Milvus.

collection_name: str

The collection name 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:

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.

# More Resources

- [Introducing Milvus 2.3.4 - Zilliz blog](https://zilliz.com/blog/what-is-new-in-milvus-2-3-4): Introducing Milvus 2.3.4 with the support for Access Logs, Parquet File imports, expanded collections/partitions, and more!
Jael Gu 2310582250 Add more resources 18 Commits
file-icon .gitattributes
1.1 KiB
download-icon
Initial commit 2 years ago
file-icon README.md
2.7 KiB
download-icon
Add more resources 6 months ago
file-icon __init__.py
118 B
download-icon
update 2 years ago
file-icon milvus_client.py
2.0 KiB
download-icon
Support uri and token 2 years ago
file-icon requirements.txt
9 B
download-icon
update 2 years ago