Merge pull request #198 from meilisearch/split-by-underscore

Support underscores and colon as split characters
This commit is contained in:
Clément Renault 2019-09-24 14:16:02 +02:00 committed by GitHub
commit ca818e12a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,8 +39,8 @@ fn is_separator(c: char) -> bool {
fn classify_separator(c: char) -> Option<SeparatorCategory> {
match c {
' ' | '\'' | '"' => Some(Soft),
'.' | ';' | ',' | '!' | '?' | '-' | '(' | ')' => Some(Hard),
' ' | '\'' | ':' | '"' => Some(Soft),
'.' | ';' | ',' | '!' | '?' | '-' | '_' | '(' | ')' => Some(Hard),
_ => None,
}
}