private void createIndex(String indexName) {
        try {
            elasticSearchClient
                    .admin()
                    .indices()
                    .prepareGetIndex()
                    .addIndices(indexName)
                    .execute()
                    .actionGet();
        } catch (IndexNotFoundException infe) {
            try {
                CreateIndexRequest createIndexRequest = new CreateIndexRequest(indexName);
                createIndexRequest.settings(
                        Settings.builder()
                                .put("index.number_of_shards", properties.getIndexShardCount())
                                .put(
                                        "index.number_of_replicas",
                                        properties.getIndexReplicasCount()));

                elasticSearchClient.admin().indices().create(createIndexRequest).actionGet();
            } catch (ResourceAlreadyExistsException done) {
                LOGGER.error("Failed to update log index name: {}", indexName, done);
            }
        }
    }
Initializes the indexes templates task_log, message and event, and mappings.
es6-persistence/src/main/java/com/netflix/conductor/es6/dao/index/ElasticSearchDAOV6.java