diff --git a/src/Kunstmaan/NodeSearchBundle/Configuration/NodePagesConfiguration.php b/src/Kunstmaan/NodeSearchBundle/Configuration/NodePagesConfiguration.php index f28b8cc3f6..6548fa853d 100644 --- a/src/Kunstmaan/NodeSearchBundle/Configuration/NodePagesConfiguration.php +++ b/src/Kunstmaan/NodeSearchBundle/Configuration/NodePagesConfiguration.php @@ -327,7 +327,7 @@ public function setAnalysis(Index $index, AnalysisFactoryInterface $analysis) $ngramDiff = 1; if (isset($analysers['tokenizer']) && count($analysers['tokenizer']) > 0) { foreach ($analysers['tokenizer'] as $tokenizer) { - if ($tokenizer['type'] === 'nGram') { + if (\strtolower($tokenizer['type']) === 'ngram') { $diff = $tokenizer['max_gram'] - $tokenizer['min_gram']; $ngramDiff = $diff > $ngramDiff ? $diff : $ngramDiff; diff --git a/src/Kunstmaan/SearchBundle/Search/AbstractAnalysisFactory.php b/src/Kunstmaan/SearchBundle/Search/AbstractAnalysisFactory.php index c0c6377826..8fa7cd261f 100644 --- a/src/Kunstmaan/SearchBundle/Search/AbstractAnalysisFactory.php +++ b/src/Kunstmaan/SearchBundle/Search/AbstractAnalysisFactory.php @@ -98,7 +98,7 @@ public function addStripSpecialCharsFilter() public function addNGramTokenizer() { $this->tokenizers['kuma_ngram'] = [ - 'type' => 'nGram', + 'type' => 'ngram', 'min_gram' => 4, 'max_gram' => 30, 'token_chars' => ['letter', 'digit', 'punctuation'],