updateAnalyzers() public method (available since version 2.0.4)
Define new analyzers for the index.
For example if content analyzer hasn’t been defined on "myindex" yet you can use the following commands to add it:
$setting = [ 'analysis' => [ 'analyzer' => [ 'ngram_analyzer_with_filter' => [ 'tokenizer' => 'ngram_tokenizer', 'filter' => 'lowercase, snowball' ], ], 'tokenizer' => [ 'ngram_tokenizer' => [ 'type' => 'nGram', 'min_gram' => 3, 'max_gram' => 10, 'token_chars' => ['letter', 'digit', 'whitespace', 'punctuation', 'symbol'] ], ], ] ]; $elasticQuery->createCommand()->updateAnalyzers('myindex', $setting);
public mixed updateAnalyzers ( $index, $setting, $options = [] ) | ||
---|---|---|
$index | string | |
$setting | string|array | |
$options | array |
URL options |
Please login to continue.