diff --git a/core/src/idx/ft/analyzer/filter.rs b/core/src/idx/ft/analyzer/filter.rs index 1b0a10c5..1f77d28e 100644 --- a/core/src/idx/ft/analyzer/filter.rs +++ b/core/src/idx/ft/analyzer/filter.rs @@ -116,7 +116,7 @@ impl Filter { #[inline] fn uppercase(c: &str) -> FilterResult { - Self::check_term(c, c.to_lowercase()) + Self::check_term(c, c.to_uppercase()) } #[inline] @@ -842,4 +842,32 @@ mod tests { ) .await; } + + #[tokio::test] + async fn test_uppercase_tokens() { + test_analyzer_tokens( + "ANALYZER test TOKENIZERS blank,class FILTERS uppercase", + "Ālea IactA!", + &[ + Token::String { + chars: (0, 0, 4), + bytes: (0, 5), + term: "ĀLEA".to_string(), + len: 4, + }, + Token::String { + chars: (5, 5, 10), + bytes: (6, 11), + term: "IACTA".to_string(), + len: 5, + }, + Token::Ref { + chars: (10, 10, 11), + bytes: (11, 12), + len: 1, + }, + ], + ) + .await; + } }