milvus-client
copied
1 changed files with 55 additions and 1 deletions
@ -1,2 +1,56 @@ |
|||||
# milvus-client |
|
||||
|
# ANN Insert Operator: MilvusClient |
||||
|
|
||||
|
|
||||
|
<br /> |
||||
|
|
||||
|
|
||||
|
|
||||
|
## Desription |
||||
|
|
||||
|
Insert data into Milvus collections. **Please make sure you have [created Milvus Collection](https://milvus.io/docs/v2.0.x/create_collection.md) before loading the data.** |
||||
|
|
||||
|
<br /> |
||||
|
|
||||
|
|
||||
|
|
||||
|
## Code Example |
||||
|
|
||||
|
### Example |
||||
|
|
||||
|
|
||||
|
```python |
||||
|
import towhee |
||||
|
|
||||
|
from towhee.dc2 import ops |
||||
|
|
||||
|
p = ( |
||||
|
towhee.pipe.inputs('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. |
||||
|
|
||||
|
```python |
||||
|
collection.load() |
||||
|
``` |
||||
|
|
||||
|
<br /> |
||||
|
|
||||
|
|
||||
|
|
||||
|
## Factory Constructor |
||||
|
|
||||
|
Create the operator via the following factory method: |
||||
|
|
||||
|
***ann_insert.milvus_client(collection)*** |
||||
|
|
||||
|
<br /> |
||||
|
|
||||
|
|
||||
|
**Returns:** *None* |
||||
|
Loading…
Reference in new issue