Skip to content

Commit

Permalink
Merge branch '7.0' into 7.1
Browse files Browse the repository at this point in the history
* 7.0:
  feature #3331 [SearchBundle, NodeSearchBundle] : change `nGram` to `ngram` (delboy1978uk)
  • Loading branch information
acrobat committed Feb 18, 2024
2 parents 5fe6bf3 + 5c60a5e commit 7d0aeec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down

0 comments on commit 7d0aeec

Please sign in to comment.