Skip to content

Commit c65b444

Browse files
author
Simonas Šerlinskas
committed
Merge remote-tracking branch 'remotes/origin/master' into 5.2
2 parents 7aa6fb3 + c817dc5 commit c65b444

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

DependencyInjection/Configuration.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ private function getAnalysisNode()
6060
$node = $builder->root('analysis');
6161

6262
$node
63-
->info('Defines analyzers, tokenizers and filters')
63+
->info('Defines analyzers, normalizers, tokenizers and filters')
6464
->addDefaultsIfNotSet()
6565
->children()
6666
->arrayNode('tokenizer')
@@ -75,6 +75,10 @@ private function getAnalysisNode()
7575
->defaultValue([])
7676
->prototype('variable')->end()
7777
->end()
78+
->arrayNode('normalizer')
79+
->defaultValue([])
80+
->prototype('variable')->end()
81+
->end()
7882
->arrayNode('char_filter')
7983
->defaultValue([])
8084
->prototype('variable')->end()

Mapping/MetadataCollector.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ public function getClientAnalysis(array $bundles, $analysisConfig = [])
251251
'filter' => [],
252252
'tokenizer' => [],
253253
'char_filter' => [],
254+
'normalizer' => [],
254255
];
255256

256257
/** @var array $mappings All mapping info */
@@ -283,6 +284,10 @@ public function getClientAnalysis(array $bundles, $analysisConfig = [])
283284
}
284285
}
285286

287+
if (isset($analysisConfig['normalizer'])) {
288+
$typesAnalysis['normalizer'] = $analysisConfig['normalizer'];
289+
}
290+
286291
$this->enableCache && $this->cache->save($cacheName, $typesAnalysis);
287292

288293
return $typesAnalysis;

0 commit comments

Comments
 (0)