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) Adds a block to an index.final AddBlockResponseAdds a block to an index.analyze()Performs the analysis process on a text and return the tokens breakdown of the text.analyze(AnalyzeRequest request) Performs the analysis process on a text and return the tokens breakdown of the text.final AnalyzeResponsePerforms the analysis process on a text and return the tokens breakdown of the text.Clears all or specific caches for one or more indices.clearCache(ClearCacheRequest request) Clears all or specific caches for one or more indices.final ClearCacheResponseClears all or specific caches for one or more indices.clone(CloneIndexRequest request) Clones an indexfinal CloneIndexResponseClones an indexclose(CloseIndexRequest request) Closes an index.final CloseIndexResponseCloses an index.create(CreateIndexRequest request) Creates an index with optional settings and mappings.final CreateIndexResponseCreates an index with optional settings and mappings.createDataStream(CreateDataStreamRequest request) Creates a data streamfinal CreateDataStreamResponsecreateDataStream(Function<CreateDataStreamRequest.Builder, ObjectBuilder<CreateDataStreamRequest>> fn) Creates a data streamProvides statistics on operations happening in a data stream.dataStreamsStats(DataStreamsStatsRequest request) Provides statistics on operations happening in a data stream.final DataStreamsStatsResponsedataStreamsStats(Function<DataStreamsStatsRequest.Builder, ObjectBuilder<DataStreamsStatsRequest>> fn) Provides statistics on operations happening in a data stream.delete(DeleteIndexRequest request) Deletes an index.final DeleteIndexResponseDeletes an index.deleteAlias(DeleteAliasRequest request) Deletes an alias.final DeleteAliasResponseDeletes an alias.deleteDataStream(DeleteDataStreamRequest request) Deletes a data stream.final DeleteDataStreamResponsedeleteDataStream(Function<DeleteDataStreamRequest.Builder, ObjectBuilder<DeleteDataStreamRequest>> fn) Deletes a data stream.Deletes an index template.deleteIndexTemplate(Function<DeleteIndexTemplateRequest.Builder, ObjectBuilder<DeleteIndexTemplateRequest>> fn) Deletes an index template.deleteTemplate(DeleteTemplateRequest request) Deletes an index template.final DeleteTemplateResponseDeletes an index template.diskUsage(DiskUsageRequest request) Analyzes the disk usage of each field of an index or data streamfinal DiskUsageResponseAnalyzes the disk usage of each field of an index or data streamexists(ExistsRequest request) Returns information about whether a particular index exists.final BooleanResponseReturns information about whether a particular index exists.existsAlias(ExistsAliasRequest request) Returns information about whether a particular alias exists.final BooleanResponseReturns information about whether a particular alias exists.Returns information about whether a particular index template exists.final BooleanResponseexistsIndexTemplate(Function<ExistsIndexTemplateRequest.Builder, ObjectBuilder<ExistsIndexTemplateRequest>> fn) Returns information about whether a particular index template exists.existsTemplate(ExistsTemplateRequest request) Returns information about whether a particular index template exists.final BooleanResponseReturns information about whether a particular index template exists.existsType(ExistsTypeRequest request) Returns information about whether a particular document type exists.final BooleanResponseReturns information about whether a particular document type exists.flush()Performs the flush operation on one or more indices.flush(FlushRequest request) Performs the flush operation on one or more indices.final FlushResponsePerforms the flush operation on one or more indices.Performs a synced flush operation on one or more indices.flushSynced(FlushSyncedRequest request) Performs a synced flush operation on one or more indices.final FlushSyncedResponsePerforms a synced flush operation on one or more 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 ForcemergeResponsePerforms the force merge operation on one or more indices.freeze(FreezeRequest request) Freezes an index.final FreezeResponseFreezes an index.get(GetIndexRequest request) Returns information about one or more indices.final GetIndexResponseReturns information about one or more indices.getAlias()Returns an alias.getAlias(GetAliasRequest request) Returns an alias.final GetAliasResponseReturns an alias.Returns data streams.getDataStream(GetDataStreamRequest request) Returns data streams.final GetDataStreamResponseReturns data streams.getFieldMapping(GetFieldMappingRequest request) Returns mapping for one or more fields.final GetFieldMappingResponseReturns mapping for one or more fields.Returns an index template.getIndexTemplate(GetIndexTemplateRequest request) Returns an index template.final GetIndexTemplateResponsegetIndexTemplate(Function<GetIndexTemplateRequest.Builder, ObjectBuilder<GetIndexTemplateRequest>> fn) Returns an index template.Returns mappings for one or more indices.getMapping(GetMappingRequest request) Returns mappings for one or more indices.final GetMappingResponseReturns mappings for one or more indices.Returns settings for one or more indices.getSettings(GetIndicesSettingsRequest request) Returns settings for one or more indices.getSettings(Function<GetIndicesSettingsRequest.Builder, ObjectBuilder<GetIndicesSettingsRequest>> fn) Returns settings for one or more indices.Returns an index template.getTemplate(GetTemplateRequest request) Returns an index template.final GetTemplateResponseReturns an index template.DEPRECATED Returns a progress status of current upgrade.getUpgrade(GetUpgradeRequest request) DEPRECATED Returns a progress status of current upgrade.final GetUpgradeResponseDEPRECATED Returns a progress status of current upgrade.Migrates an alias to a data streammigrateToDataStream(Function<MigrateToDataStreamRequest.Builder, ObjectBuilder<MigrateToDataStreamRequest>> fn) Migrates an alias to a data streamopen(OpenRequest request) Opens an index.final OpenResponseOpens an 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) Creates or updates an alias.final PutAliasResponseCreates or updates an alias.putIndexTemplate(PutIndexTemplateRequest request) Creates or updates an index template.final PutIndexTemplateResponseputIndexTemplate(Function<PutIndexTemplateRequest.Builder, ObjectBuilder<PutIndexTemplateRequest>> fn) Creates or updates an index template.putMapping(PutMappingRequest request) Updates the index mappings.final PutMappingResponseUpdates the index mappings.Updates the index settings.putSettings(PutIndicesSettingsRequest request) Updates the index settings.putSettings(Function<PutIndicesSettingsRequest.Builder, ObjectBuilder<PutIndicesSettingsRequest>> fn) Updates the index settings.putTemplate(PutTemplateRequest request) Creates or updates an index template.final PutTemplateResponseCreates or updates an index template.recovery()Returns information about ongoing index shard recoveries.recovery(RecoveryRequest request) Returns information about ongoing index shard recoveries.final RecoveryResponseReturns information about ongoing index shard recoveries.refresh()Performs the refresh operation in one or more indices.refresh(RefreshRequest request) Performs the refresh operation in one or more indices.final RefreshResponsePerforms the refresh operation in one or more indices.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.resolveIndex(ResolveIndexRequest request) Returns information about any matching indices, aliases, and data streamsfinal ResolveIndexResponseReturns information about any matching indices, aliases, and data streamsrollover(RolloverRequest request) Updates an alias to point to a new index when the existing index is considered to be too large or too old.final RolloverResponseUpdates an alias to point to a new index when the existing index is considered to be too large or too old.segments()Provides low-level information about segments in a Lucene index.segments(SegmentsRequest request) Provides low-level information about segments in a Lucene index.final SegmentsResponseProvides low-level information about segments in a Lucene index.Provides store information for shard copies of indices.shardStores(ShardStoresRequest request) Provides store information for shard copies of indices.final ShardStoresResponseProvides store information for shard copies of indices.shrink(ShrinkRequest request) Allow to shrink an existing index into a new index with fewer primary shards.final ShrinkResponseAllow to shrink an existing index into a new index with fewer primary shards.Simulate matching the given index name against the index templates in the systemsimulateIndexTemplate(Function<SimulateIndexTemplateRequest.Builder, ObjectBuilder<SimulateIndexTemplateRequest>> fn) Simulate matching the given index name against the index templates in the systemSimulate resolving the given template name or bodysimulateTemplate(SimulateTemplateRequest request) Simulate resolving the given template name or bodyfinal SimulateTemplateResponsesimulateTemplate(Function<SimulateTemplateRequest.Builder, ObjectBuilder<SimulateTemplateRequest>> fn) Simulate resolving the given template name or bodysplit(SplitRequest request) Allows you to split an existing index into a new index with more primary shards.final SplitResponseAllows you to split an existing index into a new index with more primary shards.stats()Provides statistics on operations happening in an index.stats(IndicesStatsRequest request) Provides statistics on operations happening in an index.final IndicesStatsResponseProvides statistics on operations happening in an index.unfreeze(UnfreezeRequest request) Unfreezes an index.final UnfreezeResponseUnfreezes an index.Updates index aliases.updateAliases(UpdateAliasesRequest request) Updates index aliases.final UpdateAliasesResponseUpdates index aliases.upgrade()DEPRECATED Upgrades to the current version of Lucene.upgrade(UpgradeRequest request) DEPRECATED Upgrades to the current version of Lucene.final UpgradeResponseDEPRECATED Upgrades to the current version of Lucene.Allows a user to validate a potentially expensive query without executing it.validateQuery(ValidateQueryRequest request) Allows a user to validate a potentially expensive query without executing it.final ValidateQueryResponseAllows a user to validate a potentially expensive query without executing it.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:ApiClientCreates a new client with some request options- Specified by:
withTransportOptionsin classApiClient<ElasticsearchTransport,ElasticsearchIndicesClient>
-
addBlock
public AddBlockResponse addBlock(AddBlockRequest request) throws IOException, ElasticsearchException Adds a block to an index.- Throws:
IOExceptionElasticsearchException- See Also:
-
addBlock
public final AddBlockResponse addBlock(Function<AddBlockRequest.Builder, ObjectBuilder<AddBlockRequest>> fn) throws IOException, ElasticsearchExceptionAdds a block to an index.- Parameters:
fn- a function that initializes a builder to create theAddBlockRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
analyze
Performs the analysis process on a text and return the tokens breakdown of the text.- Throws:
IOExceptionElasticsearchException- See Also:
-
analyze
public final AnalyzeResponse analyze(Function<AnalyzeRequest.Builder, ObjectBuilder<AnalyzeRequest>> fn) throws IOException, ElasticsearchExceptionPerforms the analysis process on a text and return the tokens breakdown of the text.- Parameters:
fn- a function that initializes a builder to create theAnalyzeRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
analyze
Performs the analysis process on a text and return the tokens breakdown of the text.- Throws:
IOExceptionElasticsearchException- See Also:
-
clearCache
public ClearCacheResponse clearCache(ClearCacheRequest request) throws IOException, ElasticsearchException Clears all or specific caches for one or more indices.- Throws:
IOExceptionElasticsearchException- See Also:
-
clearCache
public final ClearCacheResponse clearCache(Function<ClearCacheRequest.Builder, ObjectBuilder<ClearCacheRequest>> fn) throws IOException, ElasticsearchExceptionClears all or specific caches for one or more indices.- Parameters:
fn- a function that initializes a builder to create theClearCacheRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
clearCache
Clears all or specific caches for one or more indices.- Throws:
IOExceptionElasticsearchException- See Also:
-
clone
public CloneIndexResponse clone(CloneIndexRequest request) throws IOException, ElasticsearchException Clones an index- Throws:
IOExceptionElasticsearchException- See Also:
-
clone
public final CloneIndexResponse clone(Function<CloneIndexRequest.Builder, ObjectBuilder<CloneIndexRequest>> fn) throws IOException, ElasticsearchExceptionClones an index- Parameters:
fn- a function that initializes a builder to create theCloneIndexRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
close
public CloseIndexResponse close(CloseIndexRequest request) throws IOException, ElasticsearchException Closes an index.- Throws:
IOExceptionElasticsearchException- 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:
IOExceptionElasticsearchException- See Also:
-
create
public CreateIndexResponse create(CreateIndexRequest request) throws IOException, ElasticsearchException Creates an index with optional settings and mappings.- Throws:
IOExceptionElasticsearchException- See Also:
-
create
public final CreateIndexResponse create(Function<CreateIndexRequest.Builder, ObjectBuilder<CreateIndexRequest>> fn) throws IOException, ElasticsearchExceptionCreates an index with optional settings and mappings.- Parameters:
fn- a function that initializes a builder to create theCreateIndexRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
createDataStream
public CreateDataStreamResponse createDataStream(CreateDataStreamRequest request) throws IOException, ElasticsearchException Creates a data stream- Throws:
IOExceptionElasticsearchException- See Also:
-
createDataStream
public final CreateDataStreamResponse createDataStream(Function<CreateDataStreamRequest.Builder, ObjectBuilder<CreateDataStreamRequest>> fn) throws IOException, ElasticsearchExceptionCreates a data stream- Parameters:
fn- a function that initializes a builder to create theCreateDataStreamRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
dataStreamsStats
public DataStreamsStatsResponse dataStreamsStats(DataStreamsStatsRequest request) throws IOException, ElasticsearchException Provides statistics on operations happening in a data stream.- Throws:
IOExceptionElasticsearchException- See Also:
-
dataStreamsStats
public final DataStreamsStatsResponse dataStreamsStats(Function<DataStreamsStatsRequest.Builder, ObjectBuilder<DataStreamsStatsRequest>> fn) throws IOException, ElasticsearchExceptionProvides statistics on operations happening in a data stream.- Parameters:
fn- a function that initializes a builder to create theDataStreamsStatsRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
dataStreamsStats
Provides statistics on operations happening in a data stream.- Throws:
IOExceptionElasticsearchException- See Also:
-
delete
public DeleteIndexResponse delete(DeleteIndexRequest request) throws IOException, ElasticsearchException Deletes an index.- Throws:
IOExceptionElasticsearchException- See Also:
-
delete
public final DeleteIndexResponse delete(Function<DeleteIndexRequest.Builder, ObjectBuilder<DeleteIndexRequest>> fn) throws IOException, ElasticsearchExceptionDeletes an index.- Parameters:
fn- a function that initializes a builder to create theDeleteIndexRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
deleteAlias
public DeleteAliasResponse deleteAlias(DeleteAliasRequest request) throws IOException, ElasticsearchException Deletes an alias.- Throws:
IOExceptionElasticsearchException- See Also:
-
deleteAlias
public final DeleteAliasResponse deleteAlias(Function<DeleteAliasRequest.Builder, ObjectBuilder<DeleteAliasRequest>> fn) throws IOException, ElasticsearchExceptionDeletes an alias.- Parameters:
fn- a function that initializes a builder to create theDeleteAliasRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
deleteDataStream
public DeleteDataStreamResponse deleteDataStream(DeleteDataStreamRequest request) throws IOException, ElasticsearchException Deletes a data stream.- Throws:
IOExceptionElasticsearchException- See Also:
-
deleteDataStream
public final DeleteDataStreamResponse deleteDataStream(Function<DeleteDataStreamRequest.Builder, ObjectBuilder<DeleteDataStreamRequest>> fn) throws IOException, ElasticsearchExceptionDeletes a data stream.- Parameters:
fn- a function that initializes a builder to create theDeleteDataStreamRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
deleteIndexTemplate
public DeleteIndexTemplateResponse deleteIndexTemplate(DeleteIndexTemplateRequest request) throws IOException, ElasticsearchException Deletes an index template.- Throws:
IOExceptionElasticsearchException- See Also:
-
deleteIndexTemplate
public final DeleteIndexTemplateResponse deleteIndexTemplate(Function<DeleteIndexTemplateRequest.Builder, ObjectBuilder<DeleteIndexTemplateRequest>> fn) throws IOException, ElasticsearchExceptionDeletes an index template.- Parameters:
fn- a function that initializes a builder to create theDeleteIndexTemplateRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
deleteTemplate
public DeleteTemplateResponse deleteTemplate(DeleteTemplateRequest request) throws IOException, ElasticsearchException Deletes an index template.- Throws:
IOExceptionElasticsearchException- See Also:
-
deleteTemplate
public final DeleteTemplateResponse deleteTemplate(Function<DeleteTemplateRequest.Builder, ObjectBuilder<DeleteTemplateRequest>> fn) throws IOException, ElasticsearchExceptionDeletes an index template.- Parameters:
fn- a function that initializes a builder to create theDeleteTemplateRequest- Throws:
IOExceptionElasticsearchException- 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:
IOExceptionElasticsearchException- 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:
IOExceptionElasticsearchException- See Also:
-
exists
Returns information about whether a particular index exists.- Throws:
IOExceptionElasticsearchException- See Also:
-
exists
public final BooleanResponse exists(Function<ExistsRequest.Builder, ObjectBuilder<ExistsRequest>> fn) throws IOException, ElasticsearchExceptionReturns information about whether a particular index exists.- Parameters:
fn- a function that initializes a builder to create theExistsRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
existsAlias
public BooleanResponse existsAlias(ExistsAliasRequest request) throws IOException, ElasticsearchException Returns information about whether a particular alias exists.- Throws:
IOExceptionElasticsearchException- See Also:
-
existsAlias
public final BooleanResponse existsAlias(Function<ExistsAliasRequest.Builder, ObjectBuilder<ExistsAliasRequest>> fn) throws IOException, ElasticsearchExceptionReturns information about whether a particular alias exists.- Parameters:
fn- a function that initializes a builder to create theExistsAliasRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
existsIndexTemplate
public BooleanResponse existsIndexTemplate(ExistsIndexTemplateRequest request) throws IOException, ElasticsearchException Returns information about whether a particular index template exists.- Throws:
IOExceptionElasticsearchException- 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:
IOExceptionElasticsearchException- See Also:
-
existsTemplate
public BooleanResponse existsTemplate(ExistsTemplateRequest request) throws IOException, ElasticsearchException Returns information about whether a particular index template exists.- Throws:
IOExceptionElasticsearchException- See Also:
-
existsTemplate
public final BooleanResponse existsTemplate(Function<ExistsTemplateRequest.Builder, ObjectBuilder<ExistsTemplateRequest>> fn) throws IOException, ElasticsearchExceptionReturns information about whether a particular index template exists.- Parameters:
fn- a function that initializes a builder to create theExistsTemplateRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
existsType
public BooleanResponse existsType(ExistsTypeRequest request) throws IOException, ElasticsearchException Returns information about whether a particular document type exists. (DEPRECATED)- Throws:
IOExceptionElasticsearchException- See Also:
-
existsType
public final BooleanResponse existsType(Function<ExistsTypeRequest.Builder, ObjectBuilder<ExistsTypeRequest>> fn) throws IOException, ElasticsearchExceptionReturns information about whether a particular document type exists. (DEPRECATED)- Parameters:
fn- a function that initializes a builder to create theExistsTypeRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
flush
Performs the flush operation on one or more indices.- Throws:
IOExceptionElasticsearchException- See Also:
-
flush
public final FlushResponse flush(Function<FlushRequest.Builder, ObjectBuilder<FlushRequest>> fn) throws IOException, ElasticsearchExceptionPerforms the flush operation on one or more indices.- Parameters:
fn- a function that initializes a builder to create theFlushRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
flush
Performs the flush operation on one or more indices.- Throws:
IOExceptionElasticsearchException- See Also:
-
flushSynced
public FlushSyncedResponse flushSynced(FlushSyncedRequest request) throws IOException, ElasticsearchException Performs a synced flush operation on one or more indices. Synced flush is deprecated and will be removed in 8.0. Use flush instead- Throws:
IOExceptionElasticsearchException- See Also:
-
flushSynced
public final FlushSyncedResponse flushSynced(Function<FlushSyncedRequest.Builder, ObjectBuilder<FlushSyncedRequest>> fn) throws IOException, ElasticsearchExceptionPerforms a synced flush operation on one or more indices. Synced flush is deprecated and will be removed in 8.0. Use flush instead- Parameters:
fn- a function that initializes a builder to create theFlushSyncedRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
flushSynced
Performs a synced flush operation on one or more indices. Synced flush is deprecated and will be removed in 8.0. Use flush instead- Throws:
IOExceptionElasticsearchException- See Also:
-
forcemerge
public ForcemergeResponse forcemerge(ForcemergeRequest request) throws IOException, ElasticsearchException Performs the force merge operation on one or more indices.- Throws:
IOExceptionElasticsearchException- 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:
IOExceptionElasticsearchException- See Also:
-
forcemerge
Performs the force merge operation on one or more indices.- Throws:
IOExceptionElasticsearchException- See Also:
-
freeze
Freezes an index. A frozen index has almost no overhead on the cluster (except for maintaining its metadata in memory) and is read-only.- Throws:
IOExceptionElasticsearchException- See Also:
-
freeze
public final FreezeResponse freeze(Function<FreezeRequest.Builder, ObjectBuilder<FreezeRequest>> fn) throws IOException, ElasticsearchExceptionFreezes an index. A frozen index has almost no overhead on the cluster (except for maintaining its metadata in memory) and is read-only.- Parameters:
fn- a function that initializes a builder to create theFreezeRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
get
Returns information about one or more indices.- Throws:
IOExceptionElasticsearchException- See Also:
-
get
public final GetIndexResponse get(Function<GetIndexRequest.Builder, ObjectBuilder<GetIndexRequest>> fn) throws IOException, ElasticsearchExceptionReturns information about one or more indices.- Parameters:
fn- a function that initializes a builder to create theGetIndexRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
getAlias
public GetAliasResponse getAlias(GetAliasRequest request) throws IOException, ElasticsearchException Returns an alias.- Throws:
IOExceptionElasticsearchException- See Also:
-
getAlias
public final GetAliasResponse getAlias(Function<GetAliasRequest.Builder, ObjectBuilder<GetAliasRequest>> fn) throws IOException, ElasticsearchExceptionReturns an alias.- Parameters:
fn- a function that initializes a builder to create theGetAliasRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
getAlias
Returns an alias.- Throws:
IOExceptionElasticsearchException- See Also:
-
getDataStream
public GetDataStreamResponse getDataStream(GetDataStreamRequest request) throws IOException, ElasticsearchException Returns data streams.- Throws:
IOExceptionElasticsearchException- See Also:
-
getDataStream
public final GetDataStreamResponse getDataStream(Function<GetDataStreamRequest.Builder, ObjectBuilder<GetDataStreamRequest>> fn) throws IOException, ElasticsearchExceptionReturns data streams.- Parameters:
fn- a function that initializes a builder to create theGetDataStreamRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
getDataStream
Returns data streams.- Throws:
IOExceptionElasticsearchException- See Also:
-
getFieldMapping
public GetFieldMappingResponse getFieldMapping(GetFieldMappingRequest request) throws IOException, ElasticsearchException Returns mapping for one or more fields.- Throws:
IOExceptionElasticsearchException- See Also:
-
getFieldMapping
public final GetFieldMappingResponse getFieldMapping(Function<GetFieldMappingRequest.Builder, ObjectBuilder<GetFieldMappingRequest>> fn) throws IOException, ElasticsearchExceptionReturns mapping for one or more fields.- Parameters:
fn- a function that initializes a builder to create theGetFieldMappingRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
getIndexTemplate
public GetIndexTemplateResponse getIndexTemplate(GetIndexTemplateRequest request) throws IOException, ElasticsearchException Returns an index template.- Throws:
IOExceptionElasticsearchException- See Also:
-
getIndexTemplate
public final GetIndexTemplateResponse getIndexTemplate(Function<GetIndexTemplateRequest.Builder, ObjectBuilder<GetIndexTemplateRequest>> fn) throws IOException, ElasticsearchExceptionReturns an index template.- Parameters:
fn- a function that initializes a builder to create theGetIndexTemplateRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
getIndexTemplate
Returns an index template.- Throws:
IOExceptionElasticsearchException- See Also:
-
getMapping
public GetMappingResponse getMapping(GetMappingRequest request) throws IOException, ElasticsearchException Returns mappings for one or more indices.- Throws:
IOExceptionElasticsearchException- See Also:
-
getMapping
public final GetMappingResponse getMapping(Function<GetMappingRequest.Builder, ObjectBuilder<GetMappingRequest>> fn) throws IOException, ElasticsearchExceptionReturns mappings for one or more indices.- Parameters:
fn- a function that initializes a builder to create theGetMappingRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
getMapping
Returns mappings for one or more indices.- Throws:
IOExceptionElasticsearchException- See Also:
-
getSettings
public GetIndicesSettingsResponse getSettings(GetIndicesSettingsRequest request) throws IOException, ElasticsearchException Returns settings for one or more indices.- Throws:
IOExceptionElasticsearchException- See Also:
-
getSettings
public final GetIndicesSettingsResponse getSettings(Function<GetIndicesSettingsRequest.Builder, ObjectBuilder<GetIndicesSettingsRequest>> fn) throws IOException, ElasticsearchExceptionReturns settings for one or more indices.- Parameters:
fn- a function that initializes a builder to create theGetIndicesSettingsRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
getSettings
Returns settings for one or more indices.- Throws:
IOExceptionElasticsearchException- See Also:
-
getTemplate
public GetTemplateResponse getTemplate(GetTemplateRequest request) throws IOException, ElasticsearchException Returns an index template.- Throws:
IOExceptionElasticsearchException- See Also:
-
getTemplate
public final GetTemplateResponse getTemplate(Function<GetTemplateRequest.Builder, ObjectBuilder<GetTemplateRequest>> fn) throws IOException, ElasticsearchExceptionReturns an index template.- Parameters:
fn- a function that initializes a builder to create theGetTemplateRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
getTemplate
Returns an index template.- Throws:
IOExceptionElasticsearchException- See Also:
-
getUpgrade
public GetUpgradeResponse getUpgrade(GetUpgradeRequest request) throws IOException, ElasticsearchException DEPRECATED Returns a progress status of current upgrade.- Throws:
IOExceptionElasticsearchException- See Also:
-
getUpgrade
public final GetUpgradeResponse getUpgrade(Function<GetUpgradeRequest.Builder, ObjectBuilder<GetUpgradeRequest>> fn) throws IOException, ElasticsearchExceptionDEPRECATED Returns a progress status of current upgrade.- Parameters:
fn- a function that initializes a builder to create theGetUpgradeRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
getUpgrade
DEPRECATED Returns a progress status of current upgrade.- Throws:
IOExceptionElasticsearchException- See Also:
-
migrateToDataStream
public MigrateToDataStreamResponse migrateToDataStream(MigrateToDataStreamRequest request) throws IOException, ElasticsearchException Migrates an alias to a data stream- Throws:
IOExceptionElasticsearchException- See Also:
-
migrateToDataStream
public final MigrateToDataStreamResponse migrateToDataStream(Function<MigrateToDataStreamRequest.Builder, ObjectBuilder<MigrateToDataStreamRequest>> fn) throws IOException, ElasticsearchExceptionMigrates an alias to a data stream- Parameters:
fn- a function that initializes a builder to create theMigrateToDataStreamRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
open
Opens an index.- Throws:
IOExceptionElasticsearchException- See Also:
-
open
public final OpenResponse open(Function<OpenRequest.Builder, ObjectBuilder<OpenRequest>> fn) throws IOException, ElasticsearchExceptionOpens an index.- Parameters:
fn- a function that initializes a builder to create theOpenRequest- Throws:
IOExceptionElasticsearchException- 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:
IOExceptionElasticsearchException- 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:
IOExceptionElasticsearchException- See Also:
-
putAlias
public PutAliasResponse putAlias(PutAliasRequest request) throws IOException, ElasticsearchException Creates or updates an alias.- Throws:
IOExceptionElasticsearchException- See Also:
-
putAlias
public final PutAliasResponse putAlias(Function<PutAliasRequest.Builder, ObjectBuilder<PutAliasRequest>> fn) throws IOException, ElasticsearchExceptionCreates or updates an alias.- Parameters:
fn- a function that initializes a builder to create thePutAliasRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
putIndexTemplate
public PutIndexTemplateResponse putIndexTemplate(PutIndexTemplateRequest request) throws IOException, ElasticsearchException Creates or updates an index template.- Throws:
IOExceptionElasticsearchException- See Also:
-
putIndexTemplate
public final PutIndexTemplateResponse putIndexTemplate(Function<PutIndexTemplateRequest.Builder, ObjectBuilder<PutIndexTemplateRequest>> fn) throws IOException, ElasticsearchExceptionCreates or updates an index template.- Parameters:
fn- a function that initializes a builder to create thePutIndexTemplateRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
putMapping
public PutMappingResponse putMapping(PutMappingRequest request) throws IOException, ElasticsearchException Updates the index mappings.- Throws:
IOExceptionElasticsearchException- See Also:
-
putMapping
public final PutMappingResponse putMapping(Function<PutMappingRequest.Builder, ObjectBuilder<PutMappingRequest>> fn) throws IOException, ElasticsearchExceptionUpdates the index mappings.- Parameters:
fn- a function that initializes a builder to create thePutMappingRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
putSettings
public PutIndicesSettingsResponse putSettings(PutIndicesSettingsRequest request) throws IOException, ElasticsearchException Updates the index settings.- Throws:
IOExceptionElasticsearchException- See Also:
-
putSettings
public final PutIndicesSettingsResponse putSettings(Function<PutIndicesSettingsRequest.Builder, ObjectBuilder<PutIndicesSettingsRequest>> fn) throws IOException, ElasticsearchExceptionUpdates the index settings.- Parameters:
fn- a function that initializes a builder to create thePutIndicesSettingsRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
putSettings
Updates the index settings.- Throws:
IOExceptionElasticsearchException- See Also:
-
putTemplate
public PutTemplateResponse putTemplate(PutTemplateRequest request) throws IOException, ElasticsearchException Creates or updates an index template.- Throws:
IOExceptionElasticsearchException- See Also:
-
putTemplate
public final PutTemplateResponse putTemplate(Function<PutTemplateRequest.Builder, ObjectBuilder<PutTemplateRequest>> fn) throws IOException, ElasticsearchExceptionCreates or updates an index template.- Parameters:
fn- a function that initializes a builder to create thePutTemplateRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
recovery
public RecoveryResponse recovery(RecoveryRequest request) throws IOException, ElasticsearchException Returns information about ongoing index shard recoveries.- Throws:
IOExceptionElasticsearchException- See Also:
-
recovery
public final RecoveryResponse recovery(Function<RecoveryRequest.Builder, ObjectBuilder<RecoveryRequest>> fn) throws IOException, ElasticsearchExceptionReturns information about ongoing index shard recoveries.- Parameters:
fn- a function that initializes a builder to create theRecoveryRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
recovery
Returns information about ongoing index shard recoveries.- Throws:
IOExceptionElasticsearchException- See Also:
-
refresh
Performs the refresh operation in one or more indices.- Throws:
IOExceptionElasticsearchException- See Also:
-
refresh
public final RefreshResponse refresh(Function<RefreshRequest.Builder, ObjectBuilder<RefreshRequest>> fn) throws IOException, ElasticsearchExceptionPerforms the refresh operation in one or more indices.- Parameters:
fn- a function that initializes a builder to create theRefreshRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
refresh
Performs the refresh operation in one or more indices.- Throws:
IOExceptionElasticsearchException- See Also:
-
reloadSearchAnalyzers
public ReloadSearchAnalyzersResponse reloadSearchAnalyzers(ReloadSearchAnalyzersRequest request) throws IOException, ElasticsearchException Reloads an index's search analyzers and their resources.- Throws:
IOExceptionElasticsearchException- 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:
IOExceptionElasticsearchException- See Also:
-
resolveIndex
public ResolveIndexResponse resolveIndex(ResolveIndexRequest request) throws IOException, ElasticsearchException Returns information about any matching indices, aliases, and data streams- Throws:
IOExceptionElasticsearchException- See Also:
-
resolveIndex
public final ResolveIndexResponse resolveIndex(Function<ResolveIndexRequest.Builder, ObjectBuilder<ResolveIndexRequest>> fn) throws IOException, ElasticsearchExceptionReturns information about any matching indices, aliases, and data streams- Parameters:
fn- a function that initializes a builder to create theResolveIndexRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
rollover
public RolloverResponse rollover(RolloverRequest request) throws IOException, ElasticsearchException Updates an alias to point to a new index when the existing index is considered to be too large or too old.- Throws:
IOExceptionElasticsearchException- See Also:
-
rollover
public final RolloverResponse rollover(Function<RolloverRequest.Builder, ObjectBuilder<RolloverRequest>> fn) throws IOException, ElasticsearchExceptionUpdates an alias to point to a new index when the existing index is considered to be too large or too old.- Parameters:
fn- a function that initializes a builder to create theRolloverRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
segments
public SegmentsResponse segments(SegmentsRequest request) throws IOException, ElasticsearchException Provides low-level information about segments in a Lucene index.- Throws:
IOExceptionElasticsearchException- See Also:
-
segments
public final SegmentsResponse segments(Function<SegmentsRequest.Builder, ObjectBuilder<SegmentsRequest>> fn) throws IOException, ElasticsearchExceptionProvides low-level information about segments in a Lucene index.- Parameters:
fn- a function that initializes a builder to create theSegmentsRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
segments
Provides low-level information about segments in a Lucene index.- Throws:
IOExceptionElasticsearchException- See Also:
-
shardStores
public ShardStoresResponse shardStores(ShardStoresRequest request) throws IOException, ElasticsearchException Provides store information for shard copies of indices.- Throws:
IOExceptionElasticsearchException- See Also:
-
shardStores
public final ShardStoresResponse shardStores(Function<ShardStoresRequest.Builder, ObjectBuilder<ShardStoresRequest>> fn) throws IOException, ElasticsearchExceptionProvides store information for shard copies of indices.- Parameters:
fn- a function that initializes a builder to create theShardStoresRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
shardStores
Provides store information for shard copies of indices.- Throws:
IOExceptionElasticsearchException- See Also:
-
shrink
Allow to shrink an existing index into a new index with fewer primary shards.- Throws:
IOExceptionElasticsearchException- See Also:
-
shrink
public final ShrinkResponse shrink(Function<ShrinkRequest.Builder, ObjectBuilder<ShrinkRequest>> fn) throws IOException, ElasticsearchExceptionAllow to shrink an existing index into a new index with fewer primary shards.- Parameters:
fn- a function that initializes a builder to create theShrinkRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
simulateIndexTemplate
public SimulateIndexTemplateResponse simulateIndexTemplate(SimulateIndexTemplateRequest request) throws IOException, ElasticsearchException Simulate matching the given index name against the index templates in the system- Throws:
IOExceptionElasticsearchException- See Also:
-
simulateIndexTemplate
public final SimulateIndexTemplateResponse simulateIndexTemplate(Function<SimulateIndexTemplateRequest.Builder, ObjectBuilder<SimulateIndexTemplateRequest>> fn) throws IOException, ElasticsearchExceptionSimulate matching the given index name against the index templates in the system- Parameters:
fn- a function that initializes a builder to create theSimulateIndexTemplateRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
simulateTemplate
public SimulateTemplateResponse simulateTemplate(SimulateTemplateRequest request) throws IOException, ElasticsearchException Simulate resolving the given template name or body- Throws:
IOExceptionElasticsearchException- See Also:
-
simulateTemplate
public final SimulateTemplateResponse simulateTemplate(Function<SimulateTemplateRequest.Builder, ObjectBuilder<SimulateTemplateRequest>> fn) throws IOException, ElasticsearchExceptionSimulate resolving the given template name or body- Parameters:
fn- a function that initializes a builder to create theSimulateTemplateRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
simulateTemplate
Simulate resolving the given template name or body- Throws:
IOExceptionElasticsearchException- See Also:
-
split
Allows you to split an existing index into a new index with more primary shards.- Throws:
IOExceptionElasticsearchException- See Also:
-
split
public final SplitResponse split(Function<SplitRequest.Builder, ObjectBuilder<SplitRequest>> fn) throws IOException, ElasticsearchExceptionAllows you to split an existing index into a new index with more primary shards.- Parameters:
fn- a function that initializes a builder to create theSplitRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
stats
public IndicesStatsResponse stats(IndicesStatsRequest request) throws IOException, ElasticsearchException Provides statistics on operations happening in an index.- Throws:
IOExceptionElasticsearchException- See Also:
-
stats
public final IndicesStatsResponse stats(Function<IndicesStatsRequest.Builder, ObjectBuilder<IndicesStatsRequest>> fn) throws IOException, ElasticsearchExceptionProvides statistics on operations happening in an index.- Parameters:
fn- a function that initializes a builder to create theIndicesStatsRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
stats
Provides statistics on operations happening in an index.- Throws:
IOExceptionElasticsearchException- See Also:
-
unfreeze
public UnfreezeResponse unfreeze(UnfreezeRequest request) throws IOException, ElasticsearchException Unfreezes an index. When a frozen index is unfrozen, the index goes through the normal recovery process and becomes writeable again.- Throws:
IOExceptionElasticsearchException- See Also:
-
unfreeze
public final UnfreezeResponse unfreeze(Function<UnfreezeRequest.Builder, ObjectBuilder<UnfreezeRequest>> fn) throws IOException, ElasticsearchExceptionUnfreezes an index. When a frozen index is unfrozen, the index goes through the normal recovery process and becomes writeable again.- Parameters:
fn- a function that initializes a builder to create theUnfreezeRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
updateAliases
public UpdateAliasesResponse updateAliases(UpdateAliasesRequest request) throws IOException, ElasticsearchException Updates index aliases.- Throws:
IOExceptionElasticsearchException- See Also:
-
updateAliases
public final UpdateAliasesResponse updateAliases(Function<UpdateAliasesRequest.Builder, ObjectBuilder<UpdateAliasesRequest>> fn) throws IOException, ElasticsearchExceptionUpdates index aliases.- Parameters:
fn- a function that initializes a builder to create theUpdateAliasesRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
updateAliases
Updates index aliases.- Throws:
IOExceptionElasticsearchException- See Also:
-
upgrade
DEPRECATED Upgrades to the current version of Lucene.- Throws:
IOExceptionElasticsearchException- See Also:
-
upgrade
public final UpgradeResponse upgrade(Function<UpgradeRequest.Builder, ObjectBuilder<UpgradeRequest>> fn) throws IOException, ElasticsearchExceptionDEPRECATED Upgrades to the current version of Lucene.- Parameters:
fn- a function that initializes a builder to create theUpgradeRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
upgrade
DEPRECATED Upgrades to the current version of Lucene.- Throws:
IOExceptionElasticsearchException- See Also:
-
validateQuery
public ValidateQueryResponse validateQuery(ValidateQueryRequest request) throws IOException, ElasticsearchException Allows a user to validate a potentially expensive query without executing it.- Throws:
IOExceptionElasticsearchException- See Also:
-
validateQuery
public final ValidateQueryResponse validateQuery(Function<ValidateQueryRequest.Builder, ObjectBuilder<ValidateQueryRequest>> fn) throws IOException, ElasticsearchExceptionAllows a user to validate a potentially expensive query without executing it.- Parameters:
fn- a function that initializes a builder to create theValidateQueryRequest- Throws:
IOExceptionElasticsearchException- See Also:
-
validateQuery
Allows a user to validate a potentially expensive query without executing it.- Throws:
IOExceptionElasticsearchException- See Also:
-