@Override
    public void updateTask(String workflowId, String taskId, String[] keys, Object[] values) {
        if (keys.length != values.length) {
            throw new IllegalArgumentException("Number of keys and values do not match");
        }

        long startTime = Instant.now().toEpochMilli();
        String docType = StringUtils.isBlank(docTypeOverride) ? TASK_DOC_TYPE : docTypeOverride;

        UpdateRequest request = new UpdateRequest(taskIndexName, docType, taskId);
        Map<String, Object> source =
                IntStream.range(0, keys.length)
                        .boxed()
                        .collect(Collectors.toMap(i -> keys[i], i -> values[i]));
        request.doc(source);
        LOGGER.debug(
                "Updating task: {} of workflow: {} in elasticsearch index: {}",
                taskId,
                workflowId,
                taskIndexName);
        elasticSearchClient.update(request).actionGet();
        long endTime = Instant.now().toEpochMilli();
        LOGGER.debug(
                "Time taken {} for updating task: {} of workflow: {}",
                endTime - startTime,
                taskId,
                workflowId);
        Monitors.recordESIndexTime("update_task", docType, endTime - startTime);
        Monitors.recordWorkerQueueSize(
                "indexQueue", ((ThreadPoolExecutor) executorService).getQueue().size());
    }
Initializes the indexes templates task_log, message and event, and mappings.
es6-persistence/src/main/java/com/netflix/conductor/es6/dao/index/ElasticSearchDAOV6.java