Elasticsearch Mapping files should be generated from the StAppsCore schema
Description
Elasticsearch mappings are maintained manually at the time. This requires a lot of time and is predestined for inconsistencies. The core tools repository already creates the JSON schema files for validation and creates a project reflection using TypeDoc... These mechanism could be extended by the generation of mappings.
Data
Elasticsearch needs to have some information about the data usage to provide sort and filter mechanism for the data.
Elasticsearch needs to know:
- if a
.rawfield has to exist for a string (to store the raw field data for filtering for example) - if a
.sortfield has to exist for a string field (to use a custom analyzer for this field to provide ducet sort (unicode sort algortihm)) - if a field is an integer or double for number fields in JSON...
- if a field should be interpreted as geo coordinates (to provide sort by location distance and distance filters)
Edited by Anselm Stordeur