Browse Source
update
Signed-off-by: junjie.jiang <junjie.jiang@zilliz.com>
main
1 changed files with
6 additions and
2 deletions
-
milvus_client.py
|
|
@ -1,5 +1,5 @@ |
|
|
|
from pymilvus import connections, Collection |
|
|
|
from towhee.operator import PyOperator |
|
|
|
from towhee.operator import PyOperator, SharedType |
|
|
|
import uuid |
|
|
|
|
|
|
|
|
|
|
@ -81,6 +81,10 @@ class MilvusClient(PyOperator): |
|
|
|
row.extend([hit.id, hit.score]) |
|
|
|
if 'output_fields' in self.kwargs: |
|
|
|
for k in self.kwargs['output_fields']: |
|
|
|
row.append(hit.entity._row_data[k]) |
|
|
|
row.append(hit.entity.get(k)) |
|
|
|
result.append(row) |
|
|
|
return result |
|
|
|
|
|
|
|
@property |
|
|
|
def shared_type(self): |
|
|
|
return SharedType.Shareable |
|
|
|