Skip to content

Commit

Permalink
fix: to avoid zero value for width (#1855)
Browse files Browse the repository at this point in the history
Signed-off-by: MrPresent-Han <[email protected]>
  • Loading branch information
MrPresent-Han authored Jan 9, 2024
1 parent fedcd12 commit da7c3b7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pymilvus/orm/iterator.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,9 @@ def __update_width(self, page: SearchPage):
self._width = last_hit.distance - first_hit.distance
else:
self._width = first_hit.distance - last_hit.distance
if self._width == 0.0:
self._width = 0.05
# enable a minimum value for width to avoid radius and range_filter equal error

def __set_up_range_parameters(self, page: SearchPage):
self.__update_width(page)
Expand Down

0 comments on commit da7c3b7

Please sign in to comment.