private void createTaskIndex() {
        String indexName = getIndexName(TASK_DOC_TYPE);
        try {
            addIndex(indexName);
        } catch (IOException e) {
            LOGGER.error("Failed to initialize index '{}'", indexName, e);
        }
        try {
            addMappingToIndex(indexName, TASK_DOC_TYPE, "/mappings_docType_task.json");
        } catch (IOException e) {
            LOGGER.error("Failed to add {} mapping", TASK_DOC_TYPE);
        }
    }
Initializes the index with the required templates and mappings.
es6-persistence/src/main/java/com/netflix/conductor/es6/dao/index/ElasticSearchRestDAOV6.java