diff --git a/include/knowhere/index/index.h b/include/knowhere/index/index.h index 7bbb22ec4..205147208 100644 --- a/include/knowhere/index/index.h +++ b/include/knowhere/index/index.h @@ -174,7 +174,7 @@ class Index { HasRawData(const std::string& metric_type) const; bool - IsAdditionalScalarSupported() const; + IsAdditionalScalarSupported(bool is_mv_only) const; expected GetIndexMeta(const Json& json) const; diff --git a/include/knowhere/index/index_node.h b/include/knowhere/index/index_node.h index 829669970..b40e936ca 100644 --- a/include/knowhere/index/index_node.h +++ b/include/knowhere/index/index_node.h @@ -350,7 +350,7 @@ class IndexNode : public Object { HasRawData(const std::string& metric_type) const = 0; virtual bool - IsAdditionalScalarSupported() const { + IsAdditionalScalarSupported(bool is_mv_only) const { return false; } diff --git a/src/index/hnsw/faiss_hnsw.cc b/src/index/hnsw/faiss_hnsw.cc index 4359da6c4..86e0837e4 100644 --- a/src/index/hnsw/faiss_hnsw.cc +++ b/src/index/hnsw/faiss_hnsw.cc @@ -68,8 +68,11 @@ class BaseFaissIndexNode : public IndexNode { } bool - IsAdditionalScalarSupported() const override { - return true; + IsAdditionalScalarSupported(bool is_mv_only) const override { + if (is_mv_only) { + return true; + } + return false; } // @@ -1845,11 +1848,11 @@ class HNSWIndexNodeWithFallback : public IndexNode { } bool - IsAdditionalScalarSupported() const override { + IsAdditionalScalarSupported(bool is_mv_only) const override { if (use_base_index) { - return base_index->IsAdditionalScalarSupported(); + return base_index->IsAdditionalScalarSupported(is_mv_only); } else { - return fallback_search_index->IsAdditionalScalarSupported(); + return fallback_search_index->IsAdditionalScalarSupported(is_mv_only); } } diff --git a/src/index/index.cc b/src/index/index.cc index d6da77f63..a0f9a7b3d 100644 --- a/src/index/index.cc +++ b/src/index/index.cc @@ -277,8 +277,8 @@ Index::HasRawData(const std::string& metric_type) const { template inline bool -Index::IsAdditionalScalarSupported() const { - return this->node->IsAdditionalScalarSupported(); +Index::IsAdditionalScalarSupported(bool is_mv_only) const { + return this->node->IsAdditionalScalarSupported(is_mv_only); } template