Package org.elasticsearch.client
Class CustomRestHighLevelClient
java.lang.Object
org.elasticsearch.client.RestHighLevelClient
org.elasticsearch.client.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
ConstructorsConstructorDescriptionCustomRestHighLevelClient
(org.elasticsearch.client.RestClientBuilder restClientBuilder) -
Method Summary
Modifier and TypeMethodDescriptionfinal org.elasticsearch.client.tasks.TaskSubmissionResponse
submitDeleteByQuery
(org.elasticsearch.index.reindex.DeleteByQueryRequest deleteByQueryRequest, org.elasticsearch.client.RequestOptions options) Executes a delete by query request.final 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 Details
-
CustomRestHighLevelClient
public CustomRestHighLevelClient(org.elasticsearch.client.RestClientBuilder restClientBuilder)
-
-
Method Details
-
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 requestoptions
- the request options (e.g. headers), useRequestOptions.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 requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
IOException
-