Skip to content

Commit

Permalink
Update cardinal diskann mv UT
Browse files Browse the repository at this point in the history
Signed-off-by: chasingegg <chao.gao@zilliz.com>
  • Loading branch information
chasingegg committed Jan 25, 2025
1 parent 65526d0 commit 339a065
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions tests/ut/test_index_check.cc
Original file line number Diff line number Diff line change
Expand Up @@ -483,14 +483,22 @@ TEST_CASE("Test index feature check", "[IndexFeatureCheck]") {
}

SECTION("Check MV") {
// Only HNSW family supports Materialized View
// HNSW family supports Materialized View
REQUIRE(IndexFactory::Instance().FeatureCheck(IndexEnum::INDEX_HNSW, knowhere::feature::MV));
REQUIRE(IndexFactory::Instance().FeatureCheck(IndexEnum::INDEX_HNSW_SQ, knowhere::feature::MV));
REQUIRE(IndexFactory::Instance().FeatureCheck(IndexEnum::INDEX_HNSW_SQ, knowhere::feature::MV));
REQUIRE(IndexFactory::Instance().FeatureCheck(IndexEnum::INDEX_HNSW_SQ, knowhere::feature::MV));
REQUIRE(IndexFactory::Instance().FeatureCheck(IndexEnum::INDEX_HNSW_PQ, knowhere::feature::MV));
REQUIRE(IndexFactory::Instance().FeatureCheck(IndexEnum::INDEX_HNSW_PRQ, knowhere::feature::MV));

#ifdef KNOWHERE_WITH_DISKANN
#ifdef KNOWHERE_WITH_CARDINAL
// cardinal diskann supports mv
REQUIRE(IndexFactory::Instance().FeatureCheck(IndexEnum::INDEX_DISKANN, knowhere::feature::MV));
#else
REQUIRE_FALSE(IndexFactory::Instance().FeatureCheck(IndexEnum::INDEX_DISKANN, knowhere::feature::MV));
#endif
#endif
// All other indexes do not support MV
REQUIRE_FALSE(IndexFactory::Instance().FeatureCheck(IndexEnum::INDEX_FAISS_IDMAP, knowhere::feature::MV));
REQUIRE_FALSE(IndexFactory::Instance().FeatureCheck(IndexEnum::INDEX_FAISS_IVFFLAT, knowhere::feature::MV));
Expand All @@ -510,9 +518,5 @@ TEST_CASE("Test index feature check", "[IndexFeatureCheck]") {
REQUIRE_FALSE(IndexFactory::Instance().FeatureCheck(IndexEnum::INDEX_RAFT_IVFPQ, knowhere::feature::MV));
REQUIRE_FALSE(IndexFactory::Instance().FeatureCheck(IndexEnum::INDEX_RAFT_CAGRA, knowhere::feature::MV));
#endif

#ifdef KNOWHERE_WITH_DISKANN
REQUIRE_FALSE(IndexFactory::Instance().FeatureCheck(IndexEnum::INDEX_DISKANN, knowhere::feature::MV));
#endif
}
}

0 comments on commit 339a065

Please sign in to comment.