OptionalcomponentReusable blocks of mappings, settings and aliases, each named so an index template can pull it in — see the Elasticsearch documentation.
A component template does nothing on its own: it takes effect only once an entry in
ServiceConfigElastic.indexTemplates names it in composed_of. Each entry needs at
least a name and a template.
OptionalindexConfiguration the search index is created from — see the Elasticsearch documentation.
Configuration for an Elasticsearch service, controlling how the search index is built.
Remarks
Given no configuration, the service indexes every literal and IRI it finds under a default mapping of its own, which is enough for text search. A property whose objects already carry an
xsd:date,xsd:dateTime,xsd:gYearorxsd:gYearMonthdatatype additionally gets adatesubfield, so it can be sorted and filtered on without any configuration — and keeps that mapping, which a template cannot override. Templates are how you say more than that: that a property holding plain strings should be read as a date, say.A property's field name in the index is its IRI with every
.replaced by a space, since Elasticsearch reads a dot as a path separator. Write the field name that way in a mapping, and expect it that way in a hit.Templates are read when the service is created and applied while it builds its index, so changing one means creating the service again rather than updating the one that is running.