* (bug 8445) Multiple-character search terms are now handled properly for Chinese
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 24 Jun 2009 02:27:51 +0000 (02:27 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 24 Jun 2009 02:27:51 +0000 (02:27 +0000)
commitceedb37941702f54766b107aee86e28559868304
tree369a6771c995e5d6a47a50b9fa16ab8f0081a125
parent59b60fc31194b3b09bba2c95b8ddf85c3f9e81bb
* (bug 8445) Multiple-character search terms are now handled properly for Chinese

Big fixup for Chinese word breaks and variant conversions in the MySQL search backend...
- removed redunant variant terms for Chinese, which forces all search indexing to canonical zh-hans
- added parens to properly group variants for languages such as Serbian which do need them at search time
- added quotes to properly group multi-word terms coming out of stripForSearch, as for Chinese where we segment up the characters. This is based on Language::hasWordBreaks() check.
- also cleaned up LanguageZh_hans::stripForSearch() to just do segmentation and pass on the Unicode stripping to the base Language implementation, avoiding scary code duplication. Segmentation was already pulled up to LanguageZh, but was being run again at the second level. :P
- made a fix to Chinese word segmentation to handle the case where a Han character is followed by a Latin char or numeral; a space is now added after as well. Spaces are then normalized for prettiness.
RELEASE-NOTES
includes/SearchMySQL.php
languages/Language.php
languages/classes/LanguageZh.php
languages/classes/LanguageZh_hans.php