@triply/triplydb
    Preparing search index...

    Interface ServiceConfigElastic

    Configuration for an Elasticsearch service, controlling how the search index is built.

    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:gYear or xsd:gYearMonth datatype additionally gets a date subfield, 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.

    interface ServiceConfigElastic {
        componentTemplates?: ClusterPutComponentTemplateRequest[];
        indexTemplates?: IndicesPutIndexTemplateRequest[];
    }
    Index
    componentTemplates?: ClusterPutComponentTemplateRequest[]

    Reusable 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.

    indexTemplates?: IndicesPutIndexTemplateRequest[]

    Configuration the search index is created from — see the Elasticsearch documentation.

    Each entry needs a name and an index_patterns. The service builds a single index called index, so index_patterns has to be "index" for the template to match it — any other pattern leaves the template unused.