diff --git a/include/knowhere/comp/knowhere_check.h b/include/knowhere/comp/knowhere_check.h index 5f2db1764..1499a7f34 100644 --- a/include/knowhere/comp/knowhere_check.h +++ b/include/knowhere/comp/knowhere_check.h @@ -31,7 +31,8 @@ IndexTypeAndDataTypeCheck(const std::string& index_name, VecType data_type) { case VecType::VECTOR_FLOAT16: return index_factory.HasIndex(index_name); case VecType::VECTOR_SPARSE_FLOAT: - if (index_name != IndexEnum::INDEX_SPARSE_INVERTED_INDEX && index_name != IndexEnum::INDEX_SPARSE_WAND) { + if (index_name != IndexEnum::INDEX_SPARSE_INVERTED_INDEX && index_name != IndexEnum::INDEX_SPARSE_WAND && + index_name != IndexEnum::INDEX_HNSW) { return false; } else { return index_factory.HasIndex(index_name);