Class ElasticsearchIndicesClient
java.lang.Object
co.elastic.clients.ApiClient<ElasticsearchTransport,ElasticsearchIndicesClient>
co.elastic.clients.elasticsearch.indices.ElasticsearchIndicesClient
- All Implemented Interfaces:
Closeable
,AutoCloseable
public class ElasticsearchIndicesClient
extends ApiClient<ElasticsearchTransport,ElasticsearchIndicesClient>
Client for the indices namespace.
-
Field Summary
Fields inherited from class co.elastic.clients.ApiClient
transport, transportOptions
-
Constructor Summary
ConstructorsConstructorDescriptionElasticsearchIndicesClient
(ElasticsearchTransport transport) ElasticsearchIndicesClient
(ElasticsearchTransport transport, TransportOptions transportOptions) -
Method Summary
Modifier and TypeMethodDescriptionaddBlock
(AddBlockRequest request) Add an index block.final AddBlockResponse
Add an index block.analyze()
Get tokens from text analysis.analyze
(AnalyzeRequest request) Get tokens from text analysis.final AnalyzeResponse
Get tokens from text analysis.Clears the caches of one or more indices.clearCache
(ClearCacheRequest request) Clears the caches of one or more indices.final ClearCacheResponse
Clears the caches of one or more indices.clone
(CloneIndexRequest request) Clones an existing index.final CloneIndexResponse
Clones an existing index.close
(CloseIndexRequest request) Closes an index.final CloseIndexResponse
Closes an index.create
(CreateIndexRequest request) Create an index.final CreateIndexResponse
Create an index.createDataStream
(CreateDataStreamRequest request) Create a data stream.final CreateDataStreamResponse
createDataStream
(Function<CreateDataStreamRequest.Builder, ObjectBuilder<CreateDataStreamRequest>> fn) Create a data stream.Get data stream stats.dataStreamsStats
(DataStreamsStatsRequest request) Get data stream stats.final DataStreamsStatsResponse
dataStreamsStats
(Function<DataStreamsStatsRequest.Builder, ObjectBuilder<DataStreamsStatsRequest>> fn) Get data stream stats.delete
(DeleteIndexRequest request) Delete indices.final DeleteIndexResponse
Delete indices.deleteAlias
(DeleteAliasRequest request) Delete an alias.final DeleteAliasResponse
Delete an alias.Delete data stream lifecycles.deleteDataLifecycle
(Function<DeleteDataLifecycleRequest.Builder, ObjectBuilder<DeleteDataLifecycleRequest>> fn) Delete data stream lifecycles.deleteDataStream
(DeleteDataStreamRequest request) Delete data streams.final DeleteDataStreamResponse
deleteDataStream
(Function<DeleteDataStreamRequest.Builder, ObjectBuilder<DeleteDataStreamRequest>> fn) Delete data streams.Delete an index template.deleteIndexTemplate
(Function<DeleteIndexTemplateRequest.Builder, ObjectBuilder<DeleteIndexTemplateRequest>> fn) Delete an index template.deleteTemplate
(DeleteTemplateRequest request) Deletes a legacy index template.final DeleteTemplateResponse
Deletes a legacy index template.diskUsage
(DiskUsageRequest request) Analyzes the disk usage of each field of an index or data stream.final DiskUsageResponse
Analyzes the disk usage of each field of an index or data stream.downsample
(DownsampleRequest request) Aggregates a time series (TSDS) index and stores pre-computed statistical summaries (min
,max
,sum
,value_count
andavg
) for each metric field grouped by a configured time interval.final DownsampleResponse
Aggregates a time series (TSDS) index and stores pre-computed statistical summaries (min
,max
,sum
,value_count
andavg
) for each metric field grouped by a configured time interval.exists
(ExistsRequest request) Check indices.final BooleanResponse
Check indices.existsAlias
(ExistsAliasRequest request) Check aliases.final BooleanResponse
Check aliases.Returns information about whether a particular index template exists.final BooleanResponse
existsIndexTemplate
(Function<ExistsIndexTemplateRequest.Builder, ObjectBuilder<ExistsIndexTemplateRequest>> fn) Returns information about whether a particular index template exists.existsTemplate
(ExistsTemplateRequest request) Check existence of index templates.final BooleanResponse
Check existence of index templates.Get the status for a data stream lifecycle.explainDataLifecycle
(Function<ExplainDataLifecycleRequest.Builder, ObjectBuilder<ExplainDataLifecycleRequest>> fn) Get the status for a data stream lifecycle.fieldUsageStats
(FieldUsageStatsRequest request) Returns field usage information for each shard and field of an index.final FieldUsageStatsResponse
Returns field usage information for each shard and field of an index.flush()
Flushes one or more data streams or indices.flush
(FlushRequest request) Flushes one or more data streams or indices.final FlushResponse
Flushes one or more data streams or indices.Performs the force merge operation on one or more indices.forcemerge
(ForcemergeRequest request) Performs the force merge operation on one or more indices.final ForcemergeResponse
Performs the force merge operation on one or more indices.get
(GetIndexRequest request) Get index information.final GetIndexResponse
Get index information.getAlias()
Get aliases.getAlias
(GetAliasRequest request) Get aliases.final GetAliasResponse
Get aliases.getDataLifecycle
(GetDataLifecycleRequest request) Get data stream lifecycles.final GetDataLifecycleResponse
getDataLifecycle
(Function<GetDataLifecycleRequest.Builder, ObjectBuilder<GetDataLifecycleRequest>> fn) Get data stream lifecycles.Get data streams.getDataStream
(GetDataStreamRequest request) Get data streams.final GetDataStreamResponse
Get data streams.getFieldMapping
(GetFieldMappingRequest request) Get mapping definitions.final GetFieldMappingResponse
Get mapping definitions.Get index templates.getIndexTemplate
(GetIndexTemplateRequest request) Get index templates.final GetIndexTemplateResponse
getIndexTemplate
(Function<GetIndexTemplateRequest.Builder, ObjectBuilder<GetIndexTemplateRequest>> fn) Get index templates.Get mapping definitions.getMapping
(GetMappingRequest request) Get mapping definitions.final GetMappingResponse
Get mapping definitions.Get index settings.getSettings
(GetIndicesSettingsRequest request) Get index settings.getSettings
(Function<GetIndicesSettingsRequest.Builder, ObjectBuilder<GetIndicesSettingsRequest>> fn) Get index settings.Get index templates.getTemplate
(GetTemplateRequest request) Get index templates.final GetTemplateResponse
Get index templates.Convert an index alias to a data stream.migrateToDataStream
(Function<MigrateToDataStreamRequest.Builder, ObjectBuilder<MigrateToDataStreamRequest>> fn) Convert an index alias to a data stream.modifyDataStream
(ModifyDataStreamRequest request) Update data streams.final ModifyDataStreamResponse
modifyDataStream
(Function<ModifyDataStreamRequest.Builder, ObjectBuilder<ModifyDataStreamRequest>> fn) Update data streams.open
(OpenRequest request) Opens a closed index.final OpenResponse
Opens a closed index.Promotes a data stream from a replicated data stream managed by CCR to a regular data streampromoteDataStream
(Function<PromoteDataStreamRequest.Builder, ObjectBuilder<PromoteDataStreamRequest>> fn) Promotes a data stream from a replicated data stream managed by CCR to a regular data streamputAlias
(PutAliasRequest request) Create or update an alias.final PutAliasResponse
Create or update an alias.putDataLifecycle
(PutDataLifecycleRequest request) Update data stream lifecycles.final PutDataLifecycleResponse
putDataLifecycle
(Function<PutDataLifecycleRequest.Builder, ObjectBuilder<PutDataLifecycleRequest>> fn) Update data stream lifecycles.putIndexTemplate
(PutIndexTemplateRequest request) Create or update an index template.final PutIndexTemplateResponse
putIndexTemplate
(Function<PutIndexTemplateRequest.Builder, ObjectBuilder<PutIndexTemplateRequest>> fn) Create or update an index template.putMapping
(PutMappingRequest request) Update field mappings.final PutMappingResponse
Update field mappings.Update index settings.putSettings
(PutIndicesSettingsRequest request) Update index settings.putSettings
(Function<PutIndicesSettingsRequest.Builder, ObjectBuilder<PutIndicesSettingsRequest>> fn) Update index settings.putTemplate
(PutTemplateRequest request) Create or update an index template.final PutTemplateResponse
Create or update an index template.recovery()
Returns information about ongoing and completed shard recoveries for one or more indices.recovery
(RecoveryRequest request) Returns information about ongoing and completed shard recoveries for one or more indices.final RecoveryResponse
Returns information about ongoing and completed shard recoveries for one or more indices.refresh()
Refresh an index.refresh
(RefreshRequest request) Refresh an index.final RefreshResponse
Refresh an index.Reloads an index's search analyzers and their resources.reloadSearchAnalyzers
(Function<ReloadSearchAnalyzersRequest.Builder, ObjectBuilder<ReloadSearchAnalyzersRequest>> fn) Reloads an index's search analyzers and their resources.resolveCluster
(ResolveClusterRequest request) Resolves the specified index expressions to return information about each cluster, including the local cluster, if included.final ResolveClusterResponse
Resolves the specified index expressions to return information about each cluster, including the local cluster, if included.resolveIndex
(ResolveIndexRequest request) Resolves the specified name(s) and/or index patterns for indices, aliases, and data streams.final ResolveIndexResponse
Resolves the specified name(s) and/or index patterns for indices, aliases, and data streams.rollover
(RolloverRequest request) Roll over to a new index.final RolloverResponse
Roll over to a new index.segments()
Returns low-level information about the Lucene segments in index shards.segments
(SegmentsRequest request) Returns low-level information about the Lucene segments in index shards.final SegmentsResponse
Returns low-level information about the Lucene segments in index shards.Retrieves store information about replica shards in one or more indices.shardStores
(ShardStoresRequest request) Retrieves store information about replica shards in one or more indices.final ShardStoresResponse
Retrieves store information about replica shards in one or more indices.shrink
(ShrinkRequest request) Shrinks an existing index into a new index with fewer primary shards.final ShrinkResponse
Shrinks an existing index into a new index with fewer primary shards.Simulate an index.simulateIndexTemplate
(Function<SimulateIndexTemplateRequest.Builder, ObjectBuilder<SimulateIndexTemplateRequest>> fn) Simulate an index.Simulate an index template.simulateTemplate
(SimulateTemplateRequest request) Simulate an index template.final SimulateTemplateResponse
simulateTemplate
(Function<SimulateTemplateRequest.Builder, ObjectBuilder<SimulateTemplateRequest>> fn) Simulate an index template.split
(SplitRequest request) Splits an existing index into a new index with more primary shards.final SplitResponse
Splits an existing index into a new index with more primary shards.stats()
Returns statistics for one or more indices.stats
(IndicesStatsRequest request) Returns statistics for one or more indices.final IndicesStatsResponse
Returns statistics for one or more indices.unfreeze
(UnfreezeRequest request) Unfreezes an index.final UnfreezeResponse
Unfreezes an index.Create or update an alias.updateAliases
(UpdateAliasesRequest request) Create or update an alias.final UpdateAliasesResponse
Create or update an alias.Validate a query.validateQuery
(ValidateQueryRequest request) Validate a query.final ValidateQueryResponse
Validate a query.withTransportOptions
(TransportOptions transportOptions) Creates a new client with some request optionsMethods inherited from class co.elastic.clients.ApiClient
_jsonpMapper, _transport, _transportOptions, close, getDeserializer, withTransportOptions
-
Constructor Details
-
ElasticsearchIndicesClient
-
ElasticsearchIndicesClient
public ElasticsearchIndicesClient(ElasticsearchTransport transport, @Nullable TransportOptions transportOptions)
-
-
Method Details
-
withTransportOptions
Description copied from class:ApiClient
Creates a new client with some request options- Specified by:
withTransportOptions
in classApiClient<ElasticsearchTransport,
ElasticsearchIndicesClient>
-
addBlock
public AddBlockResponse addBlock(AddBlockRequest request) throws IOException, ElasticsearchException Add an index block. Limits the operations allowed on an index by blocking specific operation types.- Throws:
IOException
ElasticsearchException
- See Also:
-
addBlock
public final AddBlockResponse addBlock(Function<AddBlockRequest.Builder, ObjectBuilder<AddBlockRequest>> fn) throws IOException, ElasticsearchExceptionAdd an index block. Limits the operations allowed on an index by blocking specific operation types.- Parameters:
fn
- a function that initializes a builder to create theAddBlockRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
analyze
Get tokens from text analysis. The analyze API performs analysis on a text string and returns the resulting tokens.- Throws:
IOException
ElasticsearchException
- See Also:
-
analyze
public final AnalyzeResponse analyze(Function<AnalyzeRequest.Builder, ObjectBuilder<AnalyzeRequest>> fn) throws IOException, ElasticsearchExceptionGet tokens from text analysis. The analyze API performs analysis on a text string and returns the resulting tokens.- Parameters:
fn
- a function that initializes a builder to create theAnalyzeRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
analyze
Get tokens from text analysis. The analyze API performs analysis on a text string and returns the resulting tokens.- Throws:
IOException
ElasticsearchException
- See Also:
-
clearCache
public ClearCacheResponse clearCache(ClearCacheRequest request) throws IOException, ElasticsearchException Clears the caches of one or more indices. For data streams, the API clears the caches of the stream’s backing indices.- Throws:
IOException
ElasticsearchException
- See Also:
-
clearCache
public final ClearCacheResponse clearCache(Function<ClearCacheRequest.Builder, ObjectBuilder<ClearCacheRequest>> fn) throws IOException, ElasticsearchExceptionClears the caches of one or more indices. For data streams, the API clears the caches of the stream’s backing indices.- Parameters:
fn
- a function that initializes a builder to create theClearCacheRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
clearCache
Clears the caches of one or more indices. For data streams, the API clears the caches of the stream’s backing indices.- Throws:
IOException
ElasticsearchException
- See Also:
-
clone
public CloneIndexResponse clone(CloneIndexRequest request) throws IOException, ElasticsearchException Clones an existing index.- Throws:
IOException
ElasticsearchException
- See Also:
-
clone
public final CloneIndexResponse clone(Function<CloneIndexRequest.Builder, ObjectBuilder<CloneIndexRequest>> fn) throws IOException, ElasticsearchExceptionClones an existing index.- Parameters:
fn
- a function that initializes a builder to create theCloneIndexRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
close
public CloseIndexResponse close(CloseIndexRequest request) throws IOException, ElasticsearchException Closes an index.- Throws:
IOException
ElasticsearchException
- See Also:
-
close
public final CloseIndexResponse close(Function<CloseIndexRequest.Builder, ObjectBuilder<CloseIndexRequest>> fn) throws IOException, ElasticsearchExceptionCloses an index.- Parameters:
fn
- a function that initializes a builder to create theCloseIndexRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
create
public CreateIndexResponse create(CreateIndexRequest request) throws IOException, ElasticsearchException Create an index. Creates a new index.- Throws:
IOException
ElasticsearchException
- See Also:
-
create
public final CreateIndexResponse create(Function<CreateIndexRequest.Builder, ObjectBuilder<CreateIndexRequest>> fn) throws IOException, ElasticsearchExceptionCreate an index. Creates a new index.- Parameters:
fn
- a function that initializes a builder to create theCreateIndexRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
createDataStream
public CreateDataStreamResponse createDataStream(CreateDataStreamRequest request) throws IOException, ElasticsearchException Create a data stream. Creates a data stream. You must have a matching index template with data stream enabled.- Throws:
IOException
ElasticsearchException
- See Also:
-
createDataStream
public final CreateDataStreamResponse createDataStream(Function<CreateDataStreamRequest.Builder, ObjectBuilder<CreateDataStreamRequest>> fn) throws IOException, ElasticsearchExceptionCreate a data stream. Creates a data stream. You must have a matching index template with data stream enabled.- Parameters:
fn
- a function that initializes a builder to create theCreateDataStreamRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
dataStreamsStats
public DataStreamsStatsResponse dataStreamsStats(DataStreamsStatsRequest request) throws IOException, ElasticsearchException Get data stream stats. Retrieves statistics for one or more data streams.- Throws:
IOException
ElasticsearchException
- See Also:
-
dataStreamsStats
public final DataStreamsStatsResponse dataStreamsStats(Function<DataStreamsStatsRequest.Builder, ObjectBuilder<DataStreamsStatsRequest>> fn) throws IOException, ElasticsearchExceptionGet data stream stats. Retrieves statistics for one or more data streams.- Parameters:
fn
- a function that initializes a builder to create theDataStreamsStatsRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
dataStreamsStats
Get data stream stats. Retrieves statistics for one or more data streams.- Throws:
IOException
ElasticsearchException
- See Also:
-
delete
public DeleteIndexResponse delete(DeleteIndexRequest request) throws IOException, ElasticsearchException Delete indices. Deletes one or more indices.- Throws:
IOException
ElasticsearchException
- See Also:
-
delete
public final DeleteIndexResponse delete(Function<DeleteIndexRequest.Builder, ObjectBuilder<DeleteIndexRequest>> fn) throws IOException, ElasticsearchExceptionDelete indices. Deletes one or more indices.- Parameters:
fn
- a function that initializes a builder to create theDeleteIndexRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
deleteAlias
public DeleteAliasResponse deleteAlias(DeleteAliasRequest request) throws IOException, ElasticsearchException Delete an alias. Removes a data stream or index from an alias.- Throws:
IOException
ElasticsearchException
- See Also:
-
deleteAlias
public final DeleteAliasResponse deleteAlias(Function<DeleteAliasRequest.Builder, ObjectBuilder<DeleteAliasRequest>> fn) throws IOException, ElasticsearchExceptionDelete an alias. Removes a data stream or index from an alias.- Parameters:
fn
- a function that initializes a builder to create theDeleteAliasRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
deleteDataLifecycle
public DeleteDataLifecycleResponse deleteDataLifecycle(DeleteDataLifecycleRequest request) throws IOException, ElasticsearchException Delete data stream lifecycles. Removes the data stream lifecycle from a data stream, rendering it not managed by the data stream lifecycle.- Throws:
IOException
ElasticsearchException
- See Also:
-
deleteDataLifecycle
public final DeleteDataLifecycleResponse deleteDataLifecycle(Function<DeleteDataLifecycleRequest.Builder, ObjectBuilder<DeleteDataLifecycleRequest>> fn) throws IOException, ElasticsearchExceptionDelete data stream lifecycles. Removes the data stream lifecycle from a data stream, rendering it not managed by the data stream lifecycle.- Parameters:
fn
- a function that initializes a builder to create theDeleteDataLifecycleRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
deleteDataStream
public DeleteDataStreamResponse deleteDataStream(DeleteDataStreamRequest request) throws IOException, ElasticsearchException Delete data streams. Deletes one or more data streams and their backing indices.- Throws:
IOException
ElasticsearchException
- See Also:
-
deleteDataStream
public final DeleteDataStreamResponse deleteDataStream(Function<DeleteDataStreamRequest.Builder, ObjectBuilder<DeleteDataStreamRequest>> fn) throws IOException, ElasticsearchExceptionDelete data streams. Deletes one or more data streams and their backing indices.- Parameters:
fn
- a function that initializes a builder to create theDeleteDataStreamRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
deleteIndexTemplate
public DeleteIndexTemplateResponse deleteIndexTemplate(DeleteIndexTemplateRequest request) throws IOException, ElasticsearchException Delete an index template. The provided <index-template> may contain multiple template names separated by a comma. If multiple template names are specified then there is no wildcard support and the provided names should match completely with existing templates.- Throws:
IOException
ElasticsearchException
- See Also:
-
deleteIndexTemplate
public final DeleteIndexTemplateResponse deleteIndexTemplate(Function<DeleteIndexTemplateRequest.Builder, ObjectBuilder<DeleteIndexTemplateRequest>> fn) throws IOException, ElasticsearchExceptionDelete an index template. The provided <index-template> may contain multiple template names separated by a comma. If multiple template names are specified then there is no wildcard support and the provided names should match completely with existing templates.- Parameters:
fn
- a function that initializes a builder to create theDeleteIndexTemplateRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
deleteTemplate
public DeleteTemplateResponse deleteTemplate(DeleteTemplateRequest request) throws IOException, ElasticsearchException Deletes a legacy index template.- Throws:
IOException
ElasticsearchException
- See Also:
-
deleteTemplate
public final DeleteTemplateResponse deleteTemplate(Function<DeleteTemplateRequest.Builder, ObjectBuilder<DeleteTemplateRequest>> fn) throws IOException, ElasticsearchExceptionDeletes a legacy index template.- Parameters:
fn
- a function that initializes a builder to create theDeleteTemplateRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
diskUsage
public DiskUsageResponse diskUsage(DiskUsageRequest request) throws IOException, ElasticsearchException Analyzes the disk usage of each field of an index or data stream.- Throws:
IOException
ElasticsearchException
- See Also:
-
diskUsage
public final DiskUsageResponse diskUsage(Function<DiskUsageRequest.Builder, ObjectBuilder<DiskUsageRequest>> fn) throws IOException, ElasticsearchExceptionAnalyzes the disk usage of each field of an index or data stream.- Parameters:
fn
- a function that initializes a builder to create theDiskUsageRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
downsample
public DownsampleResponse downsample(DownsampleRequest request) throws IOException, ElasticsearchException Aggregates a time series (TSDS) index and stores pre-computed statistical summaries (min
,max
,sum
,value_count
andavg
) for each metric field grouped by a configured time interval.- Throws:
IOException
ElasticsearchException
- See Also:
-
downsample
public final DownsampleResponse downsample(Function<DownsampleRequest.Builder, ObjectBuilder<DownsampleRequest>> fn) throws IOException, ElasticsearchExceptionAggregates a time series (TSDS) index and stores pre-computed statistical summaries (min
,max
,sum
,value_count
andavg
) for each metric field grouped by a configured time interval.- Parameters:
fn
- a function that initializes a builder to create theDownsampleRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
exists
Check indices. Checks if one or more indices, index aliases, or data streams exist.- Throws:
IOException
ElasticsearchException
- See Also:
-
exists
public final BooleanResponse exists(Function<ExistsRequest.Builder, ObjectBuilder<ExistsRequest>> fn) throws IOException, ElasticsearchExceptionCheck indices. Checks if one or more indices, index aliases, or data streams exist.- Parameters:
fn
- a function that initializes a builder to create theExistsRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
existsAlias
public BooleanResponse existsAlias(ExistsAliasRequest request) throws IOException, ElasticsearchException Check aliases. Checks if one or more data stream or index aliases exist.- Throws:
IOException
ElasticsearchException
- See Also:
-
existsAlias
public final BooleanResponse existsAlias(Function<ExistsAliasRequest.Builder, ObjectBuilder<ExistsAliasRequest>> fn) throws IOException, ElasticsearchExceptionCheck aliases. Checks if one or more data stream or index aliases exist.- Parameters:
fn
- a function that initializes a builder to create theExistsAliasRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
existsIndexTemplate
public BooleanResponse existsIndexTemplate(ExistsIndexTemplateRequest request) throws IOException, ElasticsearchException Returns information about whether a particular index template exists.- Throws:
IOException
ElasticsearchException
- See Also:
-
existsIndexTemplate
public final BooleanResponse existsIndexTemplate(Function<ExistsIndexTemplateRequest.Builder, ObjectBuilder<ExistsIndexTemplateRequest>> fn) throws IOException, ElasticsearchExceptionReturns information about whether a particular index template exists.- Parameters:
fn
- a function that initializes a builder to create theExistsIndexTemplateRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
existsTemplate
public BooleanResponse existsTemplate(ExistsTemplateRequest request) throws IOException, ElasticsearchException Check existence of index templates. Returns information about whether a particular index template exists.- Throws:
IOException
ElasticsearchException
- See Also:
-
existsTemplate
public final BooleanResponse existsTemplate(Function<ExistsTemplateRequest.Builder, ObjectBuilder<ExistsTemplateRequest>> fn) throws IOException, ElasticsearchExceptionCheck existence of index templates. Returns information about whether a particular index template exists.- Parameters:
fn
- a function that initializes a builder to create theExistsTemplateRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
explainDataLifecycle
public ExplainDataLifecycleResponse explainDataLifecycle(ExplainDataLifecycleRequest request) throws IOException, ElasticsearchException Get the status for a data stream lifecycle. Retrieves information about an index or data stream’s current data stream lifecycle status, such as time since index creation, time since rollover, the lifecycle configuration managing the index, or any errors encountered during lifecycle execution.- Throws:
IOException
ElasticsearchException
- See Also:
-
explainDataLifecycle
public final ExplainDataLifecycleResponse explainDataLifecycle(Function<ExplainDataLifecycleRequest.Builder, ObjectBuilder<ExplainDataLifecycleRequest>> fn) throws IOException, ElasticsearchExceptionGet the status for a data stream lifecycle. Retrieves information about an index or data stream’s current data stream lifecycle status, such as time since index creation, time since rollover, the lifecycle configuration managing the index, or any errors encountered during lifecycle execution.- Parameters:
fn
- a function that initializes a builder to create theExplainDataLifecycleRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
fieldUsageStats
public FieldUsageStatsResponse fieldUsageStats(FieldUsageStatsRequest request) throws IOException, ElasticsearchException Returns field usage information for each shard and field of an index.- Throws:
IOException
ElasticsearchException
- See Also:
-
fieldUsageStats
public final FieldUsageStatsResponse fieldUsageStats(Function<FieldUsageStatsRequest.Builder, ObjectBuilder<FieldUsageStatsRequest>> fn) throws IOException, ElasticsearchExceptionReturns field usage information for each shard and field of an index.- Parameters:
fn
- a function that initializes a builder to create theFieldUsageStatsRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
flush
Flushes one or more data streams or indices.- Throws:
IOException
ElasticsearchException
- See Also:
-
flush
public final FlushResponse flush(Function<FlushRequest.Builder, ObjectBuilder<FlushRequest>> fn) throws IOException, ElasticsearchExceptionFlushes one or more data streams or indices.- Parameters:
fn
- a function that initializes a builder to create theFlushRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
flush
Flushes one or more data streams or indices.- Throws:
IOException
ElasticsearchException
- See Also:
-
forcemerge
public ForcemergeResponse forcemerge(ForcemergeRequest request) throws IOException, ElasticsearchException Performs the force merge operation on one or more indices.- Throws:
IOException
ElasticsearchException
- See Also:
-
forcemerge
public final ForcemergeResponse forcemerge(Function<ForcemergeRequest.Builder, ObjectBuilder<ForcemergeRequest>> fn) throws IOException, ElasticsearchExceptionPerforms the force merge operation on one or more indices.- Parameters:
fn
- a function that initializes a builder to create theForcemergeRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
forcemerge
Performs the force merge operation on one or more indices.- Throws:
IOException
ElasticsearchException
- See Also:
-
get
Get index information. Returns information about one or more indices. For data streams, the API returns information about the stream’s backing indices.- Throws:
IOException
ElasticsearchException
- See Also:
-
get
public final GetIndexResponse get(Function<GetIndexRequest.Builder, ObjectBuilder<GetIndexRequest>> fn) throws IOException, ElasticsearchExceptionGet index information. Returns information about one or more indices. For data streams, the API returns information about the stream’s backing indices.- Parameters:
fn
- a function that initializes a builder to create theGetIndexRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
getAlias
public GetAliasResponse getAlias(GetAliasRequest request) throws IOException, ElasticsearchException Get aliases. Retrieves information for one or more data stream or index aliases.- Throws:
IOException
ElasticsearchException
- See Also:
-
getAlias
public final GetAliasResponse getAlias(Function<GetAliasRequest.Builder, ObjectBuilder<GetAliasRequest>> fn) throws IOException, ElasticsearchExceptionGet aliases. Retrieves information for one or more data stream or index aliases.- Parameters:
fn
- a function that initializes a builder to create theGetAliasRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
getAlias
Get aliases. Retrieves information for one or more data stream or index aliases.- Throws:
IOException
ElasticsearchException
- See Also:
-
getDataLifecycle
public GetDataLifecycleResponse getDataLifecycle(GetDataLifecycleRequest request) throws IOException, ElasticsearchException Get data stream lifecycles. Retrieves the data stream lifecycle configuration of one or more data streams.- Throws:
IOException
ElasticsearchException
- See Also:
-
getDataLifecycle
public final GetDataLifecycleResponse getDataLifecycle(Function<GetDataLifecycleRequest.Builder, ObjectBuilder<GetDataLifecycleRequest>> fn) throws IOException, ElasticsearchExceptionGet data stream lifecycles. Retrieves the data stream lifecycle configuration of one or more data streams.- Parameters:
fn
- a function that initializes a builder to create theGetDataLifecycleRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
getDataStream
public GetDataStreamResponse getDataStream(GetDataStreamRequest request) throws IOException, ElasticsearchException Get data streams. Retrieves information about one or more data streams.- Throws:
IOException
ElasticsearchException
- See Also:
-
getDataStream
public final GetDataStreamResponse getDataStream(Function<GetDataStreamRequest.Builder, ObjectBuilder<GetDataStreamRequest>> fn) throws IOException, ElasticsearchExceptionGet data streams. Retrieves information about one or more data streams.- Parameters:
fn
- a function that initializes a builder to create theGetDataStreamRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
getDataStream
Get data streams. Retrieves information about one or more data streams.- Throws:
IOException
ElasticsearchException
- See Also:
-
getFieldMapping
public GetFieldMappingResponse getFieldMapping(GetFieldMappingRequest request) throws IOException, ElasticsearchException Get mapping definitions. Retrieves mapping definitions for one or more fields. For data streams, the API retrieves field mappings for the stream’s backing indices.- Throws:
IOException
ElasticsearchException
- See Also:
-
getFieldMapping
public final GetFieldMappingResponse getFieldMapping(Function<GetFieldMappingRequest.Builder, ObjectBuilder<GetFieldMappingRequest>> fn) throws IOException, ElasticsearchExceptionGet mapping definitions. Retrieves mapping definitions for one or more fields. For data streams, the API retrieves field mappings for the stream’s backing indices.- Parameters:
fn
- a function that initializes a builder to create theGetFieldMappingRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
getIndexTemplate
public GetIndexTemplateResponse getIndexTemplate(GetIndexTemplateRequest request) throws IOException, ElasticsearchException Get index templates. Returns information about one or more index templates.- Throws:
IOException
ElasticsearchException
- See Also:
-
getIndexTemplate
public final GetIndexTemplateResponse getIndexTemplate(Function<GetIndexTemplateRequest.Builder, ObjectBuilder<GetIndexTemplateRequest>> fn) throws IOException, ElasticsearchExceptionGet index templates. Returns information about one or more index templates.- Parameters:
fn
- a function that initializes a builder to create theGetIndexTemplateRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
getIndexTemplate
Get index templates. Returns information about one or more index templates.- Throws:
IOException
ElasticsearchException
- See Also:
-
getMapping
public GetMappingResponse getMapping(GetMappingRequest request) throws IOException, ElasticsearchException Get mapping definitions. Retrieves mapping definitions for one or more indices. For data streams, the API retrieves mappings for the stream’s backing indices.- Throws:
IOException
ElasticsearchException
- See Also:
-
getMapping
public final GetMappingResponse getMapping(Function<GetMappingRequest.Builder, ObjectBuilder<GetMappingRequest>> fn) throws IOException, ElasticsearchExceptionGet mapping definitions. Retrieves mapping definitions for one or more indices. For data streams, the API retrieves mappings for the stream’s backing indices.- Parameters:
fn
- a function that initializes a builder to create theGetMappingRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
getMapping
Get mapping definitions. Retrieves mapping definitions for one or more indices. For data streams, the API retrieves mappings for the stream’s backing indices.- Throws:
IOException
ElasticsearchException
- See Also:
-
getSettings
public GetIndicesSettingsResponse getSettings(GetIndicesSettingsRequest request) throws IOException, ElasticsearchException Get index settings. Returns setting information for one or more indices. For data streams, returns setting information for the stream’s backing indices.- Throws:
IOException
ElasticsearchException
- See Also:
-
getSettings
public final GetIndicesSettingsResponse getSettings(Function<GetIndicesSettingsRequest.Builder, ObjectBuilder<GetIndicesSettingsRequest>> fn) throws IOException, ElasticsearchExceptionGet index settings. Returns setting information for one or more indices. For data streams, returns setting information for the stream’s backing indices.- Parameters:
fn
- a function that initializes a builder to create theGetIndicesSettingsRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
getSettings
Get index settings. Returns setting information for one or more indices. For data streams, returns setting information for the stream’s backing indices.- Throws:
IOException
ElasticsearchException
- See Also:
-
getTemplate
public GetTemplateResponse getTemplate(GetTemplateRequest request) throws IOException, ElasticsearchException Get index templates. Retrieves information about one or more index templates.- Throws:
IOException
ElasticsearchException
- See Also:
-
getTemplate
public final GetTemplateResponse getTemplate(Function<GetTemplateRequest.Builder, ObjectBuilder<GetTemplateRequest>> fn) throws IOException, ElasticsearchExceptionGet index templates. Retrieves information about one or more index templates.- Parameters:
fn
- a function that initializes a builder to create theGetTemplateRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
getTemplate
Get index templates. Retrieves information about one or more index templates.- Throws:
IOException
ElasticsearchException
- See Also:
-
migrateToDataStream
public MigrateToDataStreamResponse migrateToDataStream(MigrateToDataStreamRequest request) throws IOException, ElasticsearchException Convert an index alias to a data stream. Converts an index alias to a data stream. You must have a matching index template that is data stream enabled. The alias must meet the following criteria: The alias must have a write index; All indices for the alias must have a@timestamp
field mapping of adate
ordate_nanos
field type; The alias must not have any filters; The alias must not use custom routing. If successful, the request removes the alias and creates a data stream with the same name. The indices for the alias become hidden backing indices for the stream. The write index for the alias becomes the write index for the stream.- Throws:
IOException
ElasticsearchException
- See Also:
-
migrateToDataStream
public final MigrateToDataStreamResponse migrateToDataStream(Function<MigrateToDataStreamRequest.Builder, ObjectBuilder<MigrateToDataStreamRequest>> fn) throws IOException, ElasticsearchExceptionConvert an index alias to a data stream. Converts an index alias to a data stream. You must have a matching index template that is data stream enabled. The alias must meet the following criteria: The alias must have a write index; All indices for the alias must have a@timestamp
field mapping of adate
ordate_nanos
field type; The alias must not have any filters; The alias must not use custom routing. If successful, the request removes the alias and creates a data stream with the same name. The indices for the alias become hidden backing indices for the stream. The write index for the alias becomes the write index for the stream.- Parameters:
fn
- a function that initializes a builder to create theMigrateToDataStreamRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
modifyDataStream
public ModifyDataStreamResponse modifyDataStream(ModifyDataStreamRequest request) throws IOException, ElasticsearchException Update data streams. Performs one or more data stream modification actions in a single atomic operation.- Throws:
IOException
ElasticsearchException
- See Also:
-
modifyDataStream
public final ModifyDataStreamResponse modifyDataStream(Function<ModifyDataStreamRequest.Builder, ObjectBuilder<ModifyDataStreamRequest>> fn) throws IOException, ElasticsearchExceptionUpdate data streams. Performs one or more data stream modification actions in a single atomic operation.- Parameters:
fn
- a function that initializes a builder to create theModifyDataStreamRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
open
Opens a closed index. For data streams, the API opens any closed backing indices.- Throws:
IOException
ElasticsearchException
- See Also:
-
open
public final OpenResponse open(Function<OpenRequest.Builder, ObjectBuilder<OpenRequest>> fn) throws IOException, ElasticsearchExceptionOpens a closed index. For data streams, the API opens any closed backing indices.- Parameters:
fn
- a function that initializes a builder to create theOpenRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
promoteDataStream
public PromoteDataStreamResponse promoteDataStream(PromoteDataStreamRequest request) throws IOException, ElasticsearchException Promotes a data stream from a replicated data stream managed by CCR to a regular data stream- Throws:
IOException
ElasticsearchException
- See Also:
-
promoteDataStream
public final PromoteDataStreamResponse promoteDataStream(Function<PromoteDataStreamRequest.Builder, ObjectBuilder<PromoteDataStreamRequest>> fn) throws IOException, ElasticsearchExceptionPromotes a data stream from a replicated data stream managed by CCR to a regular data stream- Parameters:
fn
- a function that initializes a builder to create thePromoteDataStreamRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
putAlias
public PutAliasResponse putAlias(PutAliasRequest request) throws IOException, ElasticsearchException Create or update an alias. Adds a data stream or index to an alias.- Throws:
IOException
ElasticsearchException
- See Also:
-
putAlias
public final PutAliasResponse putAlias(Function<PutAliasRequest.Builder, ObjectBuilder<PutAliasRequest>> fn) throws IOException, ElasticsearchExceptionCreate or update an alias. Adds a data stream or index to an alias.- Parameters:
fn
- a function that initializes a builder to create thePutAliasRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
putDataLifecycle
public PutDataLifecycleResponse putDataLifecycle(PutDataLifecycleRequest request) throws IOException, ElasticsearchException Update data stream lifecycles. Update the data stream lifecycle of the specified data streams.- Throws:
IOException
ElasticsearchException
- See Also:
-
putDataLifecycle
public final PutDataLifecycleResponse putDataLifecycle(Function<PutDataLifecycleRequest.Builder, ObjectBuilder<PutDataLifecycleRequest>> fn) throws IOException, ElasticsearchExceptionUpdate data stream lifecycles. Update the data stream lifecycle of the specified data streams.- Parameters:
fn
- a function that initializes a builder to create thePutDataLifecycleRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
putIndexTemplate
public PutIndexTemplateResponse putIndexTemplate(PutIndexTemplateRequest request) throws IOException, ElasticsearchException Create or update an index template. Index templates define settings, mappings, and aliases that can be applied automatically to new indices.- Throws:
IOException
ElasticsearchException
- See Also:
-
putIndexTemplate
public final PutIndexTemplateResponse putIndexTemplate(Function<PutIndexTemplateRequest.Builder, ObjectBuilder<PutIndexTemplateRequest>> fn) throws IOException, ElasticsearchExceptionCreate or update an index template. Index templates define settings, mappings, and aliases that can be applied automatically to new indices.- Parameters:
fn
- a function that initializes a builder to create thePutIndexTemplateRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
putMapping
public PutMappingResponse putMapping(PutMappingRequest request) throws IOException, ElasticsearchException Update field mappings. Adds new fields to an existing data stream or index. You can also use this API to change the search settings of existing fields. For data streams, these changes are applied to all backing indices by default.- Throws:
IOException
ElasticsearchException
- See Also:
-
putMapping
public final PutMappingResponse putMapping(Function<PutMappingRequest.Builder, ObjectBuilder<PutMappingRequest>> fn) throws IOException, ElasticsearchExceptionUpdate field mappings. Adds new fields to an existing data stream or index. You can also use this API to change the search settings of existing fields. For data streams, these changes are applied to all backing indices by default.- Parameters:
fn
- a function that initializes a builder to create thePutMappingRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
putSettings
public PutIndicesSettingsResponse putSettings(PutIndicesSettingsRequest request) throws IOException, ElasticsearchException Update index settings. Changes dynamic index settings in real time. For data streams, index setting changes are applied to all backing indices by default.- Throws:
IOException
ElasticsearchException
- See Also:
-
putSettings
public final PutIndicesSettingsResponse putSettings(Function<PutIndicesSettingsRequest.Builder, ObjectBuilder<PutIndicesSettingsRequest>> fn) throws IOException, ElasticsearchExceptionUpdate index settings. Changes dynamic index settings in real time. For data streams, index setting changes are applied to all backing indices by default.- Parameters:
fn
- a function that initializes a builder to create thePutIndicesSettingsRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
putSettings
Update index settings. Changes dynamic index settings in real time. For data streams, index setting changes are applied to all backing indices by default.- Throws:
IOException
ElasticsearchException
- See Also:
-
putTemplate
public PutTemplateResponse putTemplate(PutTemplateRequest request) throws IOException, ElasticsearchException Create or update an index template. Index templates define settings, mappings, and aliases that can be applied automatically to new indices.- Throws:
IOException
ElasticsearchException
- See Also:
-
putTemplate
public final PutTemplateResponse putTemplate(Function<PutTemplateRequest.Builder, ObjectBuilder<PutTemplateRequest>> fn) throws IOException, ElasticsearchExceptionCreate or update an index template. Index templates define settings, mappings, and aliases that can be applied automatically to new indices.- Parameters:
fn
- a function that initializes a builder to create thePutTemplateRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
recovery
public RecoveryResponse recovery(RecoveryRequest request) throws IOException, ElasticsearchException Returns information about ongoing and completed shard recoveries for one or more indices. For data streams, the API returns information for the stream’s backing indices.- Throws:
IOException
ElasticsearchException
- See Also:
-
recovery
public final RecoveryResponse recovery(Function<RecoveryRequest.Builder, ObjectBuilder<RecoveryRequest>> fn) throws IOException, ElasticsearchExceptionReturns information about ongoing and completed shard recoveries for one or more indices. For data streams, the API returns information for the stream’s backing indices.- Parameters:
fn
- a function that initializes a builder to create theRecoveryRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
recovery
Returns information about ongoing and completed shard recoveries for one or more indices. For data streams, the API returns information for the stream’s backing indices.- Throws:
IOException
ElasticsearchException
- See Also:
-
refresh
Refresh an index. A refresh makes recent operations performed on one or more indices available for search. For data streams, the API runs the refresh operation on the stream’s backing indices.- Throws:
IOException
ElasticsearchException
- See Also:
-
refresh
public final RefreshResponse refresh(Function<RefreshRequest.Builder, ObjectBuilder<RefreshRequest>> fn) throws IOException, ElasticsearchExceptionRefresh an index. A refresh makes recent operations performed on one or more indices available for search. For data streams, the API runs the refresh operation on the stream’s backing indices.- Parameters:
fn
- a function that initializes a builder to create theRefreshRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
refresh
Refresh an index. A refresh makes recent operations performed on one or more indices available for search. For data streams, the API runs the refresh operation on the stream’s backing indices.- Throws:
IOException
ElasticsearchException
- See Also:
-
reloadSearchAnalyzers
public ReloadSearchAnalyzersResponse reloadSearchAnalyzers(ReloadSearchAnalyzersRequest request) throws IOException, ElasticsearchException Reloads an index's search analyzers and their resources.- Throws:
IOException
ElasticsearchException
- See Also:
-
reloadSearchAnalyzers
public final ReloadSearchAnalyzersResponse reloadSearchAnalyzers(Function<ReloadSearchAnalyzersRequest.Builder, ObjectBuilder<ReloadSearchAnalyzersRequest>> fn) throws IOException, ElasticsearchExceptionReloads an index's search analyzers and their resources.- Parameters:
fn
- a function that initializes a builder to create theReloadSearchAnalyzersRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
resolveCluster
public ResolveClusterResponse resolveCluster(ResolveClusterRequest request) throws IOException, ElasticsearchException Resolves the specified index expressions to return information about each cluster, including the local cluster, if included. Multiple patterns and remote clusters are supported.- Throws:
IOException
ElasticsearchException
- See Also:
-
resolveCluster
public final ResolveClusterResponse resolveCluster(Function<ResolveClusterRequest.Builder, ObjectBuilder<ResolveClusterRequest>> fn) throws IOException, ElasticsearchExceptionResolves the specified index expressions to return information about each cluster, including the local cluster, if included. Multiple patterns and remote clusters are supported.- Parameters:
fn
- a function that initializes a builder to create theResolveClusterRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
resolveIndex
public ResolveIndexResponse resolveIndex(ResolveIndexRequest request) throws IOException, ElasticsearchException Resolves the specified name(s) and/or index patterns for indices, aliases, and data streams. Multiple patterns and remote clusters are supported.- Throws:
IOException
ElasticsearchException
- See Also:
-
resolveIndex
public final ResolveIndexResponse resolveIndex(Function<ResolveIndexRequest.Builder, ObjectBuilder<ResolveIndexRequest>> fn) throws IOException, ElasticsearchExceptionResolves the specified name(s) and/or index patterns for indices, aliases, and data streams. Multiple patterns and remote clusters are supported.- Parameters:
fn
- a function that initializes a builder to create theResolveIndexRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
rollover
public RolloverResponse rollover(RolloverRequest request) throws IOException, ElasticsearchException Roll over to a new index. Creates a new index for a data stream or index alias.- Throws:
IOException
ElasticsearchException
- See Also:
-
rollover
public final RolloverResponse rollover(Function<RolloverRequest.Builder, ObjectBuilder<RolloverRequest>> fn) throws IOException, ElasticsearchExceptionRoll over to a new index. Creates a new index for a data stream or index alias.- Parameters:
fn
- a function that initializes a builder to create theRolloverRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
segments
public SegmentsResponse segments(SegmentsRequest request) throws IOException, ElasticsearchException Returns low-level information about the Lucene segments in index shards. For data streams, the API returns information about the stream’s backing indices.- Throws:
IOException
ElasticsearchException
- See Also:
-
segments
public final SegmentsResponse segments(Function<SegmentsRequest.Builder, ObjectBuilder<SegmentsRequest>> fn) throws IOException, ElasticsearchExceptionReturns low-level information about the Lucene segments in index shards. For data streams, the API returns information about the stream’s backing indices.- Parameters:
fn
- a function that initializes a builder to create theSegmentsRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
segments
Returns low-level information about the Lucene segments in index shards. For data streams, the API returns information about the stream’s backing indices.- Throws:
IOException
ElasticsearchException
- See Also:
-
shardStores
public ShardStoresResponse shardStores(ShardStoresRequest request) throws IOException, ElasticsearchException Retrieves store information about replica shards in one or more indices. For data streams, the API retrieves store information for the stream’s backing indices.- Throws:
IOException
ElasticsearchException
- See Also:
-
shardStores
public final ShardStoresResponse shardStores(Function<ShardStoresRequest.Builder, ObjectBuilder<ShardStoresRequest>> fn) throws IOException, ElasticsearchExceptionRetrieves store information about replica shards in one or more indices. For data streams, the API retrieves store information for the stream’s backing indices.- Parameters:
fn
- a function that initializes a builder to create theShardStoresRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
shardStores
Retrieves store information about replica shards in one or more indices. For data streams, the API retrieves store information for the stream’s backing indices.- Throws:
IOException
ElasticsearchException
- See Also:
-
shrink
Shrinks an existing index into a new index with fewer primary shards.- Throws:
IOException
ElasticsearchException
- See Also:
-
shrink
public final ShrinkResponse shrink(Function<ShrinkRequest.Builder, ObjectBuilder<ShrinkRequest>> fn) throws IOException, ElasticsearchExceptionShrinks an existing index into a new index with fewer primary shards.- Parameters:
fn
- a function that initializes a builder to create theShrinkRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
simulateIndexTemplate
public SimulateIndexTemplateResponse simulateIndexTemplate(SimulateIndexTemplateRequest request) throws IOException, ElasticsearchException Simulate an index. Returns the index configuration that would be applied to the specified index from an existing index template.- Throws:
IOException
ElasticsearchException
- See Also:
-
simulateIndexTemplate
public final SimulateIndexTemplateResponse simulateIndexTemplate(Function<SimulateIndexTemplateRequest.Builder, ObjectBuilder<SimulateIndexTemplateRequest>> fn) throws IOException, ElasticsearchExceptionSimulate an index. Returns the index configuration that would be applied to the specified index from an existing index template.- Parameters:
fn
- a function that initializes a builder to create theSimulateIndexTemplateRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
simulateTemplate
public SimulateTemplateResponse simulateTemplate(SimulateTemplateRequest request) throws IOException, ElasticsearchException Simulate an index template. Returns the index configuration that would be applied by a particular index template.- Throws:
IOException
ElasticsearchException
- See Also:
-
simulateTemplate
public final SimulateTemplateResponse simulateTemplate(Function<SimulateTemplateRequest.Builder, ObjectBuilder<SimulateTemplateRequest>> fn) throws IOException, ElasticsearchExceptionSimulate an index template. Returns the index configuration that would be applied by a particular index template.- Parameters:
fn
- a function that initializes a builder to create theSimulateTemplateRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
simulateTemplate
Simulate an index template. Returns the index configuration that would be applied by a particular index template.- Throws:
IOException
ElasticsearchException
- See Also:
-
split
Splits an existing index into a new index with more primary shards.- Throws:
IOException
ElasticsearchException
- See Also:
-
split
public final SplitResponse split(Function<SplitRequest.Builder, ObjectBuilder<SplitRequest>> fn) throws IOException, ElasticsearchExceptionSplits an existing index into a new index with more primary shards.- Parameters:
fn
- a function that initializes a builder to create theSplitRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
stats
public IndicesStatsResponse stats(IndicesStatsRequest request) throws IOException, ElasticsearchException Returns statistics for one or more indices. For data streams, the API retrieves statistics for the stream’s backing indices.- Throws:
IOException
ElasticsearchException
- See Also:
-
stats
public final IndicesStatsResponse stats(Function<IndicesStatsRequest.Builder, ObjectBuilder<IndicesStatsRequest>> fn) throws IOException, ElasticsearchExceptionReturns statistics for one or more indices. For data streams, the API retrieves statistics for the stream’s backing indices.- Parameters:
fn
- a function that initializes a builder to create theIndicesStatsRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
stats
Returns statistics for one or more indices. For data streams, the API retrieves statistics for the stream’s backing indices.- Throws:
IOException
ElasticsearchException
- See Also:
-
unfreeze
public UnfreezeResponse unfreeze(UnfreezeRequest request) throws IOException, ElasticsearchException Unfreezes an index.- Throws:
IOException
ElasticsearchException
- See Also:
-
unfreeze
public final UnfreezeResponse unfreeze(Function<UnfreezeRequest.Builder, ObjectBuilder<UnfreezeRequest>> fn) throws IOException, ElasticsearchExceptionUnfreezes an index.- Parameters:
fn
- a function that initializes a builder to create theUnfreezeRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
updateAliases
public UpdateAliasesResponse updateAliases(UpdateAliasesRequest request) throws IOException, ElasticsearchException Create or update an alias. Adds a data stream or index to an alias.- Throws:
IOException
ElasticsearchException
- See Also:
-
updateAliases
public final UpdateAliasesResponse updateAliases(Function<UpdateAliasesRequest.Builder, ObjectBuilder<UpdateAliasesRequest>> fn) throws IOException, ElasticsearchExceptionCreate or update an alias. Adds a data stream or index to an alias.- Parameters:
fn
- a function that initializes a builder to create theUpdateAliasesRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
updateAliases
Create or update an alias. Adds a data stream or index to an alias.- Throws:
IOException
ElasticsearchException
- See Also:
-
validateQuery
public ValidateQueryResponse validateQuery(ValidateQueryRequest request) throws IOException, ElasticsearchException Validate a query. Validates a query without running it.- Throws:
IOException
ElasticsearchException
- See Also:
-
validateQuery
public final ValidateQueryResponse validateQuery(Function<ValidateQueryRequest.Builder, ObjectBuilder<ValidateQueryRequest>> fn) throws IOException, ElasticsearchExceptionValidate a query. Validates a query without running it.- Parameters:
fn
- a function that initializes a builder to create theValidateQueryRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
validateQuery
Validate a query. Validates a query without running it.- Throws:
IOException
ElasticsearchException
- See Also:
-