mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 11:57:07 +02:00
Introduce an indexation abortion function when indexing documents
This commit is contained in:
parent
fad0de4581
commit
6603437cb1
14 changed files with 379 additions and 136 deletions
|
@ -86,7 +86,7 @@ pub fn base_setup(conf: &Conf) -> Index {
|
|||
|
||||
(conf.configure)(&mut builder);
|
||||
|
||||
builder.execute(|_| ()).unwrap();
|
||||
builder.execute(|_| (), || false).unwrap();
|
||||
wtxn.commit().unwrap();
|
||||
|
||||
let config = IndexerConfig::default();
|
||||
|
@ -96,7 +96,8 @@ pub fn base_setup(conf: &Conf) -> Index {
|
|||
update_method: IndexDocumentsMethod::ReplaceDocuments,
|
||||
..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 documents = documents_from(conf.dataset, conf.dataset_format);
|
||||
let (builder, user_error) = builder.add_documents(documents).unwrap();
|
||||
user_error.unwrap();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue