From 42c91e47eebf43258294993f0299ad83aee5a727 Mon Sep 17 00:00:00 2001 From: "junjie.jiang" Date: Thu, 15 Dec 2022 17:44:53 +0800 Subject: [PATCH] update readme Signed-off-by: junjie.jiang --- README.md | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 55 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 486e441..39a3ed5 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,56 @@ -# milvus-client +# ANN Insert Operator: MilvusClient + +
+ + + +## 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.** + +
+ + + +## 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() +``` + +
+ + + +## Factory Constructor + +Create the operator via the following factory method: + +***ann_insert.milvus_client(collection)*** + +
+ + +**Returns:** *None*