Skip to content

Commit fdf4763

Browse files
authored
Merge pull request #416 from Flowpack/bugfix/fix-node-reference-mapping
BUGFIX: Fix node reference mapping
2 parents 3a319de + 2fc44ab commit fdf4763

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

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
}

Configuration/NodeTypes.Override.Document.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
'text':
3838
type: text
3939
'neos_hidden_in_menu':
40+
type: boolean
4041
search:
4142
indexing: '${node.hiddenInMenu}'
4243

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
'Neos.Neos:Hidable':
22
properties:
33
'neos_hidden':
4+
type: boolean
45
search:
56
indexing: '${Neos.Node.isDisabled(node)}'

0 commit comments

Comments
 (0)