mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-22 10:07:40 +08:00
One more
This commit is contained in:
parent
01b27e40ad
commit
fe04e51a49
@ -3110,12 +3110,16 @@ mod tests {
|
|||||||
]),
|
]),
|
||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
wtxn.commit().unwrap();
|
||||||
|
|
||||||
|
let mut wtxn = index.write_txn().unwrap();
|
||||||
let deleted_external_ids = ["1_7", "1_52"];
|
let deleted_external_ids = ["1_7", "1_52"];
|
||||||
let deleted_internal_ids = delete_documents(&mut wtxn, &index, &deleted_external_ids);
|
let deleted_internal_ids = delete_documents(&mut wtxn, &index, &deleted_external_ids);
|
||||||
|
wtxn.commit().unwrap();
|
||||||
|
|
||||||
|
let rtxn = index.read_txn().unwrap();
|
||||||
// list all documents
|
// list all documents
|
||||||
let results = index.all_documents(&wtxn).unwrap();
|
let results = index.all_documents(&rtxn).unwrap();
|
||||||
for result in results {
|
for result in results {
|
||||||
let (id, _) = result.unwrap();
|
let (id, _) = result.unwrap();
|
||||||
assert!(
|
assert!(
|
||||||
@ -3126,7 +3130,7 @@ mod tests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// list internal document ids
|
// list internal document ids
|
||||||
let results = index.documents_ids(&wtxn).unwrap();
|
let results = index.documents_ids(&rtxn).unwrap();
|
||||||
for id in results {
|
for id in results {
|
||||||
assert!(
|
assert!(
|
||||||
!deleted_internal_ids.contains(&id),
|
!deleted_internal_ids.contains(&id),
|
||||||
@ -3134,9 +3138,6 @@ mod tests {
|
|||||||
id
|
id
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
wtxn.commit().unwrap();
|
|
||||||
|
|
||||||
let rtxn = index.read_txn().unwrap();
|
|
||||||
|
|
||||||
// get internal docids from deleted external document ids
|
// get internal docids from deleted external document ids
|
||||||
let results = index.external_documents_ids();
|
let results = index.external_documents_ids();
|
||||||
|
Loading…
Reference in New Issue
Block a user