Class CustomRestHighLevelClient

  • All Implemented Interfaces:
    Closeable, AutoCloseable

    public class CustomRestHighLevelClient
    extends org.elasticsearch.client.RestHighLevelClient
    A custom Rest high level client that provide a way of using Task system on updateByQuery and deleteByQuery, by returning the response immediately (wait_for_completion set to false) see org.elasticsearch.client.RestHighLevelClient for original code.
    • Constructor Summary

      Constructors 
      Constructor Description
      CustomRestHighLevelClient​(org.elasticsearch.client.RestClientBuilder restClientBuilder)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.elasticsearch.client.tasks.TaskSubmissionResponse submitDeleteByQuery​(org.elasticsearch.index.reindex.DeleteByQueryRequest deleteByQueryRequest, org.elasticsearch.client.RequestOptions options)
      Executes a delete by query request.
      org.elasticsearch.client.tasks.TaskSubmissionResponse submitUpdateByQuery​(org.elasticsearch.index.reindex.UpdateByQueryRequest updateByQueryRequest, org.elasticsearch.client.RequestOptions options)
      Executes a update by query request.
      • Methods inherited from class org.elasticsearch.client.RestHighLevelClient

        bulk, bulkAsync, ccr, clearScroll, clearScrollAsync, close, cluster, convertExistsResponse, count, countAsync, dataFrame, delete, deleteAsync, deleteByQuery, deleteByQueryAsync, deleteByQueryRethrottle, deleteByQueryRethrottleAsync, deleteScript, deleteScriptAsync, exists, existsAsync, existsSource, existsSourceAsync, explain, explainAsync, fieldCaps, fieldCapsAsync, get, getAsync, getLowLevelClient, getScript, getScriptAsync, graph, index, indexAsync, indexLifecycle, indices, info, ingest, license, machineLearning, mget, mgetAsync, migration, msearch, msearchAsync, msearchTemplate, msearchTemplateAsync, mtermvectors, mtermvectorsAsync, multiGet, multiGetAsync, multiSearch, multiSearchAsync, parseEntity, parseResponseException, performRequest, performRequestAndParseEntity, performRequestAndParseOptionalEntity, performRequestAsync, performRequestAsyncAndParseEntity, performRequestAsyncAndParseOptionalEntity, ping, putScript, putScriptAsync, rankEval, rankEvalAsync, reindex, reindexAsync, reindexRethrottle, reindexRethrottleAsync, rollup, scroll, scrollAsync, search, searchAsync, searchScroll, searchScrollAsync, searchTemplate, searchTemplateAsync, security, snapshot, submitReindexTask, tasks, termvectors, termvectorsAsync, update, updateAsync, updateByQuery, updateByQueryAsync, updateByQueryRethrottle, updateByQueryRethrottleAsync, watcher, xpack
    • Constructor Detail

      • CustomRestHighLevelClient

        public CustomRestHighLevelClient​(org.elasticsearch.client.RestClientBuilder restClientBuilder)
    • Method Detail

      • submitDeleteByQuery

        public final org.elasticsearch.client.tasks.TaskSubmissionResponse submitDeleteByQuery​(org.elasticsearch.index.reindex.DeleteByQueryRequest deleteByQueryRequest,
                                                                                               org.elasticsearch.client.RequestOptions options)
                                                                                        throws IOException
        Executes a delete by query request. See Delete By Query API on elastic.co
        Parameters:
        deleteByQueryRequest - the request
        options - the request options (e.g. headers), use RequestOptions.DEFAULT if nothing needs to be customized
        Returns:
        the response
        Throws:
        IOException
      • submitUpdateByQuery

        public final org.elasticsearch.client.tasks.TaskSubmissionResponse submitUpdateByQuery​(org.elasticsearch.index.reindex.UpdateByQueryRequest updateByQueryRequest,
                                                                                               org.elasticsearch.client.RequestOptions options)
                                                                                        throws IOException
        Executes a update by query request. See Update By Query API on elastic.co
        Parameters:
        updateByQueryRequest - the request
        options - the request options (e.g. headers), use RequestOptions.DEFAULT if nothing needs to be customized
        Returns:
        the response
        Throws:
        IOException