Skip to content

Commit

Permalink
Multi-cherry bug fixes from master (#1890)
Browse files Browse the repository at this point in the history
fix: to avoid zero value for width (#1855)
fix: change confusing error message (#1881)

Signed-off-by: yangxuan <[email protected]>
Co-authored-by: MrPresent-Han <[email protected]>
Co-authored-by: lixinguo <[email protected]>
Co-authored-by: MrPresent-Han <[email protected]>
  • Loading branch information
4 people authored Jan 24, 2024
1 parent d997b4f commit f9dbabc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pymilvus/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,9 @@ class ExceptionsMessage:
PartitionKeyFieldType = "Param partition_key_field must be str type."
PartitionKeyFieldNotExist = "the specified partition key field {%s} not exist"
IsPartitionKeyType = "Param is_partition_key must be bool type."
DataTypeInconsistent = "The data in the same column must be of the same type."
DataTypeInconsistent = (
"The Input data type is inconsistent with defined schema, please check it."
)
DataTypeNotSupport = "Data type is not support."
DataLengthsInconsistent = "Arrays must all be same length."
DataFrameInvalid = "Cannot infer schema from empty dataframe."
Expand Down
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 f9dbabc

Please sign in to comment.