diff --git a/internal/core/src/segcore/IndexConfigGenerator.cpp b/internal/core/src/segcore/IndexConfigGenerator.cpp index 94b49a49271e2..686a411cbf753 100644 --- a/internal/core/src/segcore/IndexConfigGenerator.cpp +++ b/internal/core/src/segcore/IndexConfigGenerator.cpp @@ -43,6 +43,15 @@ VecIndexConfig::VecIndexConfig(const int64_t max_index_row_cout, build_params_[knowhere::indexparam::SSIZE] = std::to_string( std::max((int)(config_.get_chunk_rows() / config_.get_nlist()), 48)); + if (is_sparse) { + auto algo_it = index_meta_.GetIndexParams().find( + knowhere::indexparam::INVERTED_INDEX_ALGO); + if (algo_it != index_meta_.GetIndexParams().end()) { + build_params_[knowhere::indexparam::INVERTED_INDEX_ALGO] = + algo_it->second; + } + } + if (is_sparse && metric_type_ == knowhere::metric::BM25) { build_params_[knowhere::meta::BM25_K1] = index_meta_.GetIndexParams().at(knowhere::meta::BM25_K1);