mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
Remove soft deleted ids from ExternalDocumentIds during document import
If the document import replaces a document using hard deletion
This commit is contained in:
parent
bebd050961
commit
e3ee553dcc
3 changed files with 42 additions and 10 deletions
|
@ -2166,17 +2166,25 @@ pub(crate) mod tests {
|
|||
db_snap!(index, external_documents_ids, 2, @r###"
|
||||
soft:
|
||||
hard:
|
||||
3 0
|
||||
4 3
|
||||
5 2
|
||||
"###);
|
||||
db_snap!(index, soft_deleted_documents_ids, 2, @"[]");
|
||||
|
||||
// boom
|
||||
index
|
||||
.add_documents(documents!([
|
||||
{ "primary_key": "3" },
|
||||
]))
|
||||
.unwrap();
|
||||
|
||||
db_snap!(index, documents_ids, @"[0, 2, 3, ]");
|
||||
db_snap!(index, external_documents_ids, 2, @r###"
|
||||
soft:
|
||||
hard:
|
||||
3 0
|
||||
4 3
|
||||
5 2
|
||||
"###);
|
||||
db_snap!(index, soft_deleted_documents_ids, 2, @"[]");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue