diff --git a/pymilvus/exceptions.py b/pymilvus/exceptions.py index 28e8c9a83..948e35a8f 100644 --- a/pymilvus/exceptions.py +++ b/pymilvus/exceptions.py @@ -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." diff --git a/pymilvus/orm/iterator.py b/pymilvus/orm/iterator.py index 4b7675bd4..50db692b4 100644 --- a/pymilvus/orm/iterator.py +++ b/pymilvus/orm/iterator.py @@ -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)