mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-29 06:55:27 +08:00
[skip ci] Fix mishards query result reduce error (#3256)
Signed-off-by: yinghao.zou <yinghao.zou@zilliz.com>
This commit is contained in:
parent
43c272fd13
commit
8a239355e3
@ -27,7 +27,8 @@ class ServiceHandler(milvus_pb2_grpc.MilvusServiceServicer):
|
||||
self.max_workers = max_workers
|
||||
|
||||
def _reduce(self, source_ids, ids, source_diss, diss, k, reverse):
|
||||
sort_f = lambda x, y: x >= y if reverse else lambda x, y: x <= y
|
||||
sort_f = (lambda x, y: x >= y) if reverse else (lambda x, y: x <= y)
|
||||
|
||||
if sort_f(source_diss[k - 1], diss[0]):
|
||||
return source_ids, source_diss
|
||||
if sort_f(diss[k - 1], source_diss[0]):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user