milvus
copied
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 3 years ago
ann-insert
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
Get the Collection first
from pymilvus import Collection, connections
connections.connect(host='localhost', port='19530')
collection = Collection('your_collection_name')
Example
Write the pipeline in simplified style:
import towhee
towhee.dc(your_embeddings) \
.ann_insert.milvus(collection=collection)
Write a same pipeline with explicit inputs/outputs name specifications:
import towhee
towhee.dc['vec'](your_embeddings) \
.ann_insert.milvus['vec', 'results'](collection=collection) \
.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:
collection: str or pymilvus.Collection
The collection name or pymilvus.Collection in Milvus.
Interface
Parameters:
data: list
The embedding data to be inserted.
Returns: mr
Return milvus results with milvus.insert
.
| 4 Commits | ||
---|---|---|---|
|
1.1 KiB
|
3 years ago | |
|
1.4 KiB
|
3 years ago | |
|
91 B
|
3 years ago | |
|
936 B
|
3 years ago | |
|
21 B
|
3 years ago | |
|
99 KiB
|
3 years ago |