Skip to content

Commit

Permalink
Print all output fields (#1362)
Browse files Browse the repository at this point in the history
Signed-off-by: longjiquan <[email protected]>
  • Loading branch information
longjiquan authored Apr 16, 2023
1 parent ddcc56b commit 5bdef7f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion pymilvus/client/abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,9 @@ def __init__(self, entity_id, entity_row_data, entity_score):
self._distance = entity_score

def __str__(self):
return f"(distance: {self._distance}, score: {self._score}, id: {self._id})"
return str(self.entity)

__repr__ = __str__

@property
def entity(self):
Expand Down
2 changes: 1 addition & 1 deletion pymilvus/orm/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def __str__(self):
:return str:
The information of hit record.
"""
return f"(distance: {self._hit.distance}, id: {self._hit.id})"
return str(self._hit)

__repr__ = __str__

Expand Down

0 comments on commit 5bdef7f

Please sign in to comment.