private void initIndexTemplate(String type) {
        String template = "template_" + type;
        GetIndexTemplatesResponse result =
                elasticSearchClient
                        .admin()
                        .indices()
                        .prepareGetTemplates(template)
                        .execute()
                        .actionGet();
        if (result.getIndexTemplates().isEmpty()) {
            LOGGER.info("Creating the index template '{}'", template);
            try {
                String templateSource = loadTypeMappingSource("/" + template + ".json");
                elasticSearchClient
                        .admin()
                        .indices()
                        .preparePutTemplate(template)
                        .setSource(templateSource.getBytes(), XContentType.JSON)
                        .execute()
                        .actionGet();
            } catch (Exception e) {
                LOGGER.error("Failed to init " + template, e);
            }
        }
    }
Initializes the indexes templates task_log, message and event, and mappings.
es6-persistence/src/main/java/com/netflix/conductor/es6/dao/index/ElasticSearchDAOV6.java