private <T> SearchResult<T> search(
            String structuredQuery,
            int start,
            int size,
            List<String> sortOptions,
            String freeTextQuery,
            String docType,
            boolean idOnly,
            Class<T> clazz) {
        try {
            docType = StringUtils.isBlank(docTypeOverride) ? docType : docTypeOverride;
            BoolQueryBuilder fq = boolQueryBuilder(structuredQuery, freeTextQuery);
            final SearchRequestBuilder srb =
                    elasticSearchClient
                            .prepareSearch(getIndexName(docType))
                            .setQuery(fq)
                            .setTypes(docType)
                            .setFrom(start)
                            .setSize(size);
            if (idOnly) {
                srb.storedFields("_id");
            }
            addSortOptions(srb, sortOptions);
            return mapSearchResult(srb.get(), idOnly, clazz);
        } catch (ParserException e) {
            throw new TransientException(e.getMessage(), 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