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 2 years ago

ann-search

ANN Search Operator: MilvusClient

author: junjie.jiangjjj


Desription

Search embedding in Milvus, please make sure you have inserted data to Milvus Collection.


Code Example

Please make sure you have inserted data into Milvus, refer to ann_insert.milvus_client and load the collection to memory.

from towhee.dc2 import pipe, ops

p = pipe.input('vec') \
    .map('vec', ('id', 'score'), ops.ann_search.milvus_client(host='127.0.0.1', port='19530', collection_name='textdb')) \
    .output('id', 'score')

# call pipeline
p(vec_data)
from towhee.dc2 import pipe, ops

# search additional info url:

p = pipe.input('vec') \
    .map('vec', ('id', 'score', 'url'), ops.ann_search.milvus_client(host='127.0.0.1', port='19530', collection_name='textdb', output_fields=['url'])) \
    .output('id', 'score', 'url')


Factory Constructor

Create the operator via the following factory method:

ann_search.milvus_client(host='127.0.0.1', port='19530', collection_name='textdb')


junjie.jiang 944206c02a update 7 Commits
file-icon .gitattributes
1.1 KiB
download-icon
Initial commit 2 years ago
file-icon README.md
1.2 KiB
download-icon
update 2 years ago
file-icon __init__.py
119 B
download-icon
update 2 years ago
file-icon milvus_client.py
3.7 KiB
download-icon
update 2 years ago
file-icon requirements.txt
9 B
download-icon
update 2 years ago