Package org.elasticsearch.client
Class IndicesClient
java.lang.Object
org.elasticsearch.client.IndicesClient
public final class IndicesClient
extends java.lang.Object
A wrapper for the
RestHighLevelClient
that provides methods for accessing the Indices API.
-
Method Summary
Modifier and Type Method Description AnalyzeResponse
analyze(AnalyzeRequest request, RequestOptions options)
Calls the analyze API See Analyze API on elastic.coCancellable
analyzeAsync(AnalyzeRequest request, RequestOptions options, ActionListener<AnalyzeResponse> listener)
Asynchronously calls the analyze API See Analyze API on elastic.coClearIndicesCacheResponse
clearCache(ClearIndicesCacheRequest clearIndicesCacheRequest, RequestOptions options)
Clears the cache of one or more indices using the Clear Cache API.Cancellable
clearCacheAsync(ClearIndicesCacheRequest clearIndicesCacheRequest, RequestOptions options, ActionListener<ClearIndicesCacheResponse> listener)
Asynchronously clears the cache of one or more indices using the Clear Cache API.ResizeResponse
clone(ResizeRequest resizeRequest, RequestOptions options)
Deprecated.ResizeResponse
clone(ResizeRequest resizeRequest, RequestOptions options)
Clones an index using the Clone Index API.Cancellable
cloneAsync(ResizeRequest resizeRequest, RequestOptions options, ActionListener<ResizeResponse> listener)
Deprecated.Cancellable
cloneAsync(ResizeRequest resizeRequest, RequestOptions options, ActionListener<ResizeResponse> listener)
Asynchronously clones an index using the Clone Index API.CloseIndexResponse
close(CloseIndexRequest closeIndexRequest, RequestOptions options)
Closes an index using the Close Index API.Cancellable
closeAsync(CloseIndexRequest closeIndexRequest, RequestOptions options, ActionListener<CloseIndexResponse> listener)
Asynchronously closes an index using the Close Index API.CreateIndexResponse
create(CreateIndexRequest createIndexRequest, RequestOptions options)
Deprecated.This method uses an old request object which still refers to types, a deprecated feature.CreateIndexResponse
create(CreateIndexRequest createIndexRequest, RequestOptions options)
Creates an index using the Create Index API.Cancellable
createAsync(CreateIndexRequest createIndexRequest, RequestOptions options, ActionListener<CreateIndexResponse> listener)
Deprecated.This method uses an old request object which still refers to types, a deprecated feature.Cancellable
createAsync(CreateIndexRequest createIndexRequest, RequestOptions options, ActionListener<CreateIndexResponse> listener)
Asynchronously creates an index using the Create Index API.AcknowledgedResponse
delete(DeleteIndexRequest deleteIndexRequest, RequestOptions options)
Deletes an index using the Delete Index API.AcknowledgedResponse
deleteAlias(DeleteAliasRequest request, RequestOptions options)
Synchronously calls the delete alias apiCancellable
deleteAliasAsync(DeleteAliasRequest request, RequestOptions options, ActionListener<AcknowledgedResponse> listener)
Asynchronously calls the delete alias apiCancellable
deleteAsync(DeleteIndexRequest deleteIndexRequest, RequestOptions options, ActionListener<AcknowledgedResponse> listener)
Asynchronously deletes an index using the Delete Index API.AcknowledgedResponse
deleteIndexTemplate(DeleteComposableIndexTemplateRequest request, RequestOptions options)
Delete an index template using the Index Templates API See Index Templates API on elastic.coCancellable
deleteIndexTemplateAsync(DeleteComposableIndexTemplateRequest request, RequestOptions options, ActionListener<AcknowledgedResponse> listener)
Asynchronously delete an index template using the Index Templates API See Index Templates API on elastic.coAcknowledgedResponse
deleteTemplate(DeleteIndexTemplateRequest request, RequestOptions options)
Delete an index template using the Index Templates API See Index Templates API on elastic.coCancellable
deleteTemplateAsync(DeleteIndexTemplateRequest request, RequestOptions options, ActionListener<AcknowledgedResponse> listener)
Asynchronously delete an index template using the Index Templates API See Index Templates API on elastic.coboolean
exists(GetIndexRequest request, RequestOptions options)
Deprecated.This method uses an old request object which still refers to types, a deprecated feature.boolean
exists(GetIndexRequest request, RequestOptions options)
Checks if the index (indices) exists or not.boolean
existsAlias(GetAliasesRequest getAliasesRequest, RequestOptions options)
Checks if one or more aliases exist using the Aliases Exist API.Cancellable
existsAliasAsync(GetAliasesRequest getAliasesRequest, RequestOptions options, ActionListener<java.lang.Boolean> listener)
Asynchronously checks if one or more aliases exist using the Aliases Exist API.Cancellable
existsAsync(GetIndexRequest request, RequestOptions options, ActionListener<java.lang.Boolean> listener)
Deprecated.This method uses an old request object which still refers to types, a deprecated feature.Cancellable
existsAsync(GetIndexRequest request, RequestOptions options, ActionListener<java.lang.Boolean> listener)
Asynchronously checks if the index (indices) exists or not.boolean
existsIndexTemplate(ComposableIndexTemplateExistRequest indexTemplatesRequest, RequestOptions options)
Uses the Index Templates API to determine if index templates existCancellable
existsIndexTemplateAsync(ComposableIndexTemplateExistRequest indexTemplatesExistRequest, RequestOptions options, ActionListener<java.lang.Boolean> listener)
Uses the Index Templates API to determine if index templates existboolean
existsTemplate(IndexTemplatesExistRequest indexTemplatesRequest, RequestOptions options)
Uses the Index Templates API to determine if index templates existCancellable
existsTemplateAsync(IndexTemplatesExistRequest indexTemplatesExistRequest, RequestOptions options, ActionListener<java.lang.Boolean> listener)
Uses the Index Templates API to determine if index templates existFlushResponse
flush(FlushRequest flushRequest, RequestOptions options)
Flush one or more indices using the Flush API.Cancellable
flushAsync(FlushRequest flushRequest, RequestOptions options, ActionListener<FlushResponse> listener)
Asynchronously flush one or more indices using the Flush API.SyncedFlushResponse
flushSynced(SyncedFlushRequest syncedFlushRequest, RequestOptions options)
Deprecated.synced flush is deprecated and will be removed in 8.0.Cancellable
flushSyncedAsync(SyncedFlushRequest syncedFlushRequest, RequestOptions options, ActionListener<SyncedFlushResponse> listener)
Deprecated.synced flush is deprecated and will be removed in 8.0.ForceMergeResponse
forcemerge(ForceMergeRequest forceMergeRequest, RequestOptions options)
Force merge one or more indices using the Force Merge API.ForceMergeResponse
forceMerge(ForceMergeRequest forceMergeRequest, RequestOptions options)
Deprecated.useforcemerge(ForceMergeRequest, RequestOptions)
insteadCancellable
forcemergeAsync(ForceMergeRequest forceMergeRequest, RequestOptions options, ActionListener<ForceMergeResponse> listener)
Asynchronously force merge one or more indices using the Force Merge API.Cancellable
forceMergeAsync(ForceMergeRequest forceMergeRequest, RequestOptions options, ActionListener<ForceMergeResponse> listener)
Deprecated.ShardsAcknowledgedResponse
freeze(FreezeIndexRequest request, RequestOptions options)
Synchronously calls the _freeze APICancellable
freezeAsync(FreezeIndexRequest request, RequestOptions options, ActionListener<ShardsAcknowledgedResponse> listener)
Asynchronously calls the _freeze APIGetIndexResponse
get(GetIndexRequest getIndexRequest, RequestOptions options)
Deprecated.This method uses an old request object which still refers to types, a deprecated feature.GetIndexResponse
get(GetIndexRequest getIndexRequest, RequestOptions options)
Retrieve information about one or more indexes See Indices Get Index API on elastic.coGetAliasesResponse
getAlias(GetAliasesRequest getAliasesRequest, RequestOptions options)
Gets one or more aliases using the Get Index Aliases API.Cancellable
getAliasAsync(GetAliasesRequest getAliasesRequest, RequestOptions options, ActionListener<GetAliasesResponse> listener)
Asynchronously gets one or more aliases using the Get Index Aliases API.Cancellable
getAsync(GetIndexRequest getIndexRequest, RequestOptions options, ActionListener<GetIndexResponse> listener)
Deprecated.This method uses an old request object which still refers to types, a deprecated feature.Cancellable
getAsync(GetIndexRequest getIndexRequest, RequestOptions options, ActionListener<GetIndexResponse> listener)
Retrieve information about one or more indexes See Indices Get Index API on elastic.coGetFieldMappingsResponse
getFieldMapping(GetFieldMappingsRequest getFieldMappingsRequest, RequestOptions options)
Deprecated.This method uses old request and response objects which still refer to types, a deprecated feature.GetFieldMappingsResponse
getFieldMapping(GetFieldMappingsRequest getFieldMappingsRequest, RequestOptions options)
Retrieves the field mappings on an index or indices using the Get Field Mapping API.Cancellable
getFieldMappingAsync(GetFieldMappingsRequest getFieldMappingsRequest, RequestOptions options, ActionListener<GetFieldMappingsResponse> listener)
Deprecated.This method uses old request and response objects which still refer to types, a deprecated feature.Cancellable
getFieldMappingAsync(GetFieldMappingsRequest getFieldMappingsRequest, RequestOptions options, ActionListener<GetFieldMappingsResponse> listener)
Asynchronously retrieves the field mappings on an index or indices using the Get Field Mapping API.GetComposableIndexTemplatesResponse
getIndexTemplate(GetComposableIndexTemplateRequest getIndexTemplatesRequest, RequestOptions options)
Gets index templates using the Index Templates API See Index Templates API on elastic.coGetIndexTemplatesResponse
getIndexTemplate(GetIndexTemplatesRequest getIndexTemplatesRequest, RequestOptions options)
Gets index templates using the Index Templates API See Index Templates API on elastic.coCancellable
getIndexTemplateAsync(GetComposableIndexTemplateRequest getIndexTemplatesRequest, RequestOptions options, ActionListener<GetComposableIndexTemplatesResponse> listener)
Asynchronously gets index templates using the Index Templates API See Index Templates API on elastic.coCancellable
getIndexTemplateAsync(GetIndexTemplatesRequest getIndexTemplatesRequest, RequestOptions options, ActionListener<GetIndexTemplatesResponse> listener)
Asynchronously gets index templates using the Index Templates API See Index Templates API on elastic.coGetMappingsResponse
getMapping(GetMappingsRequest getMappingsRequest, RequestOptions options)
Deprecated.This method uses old request and response objects which still refer to types, a deprecated feature.GetMappingsResponse
getMapping(GetMappingsRequest getMappingsRequest, RequestOptions options)
Retrieves the mappings on an index or indices using the Get Mapping API.Cancellable
getMappingAsync(GetMappingsRequest getMappingsRequest, RequestOptions options, ActionListener<GetMappingsResponse> listener)
Deprecated.This method uses old request and response objects which still refer to types, a deprecated feature.Cancellable
getMappingAsync(GetMappingsRequest getMappingsRequest, RequestOptions options, ActionListener<GetMappingsResponse> listener)
Asynchronously retrieves the mappings on an index on indices using the Get Mapping API.GetSettingsResponse
getSettings(GetSettingsRequest getSettingsRequest, RequestOptions options)
Retrieve the settings of one or more indices.Cancellable
getSettingsAsync(GetSettingsRequest getSettingsRequest, RequestOptions options, ActionListener<GetSettingsResponse> listener)
Asynchronously retrieve the settings of one or more indices.GetIndexTemplatesResponse
getTemplate(GetIndexTemplatesRequest getIndexTemplatesRequest, RequestOptions options)
Deprecated.This method uses an old response object which still refers to types, a deprecated feature.Cancellable
getTemplateAsync(GetIndexTemplatesRequest getIndexTemplatesRequest, RequestOptions options, ActionListener<GetIndexTemplatesResponse> listener)
Deprecated.This method uses an old response object which still refers to types, a deprecated feature.OpenIndexResponse
open(OpenIndexRequest openIndexRequest, RequestOptions options)
Opens an index using the Open Index API.Cancellable
openAsync(OpenIndexRequest openIndexRequest, RequestOptions options, ActionListener<OpenIndexResponse> listener)
Asynchronously opens an index using the Open Index API.AcknowledgedResponse
putIndexTemplate(PutComposableIndexTemplateRequest putIndexTemplateRequest, RequestOptions options)
Puts an index template using the Index Templates API.Cancellable
putIndexTemplateAsync(PutComposableIndexTemplateRequest putIndexTemplateRequest, RequestOptions options, ActionListener<AcknowledgedResponse> listener)
Asynchronously puts an index template using the Index Templates API.AcknowledgedResponse
putMapping(PutMappingRequest putMappingRequest, RequestOptions options)
Deprecated.This method uses an old request object which still refers to types, a deprecated feature.AcknowledgedResponse
putMapping(PutMappingRequest putMappingRequest, RequestOptions options)
Updates the mappings on an index using the Put Mapping API.Cancellable
putMappingAsync(PutMappingRequest putMappingRequest, RequestOptions options, ActionListener<AcknowledgedResponse> listener)
Deprecated.This method uses an old request object which still refers to types, a deprecated feature.Cancellable
putMappingAsync(PutMappingRequest putMappingRequest, RequestOptions options, ActionListener<AcknowledgedResponse> listener)
Asynchronously updates the mappings on an index using the Put Mapping API.AcknowledgedResponse
putSettings(UpdateSettingsRequest updateSettingsRequest, RequestOptions options)
Updates specific index level settings using the Update Indices Settings API.Cancellable
putSettingsAsync(UpdateSettingsRequest updateSettingsRequest, RequestOptions options, ActionListener<AcknowledgedResponse> listener)
Asynchronously updates specific index level settings using the Update Indices Settings API.AcknowledgedResponse
putTemplate(PutIndexTemplateRequest putIndexTemplateRequest, RequestOptions options)
Deprecated.This old form of request allows types in mappings.AcknowledgedResponse
putTemplate(PutIndexTemplateRequest putIndexTemplateRequest, RequestOptions options)
Puts an index template using the Index Templates API.Cancellable
putTemplateAsync(PutIndexTemplateRequest putIndexTemplateRequest, RequestOptions options, ActionListener<AcknowledgedResponse> listener)
Deprecated.This old form of request allows types in mappings.Cancellable
putTemplateAsync(PutIndexTemplateRequest putIndexTemplateRequest, RequestOptions options, ActionListener<AcknowledgedResponse> listener)
Asynchronously puts an index template using the Index Templates API.RefreshResponse
refresh(RefreshRequest refreshRequest, RequestOptions options)
Refresh one or more indices using the Refresh API.Cancellable
refreshAsync(RefreshRequest refreshRequest, RequestOptions options, ActionListener<RefreshResponse> listener)
Asynchronously refresh one or more indices using the Refresh API.ReloadAnalyzersResponse
reloadAnalyzers(ReloadAnalyzersRequest request, RequestOptions options)
Synchronously calls the _reload_search_analyzers APICancellable
reloadAnalyzersAsync(ReloadAnalyzersRequest request, RequestOptions options, ActionListener<ReloadAnalyzersResponse> listener)
Asynchronously calls the _reload_search_analyzers APIRolloverResponse
rollover(RolloverRequest rolloverRequest, RequestOptions options)
Deprecated.This method uses deprecated request and response objects.RolloverResponse
rollover(RolloverRequest rolloverRequest, RequestOptions options)
Rolls over an index using the Rollover Index API.Cancellable
rolloverAsync(RolloverRequest rolloverRequest, RequestOptions options, ActionListener<RolloverResponse> listener)
Deprecated.This method uses deprecated request and response objects.Cancellable
rolloverAsync(RolloverRequest rolloverRequest, RequestOptions options, ActionListener<RolloverResponse> listener)
Asynchronously rolls over an index using the Rollover Index API.ResizeResponse
shrink(ResizeRequest resizeRequest, RequestOptions options)
Deprecated.ResizeResponse
shrink(ResizeRequest resizeRequest, RequestOptions options)
Shrinks an index using the Shrink Index API.Cancellable
shrinkAsync(ResizeRequest resizeRequest, RequestOptions options, ActionListener<ResizeResponse> listener)
Deprecated.Cancellable
shrinkAsync(ResizeRequest resizeRequest, RequestOptions options, ActionListener<ResizeResponse> listener)
Asynchronously shrinks an index using the Shrink index API.SimulateIndexTemplateResponse
simulateIndexTemplate(SimulateIndexTemplateRequest simulateIndexTemplateRequest, RequestOptions options)
Simulates matching index name against the existing index templates in the system.Cancellable
simulateIndexTemplateAsync(SimulateIndexTemplateRequest simulateIndexTemplateRequest, RequestOptions options, ActionListener<SimulateIndexTemplateResponse> listener)
Asynchronously simulates matching index name against the existing index templates in the system.ResizeResponse
split(ResizeRequest resizeRequest, RequestOptions options)
Deprecated.ResizeResponse
split(ResizeRequest resizeRequest, RequestOptions options)
Splits an index using the Split Index API.Cancellable
splitAsync(ResizeRequest resizeRequest, RequestOptions options, ActionListener<ResizeResponse> listener)
Deprecated.Cancellable
splitAsync(ResizeRequest resizeRequest, RequestOptions options, ActionListener<ResizeResponse> listener)
Asynchronously splits an index using the Split Index API.ShardsAcknowledgedResponse
unfreeze(UnfreezeIndexRequest request, RequestOptions options)
Synchronously calls the _unfreeze APICancellable
unfreezeAsync(UnfreezeIndexRequest request, RequestOptions options, ActionListener<ShardsAcknowledgedResponse> listener)
Asynchronously calls the _unfreeze APIAcknowledgedResponse
updateAliases(IndicesAliasesRequest indicesAliasesRequest, RequestOptions options)
Updates aliases using the Index Aliases API.Cancellable
updateAliasesAsync(IndicesAliasesRequest indicesAliasesRequest, RequestOptions options, ActionListener<AcknowledgedResponse> listener)
Asynchronously updates aliases using the Index Aliases API.ValidateQueryResponse
validateQuery(ValidateQueryRequest validateQueryRequest, RequestOptions options)
Validate a potentially expensive query without executing it.Cancellable
validateQueryAsync(ValidateQueryRequest validateQueryRequest, RequestOptions options, ActionListener<ValidateQueryResponse> listener)
Asynchronously validate a potentially expensive query without executing it.
-
Method Details
-
delete
public AcknowledgedResponse delete(DeleteIndexRequest deleteIndexRequest, RequestOptions options) throws java.io.IOExceptionDeletes an index using the Delete Index API. See Delete Index API on elastic.co- Parameters:
deleteIndexRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
deleteAsync
public Cancellable deleteAsync(DeleteIndexRequest deleteIndexRequest, RequestOptions options, ActionListener<AcknowledgedResponse> listener)Asynchronously deletes an index using the Delete Index API. See Delete Index API on elastic.co- Parameters:
deleteIndexRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
create
public CreateIndexResponse create(CreateIndexRequest createIndexRequest, RequestOptions options) throws java.io.IOExceptionCreates an index using the Create Index API. See Create Index API on elastic.co- Parameters:
createIndexRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
createAsync
public Cancellable createAsync(CreateIndexRequest createIndexRequest, RequestOptions options, ActionListener<CreateIndexResponse> listener)Asynchronously creates an index using the Create Index API. See Create Index API on elastic.co- Parameters:
createIndexRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
create
@Deprecated public CreateIndexResponse create(CreateIndexRequest createIndexRequest, RequestOptions options) throws java.io.IOExceptionDeprecated.This method uses an old request object which still refers to types, a deprecated feature. The methodcreate(CreateIndexRequest, RequestOptions)
should be used instead, which accepts a new request object.Creates an index using the Create Index API. See Create Index API on elastic.co- Parameters:
createIndexRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
createAsync
@Deprecated public Cancellable createAsync(CreateIndexRequest createIndexRequest, RequestOptions options, ActionListener<CreateIndexResponse> listener)Deprecated.This method uses an old request object which still refers to types, a deprecated feature. The methodcreateAsync(CreateIndexRequest, RequestOptions, ActionListener)
should be used instead, which accepts a new request object.Asynchronously creates an index using the Create Index API. See Create Index API on elastic.co- Parameters:
createIndexRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
putMapping
public AcknowledgedResponse putMapping(PutMappingRequest putMappingRequest, RequestOptions options) throws java.io.IOExceptionUpdates the mappings on an index using the Put Mapping API. See Put Mapping API on elastic.co- Parameters:
putMappingRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
putMappingAsync
public Cancellable putMappingAsync(PutMappingRequest putMappingRequest, RequestOptions options, ActionListener<AcknowledgedResponse> listener)Asynchronously updates the mappings on an index using the Put Mapping API. See Put Mapping API on elastic.co- Parameters:
putMappingRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
putMapping
@Deprecated public AcknowledgedResponse putMapping(PutMappingRequest putMappingRequest, RequestOptions options) throws java.io.IOExceptionDeprecated.This method uses an old request object which still refers to types, a deprecated feature. The methodputMapping(PutMappingRequest, RequestOptions)
should be used instead, which accepts a new request object.Updates the mappings on an index using the Put Mapping API. See Put Mapping API on elastic.co- Parameters:
putMappingRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
putMappingAsync
@Deprecated public Cancellable putMappingAsync(PutMappingRequest putMappingRequest, RequestOptions options, ActionListener<AcknowledgedResponse> listener)Deprecated.This method uses an old request object which still refers to types, a deprecated feature. The methodputMappingAsync(PutMappingRequest, RequestOptions, ActionListener)
should be used instead, which accepts a new request object.Asynchronously updates the mappings on an index using the Put Mapping API. See Put Mapping API on elastic.co- Parameters:
putMappingRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
getMapping
public GetMappingsResponse getMapping(GetMappingsRequest getMappingsRequest, RequestOptions options) throws java.io.IOExceptionRetrieves the mappings on an index or indices using the Get Mapping API. See Get Mapping API on elastic.co- Parameters:
getMappingsRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
getMappingAsync
public Cancellable getMappingAsync(GetMappingsRequest getMappingsRequest, RequestOptions options, ActionListener<GetMappingsResponse> listener)Asynchronously retrieves the mappings on an index on indices using the Get Mapping API. See Get Mapping API on elastic.co- Parameters:
getMappingsRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
getMapping
@Deprecated public GetMappingsResponse getMapping(GetMappingsRequest getMappingsRequest, RequestOptions options) throws java.io.IOExceptionDeprecated.This method uses old request and response objects which still refer to types, a deprecated feature. The methodgetMapping(GetMappingsRequest, RequestOptions)
should be used instead, which accepts a new request object.Retrieves the mappings on an index or indices using the Get Mapping API. See Get Mapping API on elastic.co- Parameters:
getMappingsRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
getMappingAsync
@Deprecated public Cancellable getMappingAsync(GetMappingsRequest getMappingsRequest, RequestOptions options, ActionListener<GetMappingsResponse> listener)Deprecated.This method uses old request and response objects which still refer to types, a deprecated feature. The methodgetMapping(GetMappingsRequest, RequestOptions)
should be used instead, which accepts a new request object.Asynchronously retrieves the mappings on an index on indices using the Get Mapping API. See Get Mapping API on elastic.co- Parameters:
getMappingsRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
getFieldMapping
@Deprecated public GetFieldMappingsResponse getFieldMapping(GetFieldMappingsRequest getFieldMappingsRequest, RequestOptions options) throws java.io.IOExceptionDeprecated.This method uses old request and response objects which still refer to types, a deprecated feature. The methodgetFieldMapping(GetFieldMappingsRequest, RequestOptions)
should be used instead, which accepts a new request object.Retrieves the field mappings on an index or indices using the Get Field Mapping API. See Get Field Mapping API on elastic.co- Parameters:
getFieldMappingsRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
getFieldMappingAsync
@Deprecated public Cancellable getFieldMappingAsync(GetFieldMappingsRequest getFieldMappingsRequest, RequestOptions options, ActionListener<GetFieldMappingsResponse> listener)Deprecated.This method uses old request and response objects which still refer to types, a deprecated feature. The methodgetFieldMappingAsync(GetFieldMappingsRequest, RequestOptions, ActionListener)
should be used instead, which accepts a new request object.Asynchronously retrieves the field mappings on an index on indices using the Get Field Mapping API. See Get Field Mapping API on elastic.co- Parameters:
getFieldMappingsRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
getFieldMapping
public GetFieldMappingsResponse getFieldMapping(GetFieldMappingsRequest getFieldMappingsRequest, RequestOptions options) throws java.io.IOExceptionRetrieves the field mappings on an index or indices using the Get Field Mapping API. See Get Field Mapping API on elastic.co- Parameters:
getFieldMappingsRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
getFieldMappingAsync
public Cancellable getFieldMappingAsync(GetFieldMappingsRequest getFieldMappingsRequest, RequestOptions options, ActionListener<GetFieldMappingsResponse> listener)Asynchronously retrieves the field mappings on an index or indices using the Get Field Mapping API. See Get Field Mapping API on elastic.co- Parameters:
getFieldMappingsRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
updateAliases
public AcknowledgedResponse updateAliases(IndicesAliasesRequest indicesAliasesRequest, RequestOptions options) throws java.io.IOExceptionUpdates aliases using the Index Aliases API. See Index Aliases API on elastic.co- Parameters:
indicesAliasesRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
updateAliasesAsync
public Cancellable updateAliasesAsync(IndicesAliasesRequest indicesAliasesRequest, RequestOptions options, ActionListener<AcknowledgedResponse> listener)Asynchronously updates aliases using the Index Aliases API. See Index Aliases API on elastic.co- Parameters:
indicesAliasesRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
open
public OpenIndexResponse open(OpenIndexRequest openIndexRequest, RequestOptions options) throws java.io.IOExceptionOpens an index using the Open Index API. See Open Index API on elastic.co- Parameters:
openIndexRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
openAsync
public Cancellable openAsync(OpenIndexRequest openIndexRequest, RequestOptions options, ActionListener<OpenIndexResponse> listener)Asynchronously opens an index using the Open Index API. See Open Index API on elastic.co- Parameters:
openIndexRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
close
public CloseIndexResponse close(CloseIndexRequest closeIndexRequest, RequestOptions options) throws java.io.IOExceptionCloses an index using the Close Index API. See Close Index API on elastic.co- Parameters:
closeIndexRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
closeAsync
public Cancellable closeAsync(CloseIndexRequest closeIndexRequest, RequestOptions options, ActionListener<CloseIndexResponse> listener)Asynchronously closes an index using the Close Index API. See Close Index API on elastic.co- Parameters:
closeIndexRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
existsAlias
public boolean existsAlias(GetAliasesRequest getAliasesRequest, RequestOptions options) throws java.io.IOExceptionChecks if one or more aliases exist using the Aliases Exist API. See Indices Aliases API on elastic.co- Parameters:
getAliasesRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request
-
existsAliasAsync
public Cancellable existsAliasAsync(GetAliasesRequest getAliasesRequest, RequestOptions options, ActionListener<java.lang.Boolean> listener)Asynchronously checks if one or more aliases exist using the Aliases Exist API. See Indices Aliases API on elastic.co- Parameters:
getAliasesRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
refresh
public RefreshResponse refresh(RefreshRequest refreshRequest, RequestOptions options) throws java.io.IOExceptionRefresh one or more indices using the Refresh API. See Refresh API on elastic.co- Parameters:
refreshRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
refreshAsync
public Cancellable refreshAsync(RefreshRequest refreshRequest, RequestOptions options, ActionListener<RefreshResponse> listener)Asynchronously refresh one or more indices using the Refresh API. See Refresh API on elastic.co- Parameters:
refreshRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
flush
public FlushResponse flush(FlushRequest flushRequest, RequestOptions options) throws java.io.IOExceptionFlush one or more indices using the Flush API. See Flush API on elastic.co- Parameters:
flushRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
flushAsync
public Cancellable flushAsync(FlushRequest flushRequest, RequestOptions options, ActionListener<FlushResponse> listener)Asynchronously flush one or more indices using the Flush API. See Flush API on elastic.co- Parameters:
flushRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
flushSynced
@Deprecated public SyncedFlushResponse flushSynced(SyncedFlushRequest syncedFlushRequest, RequestOptions options) throws java.io.IOExceptionDeprecated.synced flush is deprecated and will be removed in 8.0. Useflush(FlushRequest, RequestOptions)
instead.Initiate a synced flush manually using the synced flush API. See Synced flush API on elastic.co- Parameters:
syncedFlushRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
flushSyncedAsync
@Deprecated public Cancellable flushSyncedAsync(SyncedFlushRequest syncedFlushRequest, RequestOptions options, ActionListener<SyncedFlushResponse> listener)Deprecated.synced flush is deprecated and will be removed in 8.0. UseflushAsync(FlushRequest, RequestOptions, ActionListener)
instead.Asynchronously initiate a synced flush manually using the synced flush API. See Synced flush API on elastic.co- Parameters:
syncedFlushRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
getSettings
public GetSettingsResponse getSettings(GetSettingsRequest getSettingsRequest, RequestOptions options) throws java.io.IOExceptionRetrieve the settings of one or more indices. See Indices Get Settings API on elastic.co- Parameters:
getSettingsRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
getSettingsAsync
public Cancellable getSettingsAsync(GetSettingsRequest getSettingsRequest, RequestOptions options, ActionListener<GetSettingsResponse> listener)Asynchronously retrieve the settings of one or more indices. See Indices Get Settings API on elastic.co- Parameters:
getSettingsRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
get
public GetIndexResponse get(GetIndexRequest getIndexRequest, RequestOptions options) throws java.io.IOExceptionRetrieve information about one or more indexes See Indices Get Index API on elastic.co- Parameters:
getIndexRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
getAsync
public Cancellable getAsync(GetIndexRequest getIndexRequest, RequestOptions options, ActionListener<GetIndexResponse> listener)Retrieve information about one or more indexes See Indices Get Index API on elastic.co- Parameters:
getIndexRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
get
@Deprecated public GetIndexResponse get(GetIndexRequest getIndexRequest, RequestOptions options) throws java.io.IOExceptionDeprecated.This method uses an old request object which still refers to types, a deprecated feature. The methodget(GetIndexRequest, RequestOptions)
should be used instead, which accepts a new request object.Retrieve information about one or more indexes See Indices Get Index API on elastic.co- Parameters:
getIndexRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
getAsync
@Deprecated public Cancellable getAsync(GetIndexRequest getIndexRequest, RequestOptions options, ActionListener<GetIndexResponse> listener)Deprecated.This method uses an old request object which still refers to types, a deprecated feature. The methodgetAsync(GetIndexRequest, RequestOptions, ActionListener)
should be used instead, which accepts a new request object.Retrieve information about one or more indexes See Indices Get Index API on elastic.co- Parameters:
getIndexRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
forceMerge
@Deprecated public ForceMergeResponse forceMerge(ForceMergeRequest forceMergeRequest, RequestOptions options) throws java.io.IOExceptionDeprecated.useforcemerge(ForceMergeRequest, RequestOptions)
insteadForce merge one or more indices using the Force Merge API. See Force Merge API on elastic.co- Parameters:
forceMergeRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
forcemerge
public ForceMergeResponse forcemerge(ForceMergeRequest forceMergeRequest, RequestOptions options) throws java.io.IOExceptionForce merge one or more indices using the Force Merge API. See Force Merge API on elastic.co- Parameters:
forceMergeRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
forceMergeAsync
@Deprecated public Cancellable forceMergeAsync(ForceMergeRequest forceMergeRequest, RequestOptions options, ActionListener<ForceMergeResponse> listener)Deprecated.Asynchronously force merge one or more indices using the Force Merge API. See Force Merge API on elastic.co- Parameters:
forceMergeRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
forcemergeAsync
public Cancellable forcemergeAsync(ForceMergeRequest forceMergeRequest, RequestOptions options, ActionListener<ForceMergeResponse> listener)Asynchronously force merge one or more indices using the Force Merge API. See Force Merge API on elastic.co- Parameters:
forceMergeRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
clearCache
public ClearIndicesCacheResponse clearCache(ClearIndicesCacheRequest clearIndicesCacheRequest, RequestOptions options) throws java.io.IOExceptionClears the cache of one or more indices using the Clear Cache API. See Clear Cache API on elastic.co- Parameters:
clearIndicesCacheRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
clearCacheAsync
public Cancellable clearCacheAsync(ClearIndicesCacheRequest clearIndicesCacheRequest, RequestOptions options, ActionListener<ClearIndicesCacheResponse> listener)Asynchronously clears the cache of one or more indices using the Clear Cache API. See Clear Cache API on elastic.co- Parameters:
clearIndicesCacheRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
exists
Checks if the index (indices) exists or not. See Indices Exists API on elastic.co- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request
-
existsAsync
public Cancellable existsAsync(GetIndexRequest request, RequestOptions options, ActionListener<java.lang.Boolean> listener)Asynchronously checks if the index (indices) exists or not. See Indices Exists API on elastic.co- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
exists
@Deprecated public boolean exists(GetIndexRequest request, RequestOptions options) throws java.io.IOExceptionDeprecated.This method uses an old request object which still refers to types, a deprecated feature. The methodexists(GetIndexRequest, RequestOptions)
should be used instead, which accepts a new request object.Checks if the index (indices) exists or not. See Indices Exists API on elastic.co- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request
-
existsAsync
@Deprecated public Cancellable existsAsync(GetIndexRequest request, RequestOptions options, ActionListener<java.lang.Boolean> listener)Deprecated.This method uses an old request object which still refers to types, a deprecated feature. The methodexistsAsync(GetIndexRequest, RequestOptions, ActionListener)
should be used instead, which accepts a new request object.Asynchronously checks if the index (indices) exists or not. See Indices Exists API on elastic.co- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
shrink
public ResizeResponse shrink(ResizeRequest resizeRequest, RequestOptions options) throws java.io.IOExceptionShrinks an index using the Shrink Index API. See Shrink Index API on elastic.co- Parameters:
resizeRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
shrink
@Deprecated public ResizeResponse shrink(ResizeRequest resizeRequest, RequestOptions options) throws java.io.IOExceptionDeprecated.Shrinks an index using the Shrink Index API. See Shrink Index API on elastic.co- Parameters:
resizeRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
shrinkAsync
public Cancellable shrinkAsync(ResizeRequest resizeRequest, RequestOptions options, ActionListener<ResizeResponse> listener)Asynchronously shrinks an index using the Shrink index API. See Shrink Index API on elastic.co- Parameters:
resizeRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
shrinkAsync
@Deprecated public Cancellable shrinkAsync(ResizeRequest resizeRequest, RequestOptions options, ActionListener<ResizeResponse> listener)Deprecated.Asynchronously shrinks an index using the Shrink index API. See Shrink Index API on elastic.co- Parameters:
resizeRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
split
public ResizeResponse split(ResizeRequest resizeRequest, RequestOptions options) throws java.io.IOExceptionSplits an index using the Split Index API. See Split Index API on elastic.co- Parameters:
resizeRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
split
@Deprecated public ResizeResponse split(ResizeRequest resizeRequest, RequestOptions options) throws java.io.IOExceptionDeprecated.Splits an index using the Split Index API. See Split Index API on elastic.co- Parameters:
resizeRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
splitAsync
public Cancellable splitAsync(ResizeRequest resizeRequest, RequestOptions options, ActionListener<ResizeResponse> listener)Asynchronously splits an index using the Split Index API. See Split Index API on elastic.co- Parameters:
resizeRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
splitAsync
@Deprecated public Cancellable splitAsync(ResizeRequest resizeRequest, RequestOptions options, ActionListener<ResizeResponse> listener)Deprecated.Asynchronously splits an index using the Split Index API. See Split Index API on elastic.co- Parameters:
resizeRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
clone
public ResizeResponse clone(ResizeRequest resizeRequest, RequestOptions options) throws java.io.IOExceptionClones an index using the Clone Index API. See Clone Index API on elastic.co- Parameters:
resizeRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
clone
@Deprecated public ResizeResponse clone(ResizeRequest resizeRequest, RequestOptions options) throws java.io.IOExceptionDeprecated.Clones an index using the Clone Index API. See Clone Index API on elastic.co- Parameters:
resizeRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
cloneAsync
public Cancellable cloneAsync(ResizeRequest resizeRequest, RequestOptions options, ActionListener<ResizeResponse> listener)Asynchronously clones an index using the Clone Index API. See Clone Index API on elastic.co- Parameters:
resizeRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
cloneAsync
@Deprecated public Cancellable cloneAsync(ResizeRequest resizeRequest, RequestOptions options, ActionListener<ResizeResponse> listener)Deprecated.Asynchronously clones an index using the Clone Index API. See Clone Index API on elastic.co- Parameters:
resizeRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
rollover
public RolloverResponse rollover(RolloverRequest rolloverRequest, RequestOptions options) throws java.io.IOExceptionRolls over an index using the Rollover Index API. See Rollover Index API on elastic.co- Parameters:
rolloverRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
rolloverAsync
public Cancellable rolloverAsync(RolloverRequest rolloverRequest, RequestOptions options, ActionListener<RolloverResponse> listener)Asynchronously rolls over an index using the Rollover Index API. See Rollover Index API on elastic.co- Parameters:
rolloverRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
rollover
@Deprecated public RolloverResponse rollover(RolloverRequest rolloverRequest, RequestOptions options) throws java.io.IOExceptionDeprecated.This method uses deprecated request and response objects. The methodrollover(RolloverRequest, RequestOptions)
should be used instead, which accepts a new request object.Rolls over an index using the Rollover Index API. See Rollover Index API on elastic.co- Parameters:
rolloverRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
rolloverAsync
@Deprecated public Cancellable rolloverAsync(RolloverRequest rolloverRequest, RequestOptions options, ActionListener<RolloverResponse> listener)Deprecated.This method uses deprecated request and response objects. The methodrolloverAsync(RolloverRequest, RequestOptions, ActionListener)
should be used instead, which accepts a new request object.Asynchronously rolls over an index using the Rollover Index API. See Rollover Index API on elastic.co- Parameters:
rolloverRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
getAlias
public GetAliasesResponse getAlias(GetAliasesRequest getAliasesRequest, RequestOptions options) throws java.io.IOExceptionGets one or more aliases using the Get Index Aliases API. See Indices Aliases API on elastic.co- Parameters:
getAliasesRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
getAliasAsync
public Cancellable getAliasAsync(GetAliasesRequest getAliasesRequest, RequestOptions options, ActionListener<GetAliasesResponse> listener)Asynchronously gets one or more aliases using the Get Index Aliases API. See Indices Aliases API on elastic.co- Parameters:
getAliasesRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
putSettings
public AcknowledgedResponse putSettings(UpdateSettingsRequest updateSettingsRequest, RequestOptions options) throws java.io.IOExceptionUpdates specific index level settings using the Update Indices Settings API. See Update Indices Settings API on elastic.co- Parameters:
updateSettingsRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
putSettingsAsync
public Cancellable putSettingsAsync(UpdateSettingsRequest updateSettingsRequest, RequestOptions options, ActionListener<AcknowledgedResponse> listener)Asynchronously updates specific index level settings using the Update Indices Settings API. See Update Indices Settings API on elastic.co- Parameters:
updateSettingsRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
putTemplate
@Deprecated public AcknowledgedResponse putTemplate(PutIndexTemplateRequest putIndexTemplateRequest, RequestOptions options) throws java.io.IOExceptionDeprecated.This old form of request allows types in mappings. UseputTemplate(PutIndexTemplateRequest, RequestOptions)
instead which introduces a new request object without types.Puts an index template using the Index Templates API. See Index Templates API on elastic.co- Parameters:
putIndexTemplateRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
putTemplateAsync
@Deprecated public Cancellable putTemplateAsync(PutIndexTemplateRequest putIndexTemplateRequest, RequestOptions options, ActionListener<AcknowledgedResponse> listener)Deprecated.This old form of request allows types in mappings. UseputTemplateAsync(PutIndexTemplateRequest, RequestOptions, ActionListener)
instead which introduces a new request object without types.Asynchronously puts an index template using the Index Templates API. See Index Templates API on elastic.co- Parameters:
putIndexTemplateRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
putTemplate
public AcknowledgedResponse putTemplate(PutIndexTemplateRequest putIndexTemplateRequest, RequestOptions options) throws java.io.IOExceptionPuts an index template using the Index Templates API. See Index Templates API on elastic.co- Parameters:
putIndexTemplateRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
putTemplateAsync
public Cancellable putTemplateAsync(PutIndexTemplateRequest putIndexTemplateRequest, RequestOptions options, ActionListener<AcknowledgedResponse> listener)Asynchronously puts an index template using the Index Templates API. See Index Templates API on elastic.co- Parameters:
putIndexTemplateRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
putIndexTemplate
public AcknowledgedResponse putIndexTemplate(PutComposableIndexTemplateRequest putIndexTemplateRequest, RequestOptions options) throws java.io.IOExceptionPuts an index template using the Index Templates API. See Index Templates API on elastic.co- Parameters:
putIndexTemplateRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
putIndexTemplateAsync
public Cancellable putIndexTemplateAsync(PutComposableIndexTemplateRequest putIndexTemplateRequest, RequestOptions options, ActionListener<AcknowledgedResponse> listener)Asynchronously puts an index template using the Index Templates API. See Index Templates API on elastic.co- Parameters:
putIndexTemplateRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
simulateIndexTemplate
public SimulateIndexTemplateResponse simulateIndexTemplate(SimulateIndexTemplateRequest simulateIndexTemplateRequest, RequestOptions options) throws java.io.IOExceptionSimulates matching index name against the existing index templates in the system. See Index Templates API on elastic.co- Parameters:
simulateIndexTemplateRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
simulateIndexTemplateAsync
public Cancellable simulateIndexTemplateAsync(SimulateIndexTemplateRequest simulateIndexTemplateRequest, RequestOptions options, ActionListener<SimulateIndexTemplateResponse> listener)Asynchronously simulates matching index name against the existing index templates in the system. See Index Templates API on elastic.co- Parameters:
simulateIndexTemplateRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
validateQuery
public ValidateQueryResponse validateQuery(ValidateQueryRequest validateQueryRequest, RequestOptions options) throws java.io.IOExceptionValidate a potentially expensive query without executing it.- Parameters:
validateQueryRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
validateQueryAsync
public Cancellable validateQueryAsync(ValidateQueryRequest validateQueryRequest, RequestOptions options, ActionListener<ValidateQueryResponse> listener)Asynchronously validate a potentially expensive query without executing it.- Parameters:
validateQueryRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
getTemplate
@Deprecated public GetIndexTemplatesResponse getTemplate(GetIndexTemplatesRequest getIndexTemplatesRequest, RequestOptions options) throws java.io.IOExceptionDeprecated.This method uses an old response object which still refers to types, a deprecated feature. UsegetIndexTemplate(GetIndexTemplatesRequest, RequestOptions)
instead which returns a new response objectGets index templates using the Index Templates API. The mappings will be returned in a legacy deprecated format, where the mapping definition is nested under the type name. See Index Templates API on elastic.co- Parameters:
getIndexTemplatesRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
getIndexTemplate
public GetComposableIndexTemplatesResponse getIndexTemplate(GetComposableIndexTemplateRequest getIndexTemplatesRequest, RequestOptions options) throws java.io.IOExceptionGets index templates using the Index Templates API See Index Templates API on elastic.co- Parameters:
options
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedgetIndexTemplatesRequest
- the request- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
getIndexTemplateAsync
public Cancellable getIndexTemplateAsync(GetComposableIndexTemplateRequest getIndexTemplatesRequest, RequestOptions options, ActionListener<GetComposableIndexTemplatesResponse> listener)Asynchronously gets index templates using the Index Templates API See Index Templates API on elastic.co- Parameters:
getIndexTemplatesRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
getIndexTemplate
public GetIndexTemplatesResponse getIndexTemplate(GetIndexTemplatesRequest getIndexTemplatesRequest, RequestOptions options) throws java.io.IOExceptionGets index templates using the Index Templates API See Index Templates API on elastic.co- Parameters:
options
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedgetIndexTemplatesRequest
- the request- Returns:
- the response
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
getTemplateAsync
@Deprecated public Cancellable getTemplateAsync(GetIndexTemplatesRequest getIndexTemplatesRequest, RequestOptions options, ActionListener<GetIndexTemplatesResponse> listener)Deprecated.This method uses an old response object which still refers to types, a deprecated feature. UsegetIndexTemplateAsync(GetIndexTemplatesRequest, RequestOptions, ActionListener)
instead which returns a new response objectAsynchronously gets index templates using the Index Templates API. The mappings will be returned in a legacy deprecated format, where the mapping definition is nested under the type name. See Index Templates API on elastic.co- Parameters:
getIndexTemplatesRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
getIndexTemplateAsync
public Cancellable getIndexTemplateAsync(GetIndexTemplatesRequest getIndexTemplatesRequest, RequestOptions options, ActionListener<GetIndexTemplatesResponse> listener)Asynchronously gets index templates using the Index Templates API See Index Templates API on elastic.co- Parameters:
getIndexTemplatesRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
existsTemplate
public boolean existsTemplate(IndexTemplatesExistRequest indexTemplatesRequest, RequestOptions options) throws java.io.IOExceptionUses the Index Templates API to determine if index templates exist- Parameters:
indexTemplatesRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- true if any index templates in the request exist, false otherwise
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
existsTemplateAsync
public Cancellable existsTemplateAsync(IndexTemplatesExistRequest indexTemplatesExistRequest, RequestOptions options, ActionListener<java.lang.Boolean> listener)Uses the Index Templates API to determine if index templates exist- Parameters:
indexTemplatesExistRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion. The listener will be called with the valuetrue
- Returns:
- cancellable that may be used to cancel the request
-
existsIndexTemplate
public boolean existsIndexTemplate(ComposableIndexTemplateExistRequest indexTemplatesRequest, RequestOptions options) throws java.io.IOExceptionUses the Index Templates API to determine if index templates exist- Parameters:
indexTemplatesRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- true if any index templates in the request exist, false otherwise
- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
existsIndexTemplateAsync
public Cancellable existsIndexTemplateAsync(ComposableIndexTemplateExistRequest indexTemplatesExistRequest, RequestOptions options, ActionListener<java.lang.Boolean> listener)Uses the Index Templates API to determine if index templates exist- Parameters:
indexTemplatesExistRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion. The listener will be called with the valuetrue
- Returns:
- cancellable that may be used to cancel the request
-
analyze
public AnalyzeResponse analyze(AnalyzeRequest request, RequestOptions options) throws java.io.IOExceptionCalls the analyze API See Analyze API on elastic.co- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Throws:
java.io.IOException
-
analyzeAsync
public Cancellable analyzeAsync(AnalyzeRequest request, RequestOptions options, ActionListener<AnalyzeResponse> listener)Asynchronously calls the analyze API See Analyze API on elastic.co- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
freeze
public ShardsAcknowledgedResponse freeze(FreezeIndexRequest request, RequestOptions options) throws java.io.IOExceptionSynchronously calls the _freeze API- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Throws:
java.io.IOException
-
freezeAsync
public Cancellable freezeAsync(FreezeIndexRequest request, RequestOptions options, ActionListener<ShardsAcknowledgedResponse> listener)Asynchronously calls the _freeze API- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
unfreeze
public ShardsAcknowledgedResponse unfreeze(UnfreezeIndexRequest request, RequestOptions options) throws java.io.IOExceptionSynchronously calls the _unfreeze API- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Throws:
java.io.IOException
-
unfreezeAsync
public Cancellable unfreezeAsync(UnfreezeIndexRequest request, RequestOptions options, ActionListener<ShardsAcknowledgedResponse> listener)Asynchronously calls the _unfreeze API- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
deleteTemplate
public AcknowledgedResponse deleteTemplate(DeleteIndexTemplateRequest request, RequestOptions options) throws java.io.IOExceptionDelete an index template using the Index Templates API See Index Templates API on elastic.co- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
deleteTemplateAsync
public Cancellable deleteTemplateAsync(DeleteIndexTemplateRequest request, RequestOptions options, ActionListener<AcknowledgedResponse> listener)Asynchronously delete an index template using the Index Templates API See Index Templates API on elastic.co- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
deleteIndexTemplate
public AcknowledgedResponse deleteIndexTemplate(DeleteComposableIndexTemplateRequest request, RequestOptions options) throws java.io.IOExceptionDelete an index template using the Index Templates API See Index Templates API on elastic.co- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Throws:
java.io.IOException
- in case there is a problem sending the request or parsing back the response
-
deleteIndexTemplateAsync
public Cancellable deleteIndexTemplateAsync(DeleteComposableIndexTemplateRequest request, RequestOptions options, ActionListener<AcknowledgedResponse> listener)Asynchronously delete an index template using the Index Templates API See Index Templates API on elastic.co- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
reloadAnalyzers
public ReloadAnalyzersResponse reloadAnalyzers(ReloadAnalyzersRequest request, RequestOptions options) throws java.io.IOExceptionSynchronously calls the _reload_search_analyzers API- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Throws:
java.io.IOException
-
reloadAnalyzersAsync
public Cancellable reloadAnalyzersAsync(ReloadAnalyzersRequest request, RequestOptions options, ActionListener<ReloadAnalyzersResponse> listener)Asynchronously calls the _reload_search_analyzers API- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-
deleteAlias
public AcknowledgedResponse deleteAlias(DeleteAliasRequest request, RequestOptions options) throws java.io.IOExceptionSynchronously calls the delete alias api- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Throws:
java.io.IOException
-
deleteAliasAsync
public Cancellable deleteAliasAsync(DeleteAliasRequest request, RequestOptions options, ActionListener<AcknowledgedResponse> listener)Asynchronously calls the delete alias api- Parameters:
request
- the requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-