private void addTypeMapping(String indexName, String type, String sourcePath) {
        GetMappingsResponse getMappingsResponse =
                elasticSearchClient
                        .admin()
                        .indices()
                        .prepareGetMappings(indexName)
                        .addTypes(type)
                        .execute()
                        .actionGet();
        if (getMappingsResponse.mappings().isEmpty()) {
            LOGGER.info("Adding the {} type mappings", indexName);
            try {
                String source = loadTypeMappingSource(sourcePath);
                elasticSearchClient
                        .admin()
                        .indices()
                        .preparePutMapping(indexName)
                        .setType(type)
                        .setSource(source, XContentType.JSON)
                        .execute()
                        .actionGet();
            } catch (Exception e) {
                LOGGER.error("Failed to init index " + indexName + " mappings", 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