Merge pull request #276 from meilisearch/support-slash-tokenizer

Add support for back/slashes
This commit is contained in:
Clément Renault 2019-11-11 21:46:14 +01:00 committed by GitHub
commit 1c4afe6d0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -47,7 +47,7 @@ fn classify_separator(c: char) -> Option<SeparatorCategory> {
c if c.is_whitespace() => Some(Soft), // whitespaces c if c.is_whitespace() => Some(Soft), // whitespaces
c if deunicode_char(c) == Some("'") => Some(Soft), // quotes c if deunicode_char(c) == Some("'") => Some(Soft), // quotes
c if deunicode_char(c) == Some("\"") => Some(Soft), // double quotes c if deunicode_char(c) == Some("\"") => Some(Soft), // double quotes
'-' | '_' | '\'' | ':' => Some(Soft), '-' | '_' | '\'' | ':' | '/' | '\\' => Some(Soft),
'.' | ';' | ',' | '!' | '?' | '(' | ')' => Some(Hard), '.' | ';' | ',' | '!' | '?' | '(' | ')' => Some(Hard),
_ => None, _ => None,
} }