Language name search: don't match on short infix terms
These are often punctuation, prepositions, articles which add more noise than useful matches. Bug: T358862 Change-Id: I364ef629049471410cc1b3dd9b5df5de1515097b
This commit is contained in:
committed by
jenkins-bot
parent
5d69081678
commit
814a62926a
@@ -80,7 +80,12 @@ class LanguageNameIndexer extends Maintenance {
|
||||
|
||||
$type = 'prefix';
|
||||
$display = $translation;
|
||||
if ( $index > 0 && count( $words ) > 1 ) {
|
||||
if ( $index > 0 ) {
|
||||
// Avoid creating infix entries for short strings like punctuation, articles, prepositions...
|
||||
if ( mb_strlen( $word ) < 3 ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$type = 'infix';
|
||||
$display = "$word — $translation";
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user