diff --git a/internal/core/src/index/VectorMemIndex.cpp b/internal/core/src/index/VectorMemIndex.cpp index 1018c4c232..cff4330a12 100644 --- a/internal/core/src/index/VectorMemIndex.cpp +++ b/internal/core/src/index/VectorMemIndex.cpp @@ -638,6 +638,9 @@ void VectorMemIndex::LoadFromFile(const Config& config) { LOG_INFO("load with slice meta: {}", !slice_meta_filepath.empty()); std::chrono::duration load_duration_sum; std::chrono::duration write_disk_duration_sum; + // load files in two parts: + // 1. EMB_LIST_META: Written separately to embedding_list_meta_writer_ptr (if embedding list type) + // 2. All other binaries: Merged and written to file_writer, forming a unified index file for knowhere if (!slice_meta_filepath .empty()) { // load with the slice meta info, then we can load batch by batch std::string index_file_prefix = slice_meta_filepath.substr( @@ -696,7 +699,8 @@ void VectorMemIndex::LoadFromFile(const Config& config) { HandleBatch(slice_num - 1); } } - } else { + } + if (!pending_index_files.empty()) { //1. load files into memory auto start_load_files2_mem = std::chrono::system_clock::now(); auto result = file_manager_->LoadIndexToMemory(