diff --git a/core/src/db/engine/ExecutionEngine.h b/core/src/db/engine/ExecutionEngine.h index d2647ea6c8..0672be014d 100644 --- a/core/src/db/engine/ExecutionEngine.h +++ b/core/src/db/engine/ExecutionEngine.h @@ -53,11 +53,10 @@ enum class EngineType { }; static std::map s_map_engine_type = { - {"FLAT", EngineType::FAISS_IDMAP}, {"IVFFLAT", EngineType::FAISS_IVFFLAT}, {"IVFSQ8", EngineType::FAISS_IVFSQ8}, - {"RNSG", EngineType::NSG_MIX}, {"IVFSQ8H", EngineType::FAISS_IVFSQ8H}, {"IVFPQ", EngineType::FAISS_PQ}, - {"SPTAGKDT", EngineType::SPTAG_KDT}, {"SPTAGBKT", EngineType::SPTAG_BKT}, {"HNSW", EngineType::HNSW}, - {"ANNOY", EngineType::ANNOY}, -}; + {"FLAT", EngineType::FAISS_IDMAP}, {"IVFFLAT", EngineType::FAISS_IVFFLAT}, {"IVFSQ8", EngineType::FAISS_IVFSQ8}, + {"RNSG", EngineType::NSG_MIX}, {"IVFSQ8H", EngineType::FAISS_IVFSQ8H}, {"IVFPQ", EngineType::FAISS_PQ}, + {"SPTAGKDT", EngineType::SPTAG_KDT}, {"SPTAGBKT", EngineType::SPTAG_BKT}, {"HNSW", EngineType::HNSW}, + {"ANNOY", EngineType::ANNOY}, {"IVFSQ8NR", EngineType::FAISS_IVFSQ8NR}}; enum class MetricType { L2 = 1, // Euclidean Distance diff --git a/core/src/db/engine/ExecutionEngineImpl.cpp b/core/src/db/engine/ExecutionEngineImpl.cpp index 62474b69f4..2493d39237 100644 --- a/core/src/db/engine/ExecutionEngineImpl.cpp +++ b/core/src/db/engine/ExecutionEngineImpl.cpp @@ -209,6 +209,10 @@ ExecutionEngineImpl::CreatetVecIndex(EngineType type) { index = vec_index_factory.CreateVecIndex(knowhere::IndexEnum::INDEX_FAISS_IVFSQ8, mode); break; } + case EngineType::FAISS_IVFSQ8NR: { + index = vec_index_factory.CreateVecIndex(knowhere::IndexEnum::INDEX_FAISS_IVFSQ8NR, mode); + break; + } #ifdef MILVUS_GPU_VERSION case EngineType::FAISS_IVFSQ8H: { index = vec_index_factory.CreateVecIndex(knowhere::IndexEnum::INDEX_FAISS_IVFSQ8H, mode); diff --git a/core/src/server/ValidationUtil.cpp b/core/src/server/ValidationUtil.cpp index e8f4a5b3bf..76388ef619 100644 --- a/core/src/server/ValidationUtil.cpp +++ b/core/src/server/ValidationUtil.cpp @@ -182,6 +182,7 @@ ValidateIndexParams(const milvus::json& index_params, const engine::meta::Collec } case (int32_t)engine::EngineType::FAISS_IVFFLAT: case (int32_t)engine::EngineType::FAISS_IVFSQ8: + case (int32_t)engine::EngineType::FAISS_IVFSQ8NR: case (int32_t)engine::EngineType::FAISS_IVFSQ8H: case (int32_t)engine::EngineType::FAISS_BIN_IVFFLAT: { auto status = CheckParameterRange(index_params, knowhere::IndexParams::nlist, 1, 999999); @@ -279,6 +280,7 @@ ValidateSearchParams(const milvus::json& search_params, const engine::meta::Coll } case (int32_t)engine::EngineType::FAISS_IVFFLAT: case (int32_t)engine::EngineType::FAISS_IVFSQ8: + case (int32_t)engine::EngineType::FAISS_IVFSQ8NR: case (int32_t)engine::EngineType::FAISS_IVFSQ8H: case (int32_t)engine::EngineType::FAISS_BIN_IVFFLAT: case (int32_t)engine::EngineType::FAISS_PQ: { diff --git a/core/src/server/web_impl/Constants.h b/core/src/server/web_impl/Constants.h index 474b2e4e67..e8016cad6d 100644 --- a/core/src/server/web_impl/Constants.h +++ b/core/src/server/web_impl/Constants.h @@ -23,6 +23,7 @@ namespace web { extern const char* NAME_ENGINE_TYPE_FLAT; extern const char* NAME_ENGINE_TYPE_IVFFLAT; extern const char* NAME_ENGINE_TYPE_IVFSQ8; +extern const char* NAME_ENGINE_TYPE_IVFSQ8NR; extern const char* NAME_ENGINE_TYPE_IVFSQ8H; extern const char* NAME_ENGINE_TYPE_RNSG; extern const char* NAME_ENGINE_TYPE_IVFPQ; diff --git a/sdk/examples/utils/Utils.cpp b/sdk/examples/utils/Utils.cpp index 83fb1a4e1d..831b2ac620 100644 --- a/sdk/examples/utils/Utils.cpp +++ b/sdk/examples/utils/Utils.cpp @@ -115,6 +115,8 @@ Utils::IndexTypeName(const milvus::IndexType& index_type) { return "HNSW"; case milvus::IndexType::ANNOY: return "ANNOY"; + case milvus::IndexType::IVFSQ8NR: + return "IVFSQ8NR"; default: return "Unknown index type"; } diff --git a/sdk/include/MilvusApi.h b/sdk/include/MilvusApi.h index 657ac8bbb7..2f250d2a1a 100644 --- a/sdk/include/MilvusApi.h +++ b/sdk/include/MilvusApi.h @@ -39,6 +39,7 @@ enum class IndexType { SPTAGBKT = 8, HNSW = 11, ANNOY = 12, + IVFSQ8NR = 13, }; enum class MetricType {