From a82c49ab08dc279d9391870c0c68d0e89f567b2e Mon Sep 17 00:00:00 2001 From: ManyTheFish Date: Thu, 29 Jun 2023 12:02:49 +0200 Subject: [PATCH] Update test --- meilisearch/src/search.rs | 8 +-- .../initial/word_docids.snap | 11 ++-- .../updated/word_docids.snap | 11 ++-- .../always_hard/word_docids.snap | 43 ++++++++-------- .../word_pair_proximity_docids.snap | 21 ++++++++ .../always_soft/word_docids.snap | 50 +++++++++---------- .../word_pair_proximity_docids.snap | 25 ++++++++++ 7 files changed, 111 insertions(+), 58 deletions(-) diff --git a/meilisearch/src/search.rs b/meilisearch/src/search.rs index 7583c75fd..80121d082 100644 --- a/meilisearch/src/search.rs +++ b/meilisearch/src/search.rs @@ -727,10 +727,10 @@ fn extract_field( } } -fn format_fields( +fn format_fields<'a>( document: &Document, field_ids_map: &FieldsIdsMap, - builder: &MatcherBuilder, + builder: &'a MatcherBuilder<'a>, formatted_options: &BTreeMap, compute_matches: bool, displayable_ids: &BTreeSet, @@ -775,9 +775,9 @@ fn format_fields( Ok((matches_position, document)) } -fn format_value( +fn format_value<'a>( value: Value, - builder: &MatcherBuilder, + builder: &'a MatcherBuilder<'a>, format_options: Option, infos: &mut Vec, compute_matches: bool, diff --git a/milli/src/update/index_documents/snapshots/mod.rs/simple_documents_replace/initial/word_docids.snap b/milli/src/update/index_documents/snapshots/mod.rs/simple_documents_replace/initial/word_docids.snap index 5b424356a..6e7876726 100644 --- a/milli/src/update/index_documents/snapshots/mod.rs/simple_documents_replace/initial/word_docids.snap +++ b/milli/src/update/index_documents/snapshots/mod.rs/simple_documents_replace/initial/word_docids.snap @@ -1,18 +1,21 @@ --- source: milli/src/update/index_documents/mod.rs --- +0 [1, ] 1 [2, ] -10.0 [1, ] +10 [1, ] 12 [0, ] 1344 [3, ] 2 [0, ] 23 [5, ] -25.99 [2, ] -3.5 [0, ] +25 [2, ] +3 [0, ] 35 [5, ] 4 [4, ] 42 [0, 5, ] 456 [1, ] +5 [0, ] +99 [2, ] adams [5, ] adventure [1, ] alice [2, ] @@ -29,7 +32,7 @@ galaxy [5, ] guide [5, ] half [4, ] harry [4, ] -hitchhiker' [5, ] +hitchhiker [5, ] hobbit [3, ] in [2, ] j [3, 4, ] diff --git a/milli/src/update/index_documents/snapshots/mod.rs/simple_documents_replace/updated/word_docids.snap b/milli/src/update/index_documents/snapshots/mod.rs/simple_documents_replace/updated/word_docids.snap index 4f4a9e33a..b0ef38b93 100644 --- a/milli/src/update/index_documents/snapshots/mod.rs/simple_documents_replace/updated/word_docids.snap +++ b/milli/src/update/index_documents/snapshots/mod.rs/simple_documents_replace/updated/word_docids.snap @@ -1,19 +1,22 @@ --- source: milli/src/update/index_documents/mod.rs --- +0 [1, 7, ] 1 [2, ] -10.0 [1, 7, ] +10 [1, 7, ] 12 [0, 8, ] 1344 [3, ] 1813 [8, ] 2 [0, 8, ] 23 [5, ] -25.99 [2, ] -3.5 [0, 8, ] +25 [2, ] +3 [0, 8, ] 35 [5, ] 4 [4, 6, ] 42 [0, 5, 8, ] 456 [1, 7, ] +5 [0, 8, ] +99 [2, ] adams [5, ] adventure [1, 7, ] alice [2, ] @@ -31,7 +34,7 @@ galaxy [5, ] guide [5, ] half [4, 6, ] harry [4, 6, ] -hitchhiker' [5, ] +hitchhiker [5, ] hobbit [3, ] in [2, ] j [3, 4, 6, 8, ] diff --git a/milli/src/update/snapshots/delete_documents.rs/filtered_placeholder_search_should_not_return_deleted_documents/always_hard/word_docids.snap b/milli/src/update/snapshots/delete_documents.rs/filtered_placeholder_search_should_not_return_deleted_documents/always_hard/word_docids.snap index d8125dfcf..f8d64e001 100644 --- a/milli/src/update/snapshots/delete_documents.rs/filtered_placeholder_search_should_not_return_deleted_documents/always_hard/word_docids.snap +++ b/milli/src/update/snapshots/delete_documents.rs/filtered_placeholder_search_should_not_return_deleted_documents/always_hard/word_docids.snap @@ -1,27 +1,28 @@ --- source: milli/src/update/delete_documents.rs --- -1_36 [3, ] -1_37 [4, ] -1_38 [5, ] -1_39 [6, ] -1_40 [7, ] -1_41 [8, ] -1_42 [9, ] -1_43 [10, ] -1_44 [11, ] -1_45 [12, ] -1_46 [13, ] -1_47 [14, ] -1_5 [1, ] -1_52 [15, ] -1_57 [16, ] -1_58 [17, ] -1_68 [18, ] -1_69 [19, ] -1_7 [2, ] -1_71 [21, ] -2.2 [21, ] +1 [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, ] +2 [21, ] +36 [3, ] +37 [4, ] +38 [5, ] +39 [6, ] +40 [7, ] +41 [8, ] +42 [9, ] +43 [10, ] +44 [11, ] +45 [12, ] +46 [13, ] +47 [14, ] +5 [1, ] +52 [15, ] +57 [16, ] +58 [17, ] +68 [18, ] +69 [19, ] +7 [2, ] +71 [21, ] abstract [2, 6, 10, 13, 14, 15, 16, 17, ] aquarium [5, ] art [4, 5, 8, 9, 10, 12, 17, ] diff --git a/milli/src/update/snapshots/delete_documents.rs/filtered_placeholder_search_should_not_return_deleted_documents/always_hard/word_pair_proximity_docids.snap b/milli/src/update/snapshots/delete_documents.rs/filtered_placeholder_search_should_not_return_deleted_documents/always_hard/word_pair_proximity_docids.snap index 88031d24a..36add107b 100644 --- a/milli/src/update/snapshots/delete_documents.rs/filtered_placeholder_search_should_not_return_deleted_documents/always_hard/word_pair_proximity_docids.snap +++ b/milli/src/update/snapshots/delete_documents.rs/filtered_placeholder_search_should_not_return_deleted_documents/always_hard/word_pair_proximity_docids.snap @@ -1,4 +1,25 @@ --- source: milli/src/update/delete_documents.rs --- +1 1 36 [3, ] +1 1 37 [4, ] +1 1 38 [5, ] +1 1 39 [6, ] +1 1 40 [7, ] +1 1 41 [8, ] +1 1 42 [9, ] +1 1 43 [10, ] +1 1 44 [11, ] +1 1 45 [12, ] +1 1 46 [13, ] +1 1 47 [14, ] +1 1 5 [1, ] +1 1 52 [15, ] +1 1 57 [16, ] +1 1 58 [17, ] +1 1 68 [18, ] +1 1 69 [19, ] +1 1 7 [2, ] +1 1 71 [21, ] +1 2 2 [21, ] diff --git a/milli/src/update/snapshots/delete_documents.rs/filtered_placeholder_search_should_not_return_deleted_documents/always_soft/word_docids.snap b/milli/src/update/snapshots/delete_documents.rs/filtered_placeholder_search_should_not_return_deleted_documents/always_soft/word_docids.snap index 7909d9b06..972a733e2 100644 --- a/milli/src/update/snapshots/delete_documents.rs/filtered_placeholder_search_should_not_return_deleted_documents/always_soft/word_docids.snap +++ b/milli/src/update/snapshots/delete_documents.rs/filtered_placeholder_search_should_not_return_deleted_documents/always_soft/word_docids.snap @@ -1,31 +1,31 @@ --- source: milli/src/update/delete_documents.rs --- -1.2 [20, 22, ] -1_36 [3, ] -1_37 [4, ] -1_38 [5, ] -1_39 [6, ] -1_4 [0, ] -1_40 [7, ] -1_41 [8, ] -1_42 [9, ] -1_43 [10, ] -1_44 [11, ] -1_45 [12, ] -1_46 [13, ] -1_47 [14, ] -1_5 [1, ] -1_52 [15, ] -1_57 [16, ] -1_58 [17, ] -1_68 [18, ] -1_69 [19, ] -1_7 [2, ] -1_70 [20, ] -1_71 [21, ] -1_72 [22, ] -2.2 [21, ] +1 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, ] +2 [20, 21, 22, ] +36 [3, ] +37 [4, ] +38 [5, ] +39 [6, ] +4 [0, ] +40 [7, ] +41 [8, ] +42 [9, ] +43 [10, ] +44 [11, ] +45 [12, ] +46 [13, ] +47 [14, ] +5 [1, ] +52 [15, ] +57 [16, ] +58 [17, ] +68 [18, ] +69 [19, ] +7 [2, ] +70 [20, ] +71 [21, ] +72 [22, ] abstract [2, 6, 10, 13, 14, 15, 16, 17, ] aquarium [5, ] art [4, 5, 8, 9, 10, 12, 17, ] diff --git a/milli/src/update/snapshots/delete_documents.rs/filtered_placeholder_search_should_not_return_deleted_documents/always_soft/word_pair_proximity_docids.snap b/milli/src/update/snapshots/delete_documents.rs/filtered_placeholder_search_should_not_return_deleted_documents/always_soft/word_pair_proximity_docids.snap index 88031d24a..941838e34 100644 --- a/milli/src/update/snapshots/delete_documents.rs/filtered_placeholder_search_should_not_return_deleted_documents/always_soft/word_pair_proximity_docids.snap +++ b/milli/src/update/snapshots/delete_documents.rs/filtered_placeholder_search_should_not_return_deleted_documents/always_soft/word_pair_proximity_docids.snap @@ -1,4 +1,29 @@ --- source: milli/src/update/delete_documents.rs --- +1 1 2 [20, 22, ] +1 1 36 [3, ] +1 1 37 [4, ] +1 1 38 [5, ] +1 1 39 [6, ] +1 1 4 [0, ] +1 1 40 [7, ] +1 1 41 [8, ] +1 1 42 [9, ] +1 1 43 [10, ] +1 1 44 [11, ] +1 1 45 [12, ] +1 1 46 [13, ] +1 1 47 [14, ] +1 1 5 [1, ] +1 1 52 [15, ] +1 1 57 [16, ] +1 1 58 [17, ] +1 1 68 [18, ] +1 1 69 [19, ] +1 1 7 [2, ] +1 1 70 [20, ] +1 1 71 [21, ] +1 1 72 [22, ] +1 2 2 [21, ]