diff --git a/IndexSDK/TestAscendIndexCluster.cpp b/IndexSDK/TestAscendIndexCluster.cpp index 1dadce2aca2de076d6aca8d4ad7505fc75c3e7e9..0b729b35b59fa27f7e0caa85d25c118565790061 100644 --- a/IndexSDK/TestAscendIndexCluster.cpp +++ b/IndexSDK/TestAscendIndexCluster.cpp @@ -65,6 +65,7 @@ int main(int argc, char **argv) auto ret = index.Init(dim, capacity, meticType, deciveList, resourceSize); if (ret != 0) { printf("[ERROR] Init fail ret = %d \r\n", ret); + index.Finalize(); return 1; } @@ -88,11 +89,10 @@ int main(int argc, char **argv) std::vector queryIdArr(nq); std::iota(queryIdArr.begin(), queryIdArr.end(), start); - bool aboveFilter = true; std::vector> resDist(nq); std::vector> resIdx(nq); - ret = index.ComputeDistanceByThreshold(queryIdArr, codeStartIdx, codeNum, threshold, aboveFilter, resDist, resIdx); + ret = index.ComputeDistanceByThreshold(queryIdArr, codeStartIdx, codeNum, threshold, true, resDist, resIdx); if (ret != 0) { printf("[ERROR] ComputeDistanceByThreshold fail ret = %d \r\n", ret); index.Finalize();