Skip to content

Commit 122a548

Browse files
committed
BUGFIX: Also add nodeTypeMapping for references
1 parent ce4f262 commit 122a548

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

Classes/Driver/Version6/Mapping/NodeTypeMappingBuilder.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,16 @@ public function buildMappingInformation(ContentRepositoryId $contentRepositoryId
7171
$mapping->setFullMapping($fullMapping);
7272
}
7373

74-
foreach ($nodeType->getProperties() as $propertyName => $propertyConfiguration) {
75-
// This property is configured to not be index, so do not add a mapping for it
74+
$propertiesAndReferences = array_merge(
75+
$nodeType->getProperties(),
76+
array_map(function ($reference) {
77+
$reference['type'] = 'references';
78+
return $reference;
79+
}, $nodeType->getReferences())
80+
);
81+
82+
foreach ($propertiesAndReferences as $propertyName => $propertyConfiguration) {
83+
// This property is configured to not be indexed, so do not add a mapping for it
7684
if (isset($propertyConfiguration['search']) && array_key_exists('indexing', $propertyConfiguration['search']) && $propertyConfiguration['search']['indexing'] === false) {
7785
continue;
7886
}

0 commit comments

Comments
 (0)