mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 20:07:09 +02:00
Merge #616
616: Introduce an indexation abortion function when indexing documents r=Kerollmops a=Kerollmops Co-authored-by: Kerollmops <clement@meilisearch.com> Co-authored-by: Clément Renault <clement@meilisearch.com>
This commit is contained in:
commit
c8f16530d5
14 changed files with 414 additions and 136 deletions
|
@ -239,7 +239,7 @@ impl Performer for DocumentAddition {
|
|||
if let Some(primary) = self.primary {
|
||||
let mut builder = update::Settings::new(&mut txn, &index, &config);
|
||||
builder.set_primary_key(primary);
|
||||
builder.execute(|_| ()).unwrap();
|
||||
builder.execute(|_| (), || false).unwrap();
|
||||
}
|
||||
|
||||
let indexing_config = IndexDocumentsConfig {
|
||||
|
@ -260,6 +260,7 @@ impl Performer for DocumentAddition {
|
|||
&config,
|
||||
indexing_config,
|
||||
|step| indexing_callback(step, &bars),
|
||||
|| false,
|
||||
)
|
||||
.unwrap();
|
||||
let (addition, user_error) = addition.add_documents(reader)?;
|
||||
|
@ -517,7 +518,7 @@ impl Performer for SettingsUpdate {
|
|||
bars.push(bar);
|
||||
}
|
||||
|
||||
update.execute(|step| indexing_callback(step, &bars))?;
|
||||
update.execute(|step| indexing_callback(step, &bars), || false)?;
|
||||
|
||||
txn.commit()?;
|
||||
Ok(())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue