mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-02 20:09:57 +08:00
related: #27325 Signed-off-by: MrPresent-Han <chun.han@zilliz.com>
This commit is contained in:
parent
c4dda3c50f
commit
464bc9e8f4
@ -44,10 +44,7 @@ struct SearchResultPair {
|
||||
|
||||
bool
|
||||
operator>(const SearchResultPair& other) const {
|
||||
//according to FLT_EPSILON in cfloat, 0.000000119 is the maximum flaw for float32
|
||||
//we use this to differentiate distances that are too close to each other to maintain the
|
||||
//stable order for reduce
|
||||
if (std::fabs(distance_ - other.distance_) < 0.000000119) {
|
||||
if (std::fabs(distance_ - other.distance_) < 0.0000000119) {
|
||||
return primary_key_ < other.primary_key_;
|
||||
}
|
||||
return distance_ > other.distance_;
|
||||
|
Loading…
Reference in New Issue
Block a user