mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-24 10:23:17 +00:00
Merge pull request #2002 from alchemy-fr/fix/index-concept-path
Fix index creation errors with field linked concepts in thesaurus
This commit is contained in:
@@ -111,6 +111,8 @@ class RecordIndex implements MappingProvider
|
||||
{
|
||||
$thesaurusMapping = new Mapping\ComplexFieldMapping($name, FieldMapping::TYPE_OBJECT);
|
||||
|
||||
$thesaurusMapping->useAsPropertyContainer();
|
||||
|
||||
foreach (array_keys($this->structure->getThesaurusEnabledFields()) as $name) {
|
||||
$child = new Mapping\StringFieldMapping($name);
|
||||
|
||||
@@ -118,7 +120,7 @@ class RecordIndex implements MappingProvider
|
||||
$child->setAnalyzer('keyword', 'searching');
|
||||
$child->addChild((new Mapping\StringFieldMapping('raw'))->enableRawIndexing());
|
||||
|
||||
$thesaurusMapping->addChild($thesaurusMapping);
|
||||
$thesaurusMapping->addChild($child);
|
||||
}
|
||||
|
||||
return $thesaurusMapping;
|
||||
|
||||
Reference in New Issue
Block a user