PHRAS-2831_port-truncation_4.1

copy elastic/truncation code from 4.0
nb: from already exists
This commit is contained in:
Jean-Yves Gaulier
2019-11-19 16:45:46 +01:00
parent cc9183373e
commit 3145049247
7 changed files with 83 additions and 9 deletions

View File

@@ -55,8 +55,13 @@ class StringFieldMapping extends ComplexFieldMapping
{
$child = new StringFieldMapping('light');
$child->setAnalyzer('general_light');
$this->addChild($child);
$child = new StringFieldMapping('truncated');
$child->setAnalyzer('truncation_analyzer', 'indexing');
$child->setAnalyzer('truncation_analyzer#search', 'searching');
$this->addChild($child);
$this->addLocalizedChildren($locales);
return $this;