[MGNLEESOLR-149] FieldMapping indexer stops if mgnl:page contains the property Created: 15/Oct/20 Updated: 22/Oct/20 |
|
| Status: | Open |
| Project: | Solr Search Provider |
| Component/s: | None |
| Affects Version/s: | 5.2.1, 5.5 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Neutral |
| Reporter: | Antonio Tuor | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 4 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Template: |
|
| Acceptance criteria: |
Empty
|
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
| Documentation update required: |
Yes
|
| Date of First Response: |
| Description |
ProblemThe 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. SolutionDon'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. |