Introduce an indexation abortion function when indexing documents

This commit is contained in:
Kerollmops
2022-10-05 17:41:07 +02:00
parent fad0de4581
commit 6603437cb1
14 changed files with 379 additions and 136 deletions

View File

@ -23,13 +23,14 @@ fn test_facet_distribution_with_no_facet_values() {
S("genres"),
S("tags"),
});
builder.execute(|_| ()).unwrap();
builder.execute(|_| (), || false).unwrap();
// index documents
let config = IndexerConfig { max_memory: Some(10 * 1024 * 1024), ..Default::default() };
let indexing_config = IndexDocumentsConfig { autogenerate_docids: true, ..Default::default() };
let builder = IndexDocuments::new(&mut wtxn, &index, &config, indexing_config, |_| ()).unwrap();
let builder =
IndexDocuments::new(&mut wtxn, &index, &config, indexing_config, |_| (), || false).unwrap();
let mut documents_builder = DocumentsBatchBuilder::new(Vec::new());
let reader = Cursor::new(
r#"{