Stop words; Do not reindex all documents if there is no documents

This commit is contained in:
Quentin de Quelen 2019-12-12 15:31:39 +01:00
parent 6edef07e29
commit 88b3c05155

View File

@ -101,14 +101,18 @@ pub fn apply_stop_words_deletion(
// now that we have setup the stop words
// lets reindex everything...
reindex_all_documents(
writer,
main_store,
documents_fields_store,
documents_fields_counts_store,
postings_lists_store,
docs_words_store,
)?;
if let Ok(number) = main_store.number_of_documents(writer) {
if number > 0 {
reindex_all_documents(
writer,
main_store,
documents_fields_store,
documents_fields_counts_store,
postings_lists_store,
docs_words_store,
)?;
}
}
Ok(())
}