mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 03:47:02 +02:00
update the autobatcher to batch the addition and deletion together
This commit is contained in:
parent
421a9cf05e
commit
2db6347686
2 changed files with 183 additions and 129 deletions
|
@ -206,7 +206,7 @@ impl IndexScheduler {
|
|||
},
|
||||
must_create_index,
|
||||
})),
|
||||
BatchKind::DocumentImport { method, import_ids, .. } => {
|
||||
BatchKind::DocumentOperation { method, operation_ids: import_ids, .. } => {
|
||||
let tasks = self.get_existing_tasks(rtxn, import_ids)?;
|
||||
let primary_key = match &tasks[0].kind {
|
||||
KindWithContent::DocumentAdditionOrUpdate { primary_key, .. } => {
|
||||
|
@ -322,12 +322,12 @@ impl IndexScheduler {
|
|||
must_create_index,
|
||||
}))
|
||||
}
|
||||
BatchKind::SettingsAndDocumentImport {
|
||||
BatchKind::SettingsAndDocumentOperation {
|
||||
settings_ids,
|
||||
method,
|
||||
allow_index_creation,
|
||||
primary_key,
|
||||
import_ids,
|
||||
operation_ids: import_ids,
|
||||
} => {
|
||||
let settings = self.create_next_batch_index(
|
||||
rtxn,
|
||||
|
@ -339,11 +339,11 @@ impl IndexScheduler {
|
|||
let document_import = self.create_next_batch_index(
|
||||
rtxn,
|
||||
index_uid.clone(),
|
||||
BatchKind::DocumentImport {
|
||||
BatchKind::DocumentOperation {
|
||||
method,
|
||||
allow_index_creation,
|
||||
primary_key,
|
||||
import_ids,
|
||||
operation_ids: import_ids,
|
||||
},
|
||||
must_create_index,
|
||||
)?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue