From 062fa7e2c1535bce1741857b2d1ecb715f5316ca Mon Sep 17 00:00:00 2001 From: "junjie.jiang" Date: Thu, 15 Dec 2022 15:01:23 +0800 Subject: [PATCH] update Signed-off-by: junjie.jiang --- milvus_client.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/milvus_client.py b/milvus_client.py index 33d5792..223c6c1 100644 --- a/milvus_client.py +++ b/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