This repository has been archived by the owner on Apr 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
720: Make soft deletion optional in document addition and deletion + add lots of tests r=irevoire a=loiclec # Pull Request ## What does this PR do? When debugging recent issues, I created a few unit tests in the hopes reproducing the bugs I was looking for. In the end, I didn't find any, but I thought it would still be good to keep those tests. More importantly, I added a field to the `DeleteDocuments` and `IndexDocuments` builders, called `disable_soft_deletion`. If set to `true`, the indexing/deletion will never add documents to the `soft_deleted_documents_ids` and instead perform a real deletion of the documents from the databases. For the new tests, I have: - Improved the insta-snapshot format of the `external_documents_ids` structure - Added more tests for the facet DB indexing, deletion, and search algorithms, making sure to test them when the facet DB contains strings (instead of numbers) as well. - Added more tests for the incremental indexing of the prefix proximity databases. For example, to see if documents are replaced correctly and if common prefixes are deleted correctly. - Added tests that mix soft deletion and hard deletion, including when processing batches of document updates. Co-authored-by: Loïc Lecrenier <loic.lecrenier@me.com>
- Loading branch information
Showing
91 changed files
with
2,724 additions
and
64 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
33 changes: 33 additions & 0 deletions
33
...facet/snapshots/facet_sort_ascending.rs/filter_sort_ascending_multiple_field_ids/0-0.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
source: milli/src/search/facet/facet_sort_ascending.rs | ||
--- | ||
[201, 203, 205, 207, 209, 211, 213, 215, 217, 219, 221, 223, 225, 227, 229, 231, 233, 235, 237, 239, 241, 243, 245, 247, 249, 251, 253, 255, ] | ||
[200, ] | ||
[202, ] | ||
[204, ] | ||
[206, ] | ||
[208, ] | ||
[210, ] | ||
[212, ] | ||
[214, ] | ||
[216, ] | ||
[218, ] | ||
[220, ] | ||
[222, ] | ||
[224, ] | ||
[226, ] | ||
[228, ] | ||
[230, ] | ||
[232, ] | ||
[234, ] | ||
[236, ] | ||
[238, ] | ||
[240, ] | ||
[242, ] | ||
[244, ] | ||
[246, ] | ||
[248, ] | ||
[250, ] | ||
[252, ] | ||
[254, ] | ||
|
33 changes: 33 additions & 0 deletions
33
...facet/snapshots/facet_sort_ascending.rs/filter_sort_ascending_multiple_field_ids/0-1.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
source: milli/src/search/facet/facet_sort_ascending.rs | ||
--- | ||
[201, 203, 205, 207, 209, 211, 213, 215, 217, 219, 221, 223, 225, 227, 229, 231, 233, 235, 237, 239, 241, 243, 245, 247, 249, 251, 253, 255, ] | ||
[200, ] | ||
[202, ] | ||
[204, ] | ||
[206, ] | ||
[208, ] | ||
[210, ] | ||
[212, ] | ||
[214, ] | ||
[216, ] | ||
[218, ] | ||
[220, ] | ||
[222, ] | ||
[224, ] | ||
[226, ] | ||
[228, ] | ||
[230, ] | ||
[232, ] | ||
[234, ] | ||
[236, ] | ||
[238, ] | ||
[240, ] | ||
[242, ] | ||
[244, ] | ||
[246, ] | ||
[248, ] | ||
[250, ] | ||
[252, ] | ||
[254, ] | ||
|
27 changes: 27 additions & 0 deletions
27
...facet/snapshots/facet_sort_ascending.rs/filter_sort_ascending_multiple_field_ids/1-0.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
source: milli/src/search/facet/facet_sort_ascending.rs | ||
--- | ||
[201, 203, 205, 207, 209, 211, 215, 219, 223, 231, 233, 235, 237, 239, 241, 243, 247, 263, 267, 269, 273, 277, 279, 281, 289, 293, 295, 297, ] | ||
[202, ] | ||
[224, ] | ||
[230, ] | ||
[236, ] | ||
[244, ] | ||
[250, ] | ||
[256, ] | ||
[258, ] | ||
[260, ] | ||
[262, ] | ||
[264, ] | ||
[278, ] | ||
[282, ] | ||
[286, ] | ||
[292, ] | ||
[206, ] | ||
[208, ] | ||
[210, ] | ||
[216, ] | ||
[220, ] | ||
[226, ] | ||
[238, ] | ||
|
Oops, something went wrong.