copied
Readme
Files and versions
1.3 KiB
ANN Insert Operator: Milvus
author: shiyu
Desription
Insert data into Milvus collections. Please make sure you have created Milvus Collection and connected Milvus before loading the data.
Code Example
Example
Write the pipeline in simplified style:
import towhee
towhee.dc(your_embeddings) \
.ann_insert.milvus(uri='tcp://<milvus-host>:<milvus-port>/<collection-name>')
Write a same pipeline with explicit inputs/outputs name specifications:
import towhee
towhee.dc['vec'](your_embeddings) \
.ann_insert.milvus['vec', 'results'](uri='tcp://<milvus-host>:<milvus-port>/<collection-name>') \
.show()

Load Collection
Please load the Collection after inserted data.
collection.load()
Factory Constructor
Create the operator via the following factory method:
ann_insert.milvus(collection)
Parameters:
uri: str
The uri for Milvus Collection, such as tcp://<milvus-host>:<milvus-port>/<collection-name>
.
Interface
Parameters:
data: list
The embedding data to be inserted.
Returns: mr
Return milvus results with milvus.insert
.
1.3 KiB
ANN Insert Operator: Milvus
author: shiyu
Desription
Insert data into Milvus collections. Please make sure you have created Milvus Collection and connected Milvus before loading the data.
Code Example
Example
Write the pipeline in simplified style:
import towhee
towhee.dc(your_embeddings) \
.ann_insert.milvus(uri='tcp://<milvus-host>:<milvus-port>/<collection-name>')
Write a same pipeline with explicit inputs/outputs name specifications:
import towhee
towhee.dc['vec'](your_embeddings) \
.ann_insert.milvus['vec', 'results'](uri='tcp://<milvus-host>:<milvus-port>/<collection-name>') \
.show()

Load Collection
Please load the Collection after inserted data.
collection.load()
Factory Constructor
Create the operator via the following factory method:
ann_insert.milvus(collection)
Parameters:
uri: str
The uri for Milvus Collection, such as tcp://<milvus-host>:<milvus-port>/<collection-name>
.
Interface
Parameters:
data: list
The embedding data to be inserted.
Returns: mr
Return milvus results with milvus.insert
.