Details
-
Bug
-
Resolution: Unresolved
-
Neutral
-
None
-
1.0.0
-
None
-
Java 11, Magnolia 6.2.15
Description
The Index Editor app - tab datasource does not require a link to a field mapping. However, if it is missing the index creation fails with a NullPointerException. Furthermore the ES server fails creating an index if an empty list of mapping fields is sent.
Workaround:
Patch method
buildMappingsFromJcr() of ServerProfileBuilder:
private Map<String, MappingProperties> buildMappingsFromJcr() throws ElasticConfigurationException { Map<String, MappingProperties> indexProperties = new HashMap<>(); if (this.index.getDatasource().getMappedField() != null) { MappingProperties properties = new MappingProperties(); Map<String, TypeSpecification> fieldSpecification = new HashMap<>(); for (MappingFieldItemConfiguration field : this.index.getDatasource().getMappedField().getFields()) { fieldSpecification.put(field.getName(), this.buildSpecification(field)); } if (!fieldSpecification.isEmpty()) { properties.setProperties(fieldSpecification); indexProperties.put(this.index.getIndexType(), properties); } } return indexProperties; }
Checklists
Acceptance criteria