|
Perforce Chronicle 2012.2/486814
API Documentation
|
Extends utf8 number query analyzer to be case-insensitive even if the mbstring extension is not installed (falls back to strtolower). More...
Public Member Functions | |
| __construct () | |
| Add a lower-case token filter to the analyzer. | |
Extends utf8 number query analyzer to be case-insensitive even if the mbstring extension is not installed (falls back to strtolower).
| P4Cms_Search_Lucene_Analysis_Analyzer_Common_Utf8Num_CaseInsensitive::__construct | ( | ) |
Add a lower-case token filter to the analyzer.
If the mbstring extension is present, use the UTF-8 aware strtolower, otherwise, use PHP's built-in strtolower - not ideal, but should be relatively harmless.
{
parent::__construct();
if (extension_loaded("mbstring")) {
$this->addFilter(new Zend_Search_Lucene_Analysis_TokenFilter_LowerCaseUtf8());
} else {
$this->addFilter(new Zend_Search_Lucene_Analysis_TokenFilter_LowerCase());
}
}