From 55cd7738b90889230879eff7cf3cb793176b5f7c Mon Sep 17 00:00:00 2001 From: Louis Dureuil Date: Tue, 4 Jul 2023 15:54:08 +0200 Subject: [PATCH] Update snapshots --- ...sts__exactness__exactness_after_words.snap | 144 +++++++++--------- ...s__exactness_all_candidates_with_typo.snap | 40 ++--- ...ctness_attribute_starts_with_phrase-3.snap | 48 +++--- ...xactness_attribute_starts_with_phrase.snap | 32 ++-- ...xactness_attribute_starts_with_simple.snap | 24 +-- ...ollowed_by_typo_prefer_no_typo_prefix.snap | 40 ++--- ...__exactness__exactness_simple_ordered.snap | 72 ++++----- ...s__exactness__exactness_simple_random.snap | 48 +++--- ...xactness__exactness_simple_reversed-3.snap | 56 +++---- ..._exactness__exactness_simple_reversed.snap | 56 +++---- ...xactness__proximity_after_exactness-4.snap | 24 +-- ..._exactness__proximity_after_exactness.snap | 72 ++++----- ...exactness__typo_followed_by_exactness.snap | 32 ++-- ...sts__exactness__words_after_exactness.snap | 144 +++++++++--------- ...s__stop_words__stop_words_in_phrase-6.snap | 24 +-- milli/src/search/new/tests/stop_words.rs | 56 +++---- 16 files changed, 456 insertions(+), 456 deletions(-) diff --git a/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__exactness_after_words.snap b/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__exactness_after_words.snap index ef95520bb..5463f0db5 100644 --- a/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__exactness_after_words.snap +++ b/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__exactness_after_words.snap @@ -15,10 +15,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( ExactMatch, ), - Exactness( - Rank { - rank: 10, - max_rank: 10, + ExactWords( + ExactWords { + matching_words: 9, + max_matching_words: 9, }, ), ], @@ -35,10 +35,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 7, - max_rank: 10, + ExactWords( + ExactWords { + matching_words: 6, + max_matching_words: 9, }, ), ], @@ -55,10 +55,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( ExactMatch, ), - Exactness( - Rank { - rank: 9, - max_rank: 9, + ExactWords( + ExactWords { + matching_words: 8, + max_matching_words: 8, }, ), ], @@ -75,10 +75,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 6, - max_rank: 9, + ExactWords( + ExactWords { + matching_words: 5, + max_matching_words: 8, }, ), ], @@ -95,10 +95,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( ExactMatch, ), - Exactness( - Rank { - rank: 8, - max_rank: 8, + ExactWords( + ExactWords { + matching_words: 7, + max_matching_words: 7, }, ), ], @@ -115,10 +115,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 8, - max_rank: 8, + ExactWords( + ExactWords { + matching_words: 7, + max_matching_words: 7, }, ), ], @@ -135,10 +135,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 5, - max_rank: 8, + ExactWords( + ExactWords { + matching_words: 4, + max_matching_words: 7, }, ), ], @@ -155,10 +155,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 5, - max_rank: 8, + ExactWords( + ExactWords { + matching_words: 4, + max_matching_words: 7, }, ), ], @@ -175,10 +175,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( ExactMatch, ), - Exactness( - Rank { - rank: 6, - max_rank: 6, + ExactWords( + ExactWords { + matching_words: 5, + max_matching_words: 5, }, ), ], @@ -195,10 +195,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 3, - max_rank: 6, + ExactWords( + ExactWords { + matching_words: 2, + max_matching_words: 5, }, ), ], @@ -215,10 +215,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( ExactMatch, ), - Exactness( - Rank { - rank: 5, - max_rank: 5, + ExactWords( + ExactWords { + matching_words: 4, + max_matching_words: 4, }, ), ], @@ -235,10 +235,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 3, - max_rank: 5, + ExactWords( + ExactWords { + matching_words: 2, + max_matching_words: 4, }, ), ], @@ -255,10 +255,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( ExactMatch, ), - Exactness( - Rank { - rank: 4, - max_rank: 4, + ExactWords( + ExactWords { + matching_words: 3, + max_matching_words: 3, }, ), ], @@ -275,10 +275,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 2, - max_rank: 4, + ExactWords( + ExactWords { + matching_words: 1, + max_matching_words: 3, }, ), ], @@ -295,10 +295,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( ExactMatch, ), - Exactness( - Rank { - rank: 3, - max_rank: 3, + ExactWords( + ExactWords { + matching_words: 2, + max_matching_words: 2, }, ), ], @@ -315,10 +315,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 2, - max_rank: 3, + ExactWords( + ExactWords { + matching_words: 1, + max_matching_words: 2, }, ), ], @@ -335,10 +335,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( ExactMatch, ), - Exactness( - Rank { - rank: 2, - max_rank: 2, + ExactWords( + ExactWords { + matching_words: 1, + max_matching_words: 1, }, ), ], @@ -355,10 +355,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( ExactMatch, ), - Exactness( - Rank { - rank: 2, - max_rank: 2, + ExactWords( + ExactWords { + matching_words: 1, + max_matching_words: 1, }, ), ], diff --git a/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__exactness_all_candidates_with_typo.snap b/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__exactness_all_candidates_with_typo.snap index d48bf9933..bf3d9c403 100644 --- a/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__exactness_all_candidates_with_typo.snap +++ b/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__exactness_all_candidates_with_typo.snap @@ -15,10 +15,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 7, - max_rank: 8, + ExactWords( + ExactWords { + matching_words: 6, + max_matching_words: 7, }, ), ], @@ -35,10 +35,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 7, - max_rank: 8, + ExactWords( + ExactWords { + matching_words: 6, + max_matching_words: 7, }, ), ], @@ -55,10 +55,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 7, - max_rank: 8, + ExactWords( + ExactWords { + matching_words: 6, + max_matching_words: 7, }, ), ], @@ -75,10 +75,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 4, - max_rank: 5, + ExactWords( + ExactWords { + matching_words: 3, + max_matching_words: 4, }, ), ], @@ -95,10 +95,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 1, - max_rank: 2, + ExactWords( + ExactWords { + matching_words: 0, + max_matching_words: 1, }, ), ], diff --git a/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__exactness_attribute_starts_with_phrase-3.snap b/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__exactness_attribute_starts_with_phrase-3.snap index 991ff4cee..d1b24fcec 100644 --- a/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__exactness_attribute_starts_with_phrase-3.snap +++ b/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__exactness_attribute_starts_with_phrase-3.snap @@ -15,10 +15,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( ExactMatch, ), - Exactness( - Rank { - rank: 8, - max_rank: 8, + ExactWords( + ExactWords { + matching_words: 7, + max_matching_words: 7, }, ), ], @@ -35,10 +35,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( MatchesStart, ), - Exactness( - Rank { - rank: 8, - max_rank: 8, + ExactWords( + ExactWords { + matching_words: 7, + max_matching_words: 7, }, ), ], @@ -55,10 +55,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 8, - max_rank: 8, + ExactWords( + ExactWords { + matching_words: 7, + max_matching_words: 7, }, ), ], @@ -75,10 +75,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 7, - max_rank: 8, + ExactWords( + ExactWords { + matching_words: 6, + max_matching_words: 7, }, ), ], @@ -95,10 +95,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 5, - max_rank: 5, + ExactWords( + ExactWords { + matching_words: 4, + max_matching_words: 4, }, ), ], @@ -115,10 +115,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( ExactMatch, ), - Exactness( - Rank { - rank: 2, - max_rank: 2, + ExactWords( + ExactWords { + matching_words: 1, + max_matching_words: 1, }, ), ], diff --git a/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__exactness_attribute_starts_with_phrase.snap b/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__exactness_attribute_starts_with_phrase.snap index 703f3cb7a..2e1e9fc56 100644 --- a/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__exactness_attribute_starts_with_phrase.snap +++ b/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__exactness_attribute_starts_with_phrase.snap @@ -15,10 +15,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( ExactMatch, ), - Exactness( - Rank { - rank: 6, - max_rank: 6, + ExactWords( + ExactWords { + matching_words: 5, + max_matching_words: 5, }, ), ], @@ -35,10 +35,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( MatchesStart, ), - Exactness( - Rank { - rank: 6, - max_rank: 6, + ExactWords( + ExactWords { + matching_words: 5, + max_matching_words: 5, }, ), ], @@ -55,10 +55,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 6, - max_rank: 6, + ExactWords( + ExactWords { + matching_words: 5, + max_matching_words: 5, }, ), ], @@ -75,10 +75,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 3, - max_rank: 3, + ExactWords( + ExactWords { + matching_words: 2, + max_matching_words: 2, }, ), ], diff --git a/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__exactness_attribute_starts_with_simple.snap b/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__exactness_attribute_starts_with_simple.snap index eb6141468..a7c0f4bc2 100644 --- a/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__exactness_attribute_starts_with_simple.snap +++ b/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__exactness_attribute_starts_with_simple.snap @@ -15,10 +15,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( ExactMatch, ), - Exactness( - Rank { - rank: 3, - max_rank: 3, + ExactWords( + ExactWords { + matching_words: 2, + max_matching_words: 2, }, ), ], @@ -35,10 +35,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( MatchesStart, ), - Exactness( - Rank { - rank: 3, - max_rank: 3, + ExactWords( + ExactWords { + matching_words: 2, + max_matching_words: 2, }, ), ], @@ -55,10 +55,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 3, - max_rank: 3, + ExactWords( + ExactWords { + matching_words: 2, + max_matching_words: 2, }, ), ], diff --git a/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__exactness_followed_by_typo_prefer_no_typo_prefix.snap b/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__exactness_followed_by_typo_prefer_no_typo_prefix.snap index 987e585a8..f2d94bf1a 100644 --- a/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__exactness_followed_by_typo_prefer_no_typo_prefix.snap +++ b/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__exactness_followed_by_typo_prefer_no_typo_prefix.snap @@ -15,10 +15,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 5, - max_rank: 5, + ExactWords( + ExactWords { + matching_words: 4, + max_matching_words: 4, }, ), Typo( @@ -41,10 +41,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 4, - max_rank: 5, + ExactWords( + ExactWords { + matching_words: 3, + max_matching_words: 4, }, ), Typo( @@ -67,10 +67,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 4, - max_rank: 5, + ExactWords( + ExactWords { + matching_words: 3, + max_matching_words: 4, }, ), Typo( @@ -93,10 +93,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 4, - max_rank: 5, + ExactWords( + ExactWords { + matching_words: 3, + max_matching_words: 4, }, ), Typo( @@ -119,10 +119,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 3, - max_rank: 5, + ExactWords( + ExactWords { + matching_words: 2, + max_matching_words: 4, }, ), Typo( diff --git a/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__exactness_simple_ordered.snap b/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__exactness_simple_ordered.snap index c5993a09e..88b937145 100644 --- a/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__exactness_simple_ordered.snap +++ b/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__exactness_simple_ordered.snap @@ -15,10 +15,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( ExactMatch, ), - Exactness( - Rank { - rank: 10, - max_rank: 10, + ExactWords( + ExactWords { + matching_words: 9, + max_matching_words: 9, }, ), ], @@ -35,10 +35,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( ExactMatch, ), - Exactness( - Rank { - rank: 9, - max_rank: 9, + ExactWords( + ExactWords { + matching_words: 8, + max_matching_words: 8, }, ), ], @@ -55,10 +55,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( ExactMatch, ), - Exactness( - Rank { - rank: 8, - max_rank: 8, + ExactWords( + ExactWords { + matching_words: 7, + max_matching_words: 7, }, ), ], @@ -75,10 +75,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 8, - max_rank: 8, + ExactWords( + ExactWords { + matching_words: 7, + max_matching_words: 7, }, ), ], @@ -95,10 +95,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( ExactMatch, ), - Exactness( - Rank { - rank: 6, - max_rank: 6, + ExactWords( + ExactWords { + matching_words: 5, + max_matching_words: 5, }, ), ], @@ -115,10 +115,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( ExactMatch, ), - Exactness( - Rank { - rank: 5, - max_rank: 5, + ExactWords( + ExactWords { + matching_words: 4, + max_matching_words: 4, }, ), ], @@ -135,10 +135,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( ExactMatch, ), - Exactness( - Rank { - rank: 4, - max_rank: 4, + ExactWords( + ExactWords { + matching_words: 3, + max_matching_words: 3, }, ), ], @@ -155,10 +155,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( ExactMatch, ), - Exactness( - Rank { - rank: 3, - max_rank: 3, + ExactWords( + ExactWords { + matching_words: 2, + max_matching_words: 2, }, ), ], @@ -175,10 +175,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( ExactMatch, ), - Exactness( - Rank { - rank: 2, - max_rank: 2, + ExactWords( + ExactWords { + matching_words: 1, + max_matching_words: 1, }, ), ], diff --git a/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__exactness_simple_random.snap b/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__exactness_simple_random.snap index d920eb4a0..07585bc2d 100644 --- a/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__exactness_simple_random.snap +++ b/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__exactness_simple_random.snap @@ -15,10 +15,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 10, - max_rank: 10, + ExactWords( + ExactWords { + matching_words: 9, + max_matching_words: 9, }, ), ], @@ -35,10 +35,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 4, - max_rank: 4, + ExactWords( + ExactWords { + matching_words: 3, + max_matching_words: 3, }, ), ], @@ -55,10 +55,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 3, - max_rank: 3, + ExactWords( + ExactWords { + matching_words: 2, + max_matching_words: 2, }, ), ], @@ -75,10 +75,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 3, - max_rank: 3, + ExactWords( + ExactWords { + matching_words: 2, + max_matching_words: 2, }, ), ], @@ -95,10 +95,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 2, - max_rank: 2, + ExactWords( + ExactWords { + matching_words: 1, + max_matching_words: 1, }, ), ], @@ -115,10 +115,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 2, - max_rank: 2, + ExactWords( + ExactWords { + matching_words: 1, + max_matching_words: 1, }, ), ], diff --git a/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__exactness_simple_reversed-3.snap b/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__exactness_simple_reversed-3.snap index d0bc0fb46..4fb863a3d 100644 --- a/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__exactness_simple_reversed-3.snap +++ b/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__exactness_simple_reversed-3.snap @@ -15,10 +15,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( ExactMatch, ), - Exactness( - Rank { - rank: 10, - max_rank: 10, + ExactWords( + ExactWords { + matching_words: 9, + max_matching_words: 9, }, ), ], @@ -35,10 +35,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 10, - max_rank: 10, + ExactWords( + ExactWords { + matching_words: 9, + max_matching_words: 9, }, ), ], @@ -55,10 +55,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( MatchesStart, ), - Exactness( - Rank { - rank: 2, - max_rank: 2, + ExactWords( + ExactWords { + matching_words: 1, + max_matching_words: 1, }, ), ], @@ -75,10 +75,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 2, - max_rank: 2, + ExactWords( + ExactWords { + matching_words: 1, + max_matching_words: 1, }, ), ], @@ -95,10 +95,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 2, - max_rank: 2, + ExactWords( + ExactWords { + matching_words: 1, + max_matching_words: 1, }, ), ], @@ -115,10 +115,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 2, - max_rank: 2, + ExactWords( + ExactWords { + matching_words: 1, + max_matching_words: 1, }, ), ], @@ -135,10 +135,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 2, - max_rank: 2, + ExactWords( + ExactWords { + matching_words: 1, + max_matching_words: 1, }, ), ], diff --git a/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__exactness_simple_reversed.snap b/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__exactness_simple_reversed.snap index d0bc0fb46..4fb863a3d 100644 --- a/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__exactness_simple_reversed.snap +++ b/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__exactness_simple_reversed.snap @@ -15,10 +15,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( ExactMatch, ), - Exactness( - Rank { - rank: 10, - max_rank: 10, + ExactWords( + ExactWords { + matching_words: 9, + max_matching_words: 9, }, ), ], @@ -35,10 +35,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 10, - max_rank: 10, + ExactWords( + ExactWords { + matching_words: 9, + max_matching_words: 9, }, ), ], @@ -55,10 +55,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( MatchesStart, ), - Exactness( - Rank { - rank: 2, - max_rank: 2, + ExactWords( + ExactWords { + matching_words: 1, + max_matching_words: 1, }, ), ], @@ -75,10 +75,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 2, - max_rank: 2, + ExactWords( + ExactWords { + matching_words: 1, + max_matching_words: 1, }, ), ], @@ -95,10 +95,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 2, - max_rank: 2, + ExactWords( + ExactWords { + matching_words: 1, + max_matching_words: 1, }, ), ], @@ -115,10 +115,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 2, - max_rank: 2, + ExactWords( + ExactWords { + matching_words: 1, + max_matching_words: 1, }, ), ], @@ -135,10 +135,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 2, - max_rank: 2, + ExactWords( + ExactWords { + matching_words: 1, + max_matching_words: 1, }, ), ], diff --git a/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__proximity_after_exactness-4.snap b/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__proximity_after_exactness-4.snap index 21c6da724..5db8f8da8 100644 --- a/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__proximity_after_exactness-4.snap +++ b/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__proximity_after_exactness-4.snap @@ -15,10 +15,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 10, - max_rank: 10, + ExactWords( + ExactWords { + matching_words: 9, + max_matching_words: 9, }, ), Proximity( @@ -41,10 +41,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 10, - max_rank: 10, + ExactWords( + ExactWords { + matching_words: 9, + max_matching_words: 9, }, ), Proximity( @@ -67,10 +67,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 10, - max_rank: 10, + ExactWords( + ExactWords { + matching_words: 9, + max_matching_words: 9, }, ), Proximity( diff --git a/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__proximity_after_exactness.snap b/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__proximity_after_exactness.snap index 7a33134cf..c99b50284 100644 --- a/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__proximity_after_exactness.snap +++ b/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__proximity_after_exactness.snap @@ -15,10 +15,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( ExactMatch, ), - Exactness( - Rank { - rank: 10, - max_rank: 10, + ExactWords( + ExactWords { + matching_words: 9, + max_matching_words: 9, }, ), Proximity( @@ -41,10 +41,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 10, - max_rank: 10, + ExactWords( + ExactWords { + matching_words: 9, + max_matching_words: 9, }, ), Proximity( @@ -67,10 +67,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 10, - max_rank: 10, + ExactWords( + ExactWords { + matching_words: 9, + max_matching_words: 9, }, ), Proximity( @@ -93,10 +93,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( MatchesStart, ), - Exactness( - Rank { - rank: 5, - max_rank: 5, + ExactWords( + ExactWords { + matching_words: 4, + max_matching_words: 4, }, ), Proximity( @@ -119,10 +119,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( MatchesStart, ), - Exactness( - Rank { - rank: 5, - max_rank: 5, + ExactWords( + ExactWords { + matching_words: 4, + max_matching_words: 4, }, ), Proximity( @@ -145,10 +145,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( MatchesStart, ), - Exactness( - Rank { - rank: 5, - max_rank: 5, + ExactWords( + ExactWords { + matching_words: 4, + max_matching_words: 4, }, ), Proximity( @@ -171,10 +171,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 5, - max_rank: 5, + ExactWords( + ExactWords { + matching_words: 4, + max_matching_words: 4, }, ), Proximity( @@ -197,10 +197,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 5, - max_rank: 5, + ExactWords( + ExactWords { + matching_words: 4, + max_matching_words: 4, }, ), Proximity( @@ -223,10 +223,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 5, - max_rank: 5, + ExactWords( + ExactWords { + matching_words: 4, + max_matching_words: 4, }, ), Proximity( diff --git a/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__typo_followed_by_exactness.snap b/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__typo_followed_by_exactness.snap index 6670f3e4f..320e1b878 100644 --- a/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__typo_followed_by_exactness.snap +++ b/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__typo_followed_by_exactness.snap @@ -21,10 +21,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( ExactMatch, ), - Exactness( - Rank { - rank: 5, - max_rank: 5, + ExactWords( + ExactWords { + matching_words: 4, + max_matching_words: 4, }, ), ], @@ -47,10 +47,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 4, - max_rank: 5, + ExactWords( + ExactWords { + matching_words: 3, + max_matching_words: 4, }, ), ], @@ -73,10 +73,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 4, - max_rank: 5, + ExactWords( + ExactWords { + matching_words: 3, + max_matching_words: 4, }, ), ], @@ -99,10 +99,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 3, - max_rank: 5, + ExactWords( + ExactWords { + matching_words: 2, + max_matching_words: 4, }, ), ], diff --git a/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__words_after_exactness.snap b/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__words_after_exactness.snap index ef95520bb..5463f0db5 100644 --- a/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__words_after_exactness.snap +++ b/milli/src/search/new/tests/snapshots/milli__search__new__tests__exactness__words_after_exactness.snap @@ -15,10 +15,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( ExactMatch, ), - Exactness( - Rank { - rank: 10, - max_rank: 10, + ExactWords( + ExactWords { + matching_words: 9, + max_matching_words: 9, }, ), ], @@ -35,10 +35,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 7, - max_rank: 10, + ExactWords( + ExactWords { + matching_words: 6, + max_matching_words: 9, }, ), ], @@ -55,10 +55,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( ExactMatch, ), - Exactness( - Rank { - rank: 9, - max_rank: 9, + ExactWords( + ExactWords { + matching_words: 8, + max_matching_words: 8, }, ), ], @@ -75,10 +75,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 6, - max_rank: 9, + ExactWords( + ExactWords { + matching_words: 5, + max_matching_words: 8, }, ), ], @@ -95,10 +95,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( ExactMatch, ), - Exactness( - Rank { - rank: 8, - max_rank: 8, + ExactWords( + ExactWords { + matching_words: 7, + max_matching_words: 7, }, ), ], @@ -115,10 +115,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 8, - max_rank: 8, + ExactWords( + ExactWords { + matching_words: 7, + max_matching_words: 7, }, ), ], @@ -135,10 +135,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 5, - max_rank: 8, + ExactWords( + ExactWords { + matching_words: 4, + max_matching_words: 7, }, ), ], @@ -155,10 +155,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 5, - max_rank: 8, + ExactWords( + ExactWords { + matching_words: 4, + max_matching_words: 7, }, ), ], @@ -175,10 +175,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( ExactMatch, ), - Exactness( - Rank { - rank: 6, - max_rank: 6, + ExactWords( + ExactWords { + matching_words: 5, + max_matching_words: 5, }, ), ], @@ -195,10 +195,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 3, - max_rank: 6, + ExactWords( + ExactWords { + matching_words: 2, + max_matching_words: 5, }, ), ], @@ -215,10 +215,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( ExactMatch, ), - Exactness( - Rank { - rank: 5, - max_rank: 5, + ExactWords( + ExactWords { + matching_words: 4, + max_matching_words: 4, }, ), ], @@ -235,10 +235,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 3, - max_rank: 5, + ExactWords( + ExactWords { + matching_words: 2, + max_matching_words: 4, }, ), ], @@ -255,10 +255,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( ExactMatch, ), - Exactness( - Rank { - rank: 4, - max_rank: 4, + ExactWords( + ExactWords { + matching_words: 3, + max_matching_words: 3, }, ), ], @@ -275,10 +275,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 2, - max_rank: 4, + ExactWords( + ExactWords { + matching_words: 1, + max_matching_words: 3, }, ), ], @@ -295,10 +295,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( ExactMatch, ), - Exactness( - Rank { - rank: 3, - max_rank: 3, + ExactWords( + ExactWords { + matching_words: 2, + max_matching_words: 2, }, ), ], @@ -315,10 +315,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 2, - max_rank: 3, + ExactWords( + ExactWords { + matching_words: 1, + max_matching_words: 2, }, ), ], @@ -335,10 +335,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( ExactMatch, ), - Exactness( - Rank { - rank: 2, - max_rank: 2, + ExactWords( + ExactWords { + matching_words: 1, + max_matching_words: 1, }, ), ], @@ -355,10 +355,10 @@ expression: "format!(\"{document_ids_scores:#?}\")" ExactAttribute( ExactMatch, ), - Exactness( - Rank { - rank: 2, - max_rank: 2, + ExactWords( + ExactWords { + matching_words: 1, + max_matching_words: 1, }, ), ], diff --git a/milli/src/search/new/tests/snapshots/milli__search__new__tests__stop_words__stop_words_in_phrase-6.snap b/milli/src/search/new/tests/snapshots/milli__search__new__tests__stop_words__stop_words_in_phrase-6.snap index 1ca6a33a4..b12874c7b 100644 --- a/milli/src/search/new/tests/snapshots/milli__search__new__tests__stop_words__stop_words_in_phrase-6.snap +++ b/milli/src/search/new/tests/snapshots/milli__search__new__tests__stop_words__stop_words_in_phrase-6.snap @@ -37,10 +37,10 @@ expression: "format!(\"{document_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 4, - max_rank: 4, + ExactWords( + ExactWords { + matching_words: 3, + max_matching_words: 3, }, ), ], @@ -78,10 +78,10 @@ expression: "format!(\"{document_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 4, - max_rank: 4, + ExactWords( + ExactWords { + matching_words: 3, + max_matching_words: 3, }, ), ], @@ -119,10 +119,10 @@ expression: "format!(\"{document_scores:#?}\")" ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 4, - max_rank: 4, + ExactWords( + ExactWords { + matching_words: 3, + max_matching_words: 3, }, ), ], diff --git a/milli/src/search/new/tests/stop_words.rs b/milli/src/search/new/tests/stop_words.rs index 4ad587240..2b06264f5 100644 --- a/milli/src/search/new/tests/stop_words.rs +++ b/milli/src/search/new/tests/stop_words.rs @@ -120,10 +120,10 @@ fn test_ignore_stop_words() { ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 2, - max_rank: 2, + ExactWords( + ExactWords { + matching_words: 1, + max_matching_words: 1, }, ), ], @@ -173,10 +173,10 @@ fn test_ignore_stop_words() { ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 2, - max_rank: 2, + ExactWords( + ExactWords { + matching_words: 1, + max_matching_words: 1, }, ), ], @@ -226,10 +226,10 @@ fn test_ignore_stop_words() { ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 2, - max_rank: 2, + ExactWords( + ExactWords { + matching_words: 1, + max_matching_words: 1, }, ), ], @@ -278,10 +278,10 @@ fn test_ignore_stop_words() { ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 3, - max_rank: 3, + ExactWords( + ExactWords { + matching_words: 2, + max_matching_words: 2, }, ), ], @@ -337,10 +337,10 @@ fn test_stop_words_in_phrase() { ExactAttribute( MatchesStart, ), - Exactness( - Rank { - rank: 2, - max_rank: 2, + ExactWords( + ExactWords { + matching_words: 1, + max_matching_words: 1, }, ), ], @@ -378,10 +378,10 @@ fn test_stop_words_in_phrase() { ExactAttribute( MatchesStart, ), - Exactness( - Rank { - rank: 2, - max_rank: 2, + ExactWords( + ExactWords { + matching_words: 1, + max_matching_words: 1, }, ), ], @@ -430,10 +430,10 @@ fn test_stop_words_in_phrase() { ExactAttribute( NoExactMatch, ), - Exactness( - Rank { - rank: 4, - max_rank: 4, + ExactWords( + ExactWords { + matching_words: 3, + max_matching_words: 3, }, ), ],