From 48e8cd36c2042650e16c3c3c44b180e0785e3402 Mon Sep 17 00:00:00 2001 From: "shengjun.li" <49774184+shengjun1985@users.noreply.github.com> Date: Sat, 20 Jun 2020 14:06:05 +0800 Subject: [PATCH] Fix HNSW and RNSG index files size (#2618) Signed-off-by: shengjun.li --- CHANGELOG.md | 1 + .../index/knowhere/knowhere/index/vector_index/IndexHNSW.cpp | 2 +- .../src/index/knowhere/knowhere/index/vector_index/IndexNSG.cpp | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3639176fe3..7fda770987 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ Please mark all change in change log and use the issue from GitHub - \#2578 Result count doesn't match target vectors count - \#2557 fix random crash of INSERT_DUPLICATE_ID case - \#2598 fix Milvus docker image report illegal instruction +- \#2617 Fix HNSW and RNSG index files size ## Feature diff --git a/core/src/index/knowhere/knowhere/index/vector_index/IndexHNSW.cpp b/core/src/index/knowhere/knowhere/index/vector_index/IndexHNSW.cpp index 045ea60375..758ef74a77 100644 --- a/core/src/index/knowhere/knowhere/index/vector_index/IndexHNSW.cpp +++ b/core/src/index/knowhere/knowhere/index/vector_index/IndexHNSW.cpp @@ -49,7 +49,7 @@ IndexHNSW::Serialize(const Config& config) { std::shared_ptr data(writer.data_); BinarySet res_set; - res_set.Append("HNSW", data, writer.total); + res_set.Append("HNSW", data, writer.rp); return res_set; } catch (std::exception& e) { KNOWHERE_THROW_MSG(e.what()); diff --git a/core/src/index/knowhere/knowhere/index/vector_index/IndexNSG.cpp b/core/src/index/knowhere/knowhere/index/vector_index/IndexNSG.cpp index a9f8582701..301306b645 100644 --- a/core/src/index/knowhere/knowhere/index/vector_index/IndexNSG.cpp +++ b/core/src/index/knowhere/knowhere/index/vector_index/IndexNSG.cpp @@ -47,7 +47,7 @@ NSG::Serialize(const Config& config) { std::shared_ptr data(writer.data_); BinarySet res_set; - res_set.Append("NSG", data, writer.total); + res_set.Append("NSG", data, writer.rp); return res_set; } catch (std::exception& e) { KNOWHERE_THROW_MSG(e.what());