Restore concurrent vec indexing.

This commit is contained in:
Kishore Nallan 2023-10-05 14:50:54 +05:30
parent b3afb5d12c
commit de6e6e4a8a

View File

@ -841,7 +841,7 @@ void Index::index_field_in_memory(const field& afield, std::vector<index_record>
vec_index->resizeIndex((curr_ele_count + iter_batch.size()) * 1.3);
}
const size_t num_threads = 1; //std::min<size_t>(4, iter_batch.size());
const size_t num_threads = std::min<size_t>(4, iter_batch.size());
const size_t window_size = (num_threads == 0) ? 0 :
(iter_batch.size() + num_threads - 1) / num_threads; // rounds up
size_t num_processed = 0;