Description
Problem
The IndexDefMergerUtils will remove child nodes from merged custom index definitions when the child node is present in the ancestor and new product index, but not in the custom index.
Example
Given the following indexes:
newIndexes: { index-2: { indexRules: { nt:base: { property1: { name: someproperty } } } } } allIndexes: { index-1: { indexRules: { nt:base: { property1: { name: someproperty } } } }, index-1-custom-1: { indexRules: { nt:base: { property2: { name: someproperty } } } } }
Calling IndexDefMergerUtils.merge(newIndexes, allIndexes) would result in an index with the property:
index-2-custom-1: { indexRules: { nt:base: { property2: { name: someproperty } } } merges: [index-2, index-1-custom-1] }
Result
Removing node structures in the merging process could allow for catastrophic changes to an index definition by removing key property / node type definitions.
Expected Result
The merged index would contain all of the nodes defined in the product index. However custom index definitions would still be able to alter definitions by adding new nodes or changing / adding / removing properties from the product definition.
Attachments
Issue Links
- links to