From 5953f05015a24487607319698c0b769a3187020d Mon Sep 17 00:00:00 2001 From: groot Date: Sat, 6 Jun 2020 13:03:06 +0800 Subject: [PATCH] default nlist 2048 (#2498) Signed-off-by: groot --- core/src/db/Types.h | 2 +- core/src/db/meta/MetaTypes.h | 1 - core/src/utils/ValidationUtil.cpp | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/core/src/db/Types.h b/core/src/db/Types.h index 4ef38f0e..8ad2c4df 100644 --- a/core/src/db/Types.h +++ b/core/src/db/Types.h @@ -39,7 +39,7 @@ typedef std::vector ResultDistances; struct CollectionIndex { int32_t engine_type_ = (int)EngineType::FAISS_IDMAP; int32_t metric_type_ = (int)MetricType::L2; - milvus::json extra_params_ = {{"nlist", 16384}}; + milvus::json extra_params_ = {{"nlist", 2048}}; }; struct VectorsData { diff --git a/core/src/db/meta/MetaTypes.h b/core/src/db/meta/MetaTypes.h index fff6d74a..e9887690 100644 --- a/core/src/db/meta/MetaTypes.h +++ b/core/src/db/meta/MetaTypes.h @@ -25,7 +25,6 @@ namespace engine { namespace meta { constexpr int32_t DEFAULT_ENGINE_TYPE = (int)EngineType::FAISS_IDMAP; -constexpr int32_t DEFAULT_NLIST = 16384; constexpr int32_t DEFAULT_METRIC_TYPE = (int)MetricType::L2; constexpr int32_t DEFAULT_INDEX_FILE_SIZE = GB; constexpr char CURRENT_VERSION[] = MILVUS_VERSION; diff --git a/core/src/utils/ValidationUtil.cpp b/core/src/utils/ValidationUtil.cpp index 71415714..caa4e21a 100644 --- a/core/src/utils/ValidationUtil.cpp +++ b/core/src/utils/ValidationUtil.cpp @@ -112,7 +112,7 @@ ValidationUtil::ValidateCollectionName(const std::string& collection_name) { } std::string invalid_msg = "Invalid collection name: " + collection_name + ". "; - // Collection name size shouldn't exceed 16384. + // Collection name size shouldn't exceed 255. if (collection_name.size() > COLLECTION_NAME_SIZE_LIMIT) { std::string msg = invalid_msg + "The length of a collection name must be less than 255 characters."; LOG_SERVER_ERROR_ << msg; @@ -426,7 +426,7 @@ ValidationUtil::ValidatePartitionName(const std::string& partition_name) { } std::string invalid_msg = "Invalid partition name: " + partition_name + ". "; - // Collection name size shouldn't exceed 16384. + // Collection name size shouldn't exceed 255. if (partition_name.size() > COLLECTION_NAME_SIZE_LIMIT) { std::string msg = invalid_msg + "The length of a partition name must be less than 255 characters."; LOG_SERVER_ERROR_ << msg; -- GitLab