CirrusSearch
Elasticsearch-powered search for MediaWiki
|
Builds elasticsearch analysis config arrays for the completion suggester index. More...
Public Member Functions | |
buildConfig ( $language=null) | |
Build the analysis config. | |
Public Member Functions inherited from CirrusSearch\Maintenance\AnalysisConfigBuilder | |
__construct ( $langCode, array $plugins, ?SearchConfig $config=null, ?CirrusSearchHookRunner $cirrusSearchHookRunner=null) | |
shouldActivateIcuFolding ( $language) | |
Determine if asciifolding should be upgraded to icu_folding, or icu_folding should be stripped. | |
shouldActivateIcuTokenization ( $language) | |
Determine if the icu_tokenizer can replace the standard tokenizer for this language. | |
buildSimilarityConfig () | |
enableICUTokenizer (array $config) | |
replace the standard tokenizer with icu_tokenizer | |
standardTokenizerOnlyCleanup (array $config) | |
replace STANDARD_TOKENIZER_ONLY with the actual standard tokenizer | |
disableLimitedMappings (array $config) | |
replace limited_mappings with mappings if limited_mapping is unavailable | |
enableICUFolding (array $config, $language) | |
Activate ICU folding instead of asciifolding. | |
getDefaultTextAnalyzerType ( $language) | |
Pick the appropriate default analyzer based on the language. | |
buildLanguageConfigs (array &$config, array $languages, array $analyzers) | |
Create per-language configs for specific analyzers which separates and namespaces filters that are different between languages. | |
isIcuAvailable () | |
isTextifyAvailable () | |
enableGlobalCustomFilters (array $config, string $language) | |
update languages with global custom filters (e.g., homoglyph & nnbsp filters) | |
Static Public Member Functions | |
static | hasStopWords ( $lang) |
Public Attributes | |
const | VERSION = "1.4" |
Public Attributes inherited from CirrusSearch\Maintenance\AnalysisConfigBuilder | |
const | VERSION = '0.12' |
Version number for the core analysis. | |
$globalCustomFilters | |
Protected Member Functions | |
defaults ( $language) | |
Build an analysis config with sane defaults. | |
Protected Member Functions inherited from CirrusSearch\Maintenance\AnalysisConfigBuilder | |
addRemoveEmpty (array $config) | |
Add remove_empty as needed after icu_folding/preserve_original. | |
getICUSetFilter ( $language) | |
Return the list of chars to exclude from ICU folding. | |
getICUNormSetFilter ( $language) | |
Return the list of chars to exclude from ICU normalization. | |
Additional Inherited Members | |
Protected Attributes inherited from CirrusSearch\Maintenance\AnalysisConfigBuilder | |
$config | |
$defaultLanguage | |
Builds elasticsearch analysis config arrays for the completion suggester index.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. http://www.gnu.org/copyleft/gpl.html
CirrusSearch\Maintenance\SuggesterAnalysisConfigBuilder::buildConfig | ( | $language = null | ) |
Build the analysis config.
string | null | $language | Config language |
Reimplemented from CirrusSearch\Maintenance\AnalysisConfigBuilder.
|
protected |
Build an analysis config with sane defaults.
string | $language | Config language |
Reimplemented from CirrusSearch\Maintenance\AnalysisConfigBuilder.
|
static |
string | $lang |