Details
-
Improvement
-
Resolution: Unresolved
-
Neutral
-
None
-
5.2.1, 5.5
-
None
-
-
Empty show more show less
-
Yes
Description
Problem
The logic of the current BasicSolrIndexService stops indexing a property from the fieldMappings if it's found on the node itself. This causes the property to be ignored on all childNodes e.g. Areas and Components.
See this if-loop.
Solution
Don't perfom this if check and always collect the properties of all childNodes and combine those results with the property of the indexed node:
String nodeType = config.getNodeType() != null ? config.getNodeType() : NodeTypes.Page.NAME; Collection<String> childValues = this.getAllTextForNode(config.getWorkspace(), node, key, nodeType); if (StringUtils.isNotBlank(value)) { childValues.add(value); } value = Jsoup.parse(StringUtils.join(childValues, ","), value).text();
This code bases on an additional adaption of the getAllTextForNode(...) method, which should always return an Array, even if it's empty, instead of returning null.
Checklists
Acceptance criteria