Class IndicesClient
java.lang.Object
org.opensearch.client.base.ApiClient<IndicesClient>
org.opensearch.client.opensearch.api.indices.IndicesClient
public class IndicesClient extends ApiClient<IndicesClient>
Client for the indices namespace.
-
Field Summary
-
Constructor Summary
Constructors Constructor Description IndicesClient(Transport transport)IndicesClient(Transport transport, org.opensearch.client.RequestOptions options) -
Method Summary
Modifier and Type Method Description AddBlockResponseaddBlock(java.util.function.Function<AddBlockRequest.Builder,ObjectBuilder<AddBlockRequest>> fn)Adds a block to an index.AddBlockResponseaddBlock(AddBlockRequest request)Adds a block to an index.AnalyzeResponseanalyze(java.util.function.Function<AnalyzeRequest.Builder,ObjectBuilder<AnalyzeRequest>> fn)Performs the analysis process on a text and return the tokens breakdown of the text.AnalyzeResponseanalyze(AnalyzeRequest request)Performs the analysis process on a text and return the tokens breakdown of the text.ClearCacheResponseclearCache(java.util.function.Function<ClearCacheRequest.Builder,ObjectBuilder<ClearCacheRequest>> fn)Clears all or specific caches for one or more indices.ClearCacheResponseclearCache(ClearCacheRequest request)Clears all or specific caches for one or more indices.CloneResponseclone(java.util.function.Function<CloneRequest.Builder,ObjectBuilder<CloneRequest>> fn)Clones an indexCloneResponseclone(CloneRequest request)Clones an indexCloseResponseclose(java.util.function.Function<CloseRequest.Builder,ObjectBuilder<CloseRequest>> fn)Closes an index.CloseResponseclose(CloseRequest request)Closes an index.CreateResponsecreate(java.util.function.Function<CreateRequest.Builder,ObjectBuilder<CreateRequest>> fn)Creates an index with optional settings and mappings.CreateResponsecreate(CreateRequest request)Creates an index with optional settings and mappings.DeleteResponsedelete(java.util.function.Function<DeleteRequest.Builder,ObjectBuilder<DeleteRequest>> fn)Deletes an index.DeleteResponsedelete(DeleteRequest request)Deletes an index.DeleteAliasResponsedeleteAlias(java.util.function.Function<DeleteAliasRequest.Builder,ObjectBuilder<DeleteAliasRequest>> fn)Deletes an alias.DeleteAliasResponsedeleteAlias(DeleteAliasRequest request)Deletes an alias.DeleteIndexTemplateResponsedeleteIndexTemplate(java.util.function.Function<DeleteIndexTemplateRequest.Builder,ObjectBuilder<DeleteIndexTemplateRequest>> fn)Deletes an index template.DeleteIndexTemplateResponsedeleteIndexTemplate(DeleteIndexTemplateRequest request)Deletes an index template.DeleteTemplateResponsedeleteTemplate(java.util.function.Function<DeleteTemplateRequest.Builder,ObjectBuilder<DeleteTemplateRequest>> fn)Deletes an index template.DeleteTemplateResponsedeleteTemplate(DeleteTemplateRequest request)Deletes an index template.BooleanResponseexists(java.util.function.Function<ExistsRequest.Builder,ObjectBuilder<ExistsRequest>> fn)Returns information about whether a particular index exists.BooleanResponseexists(ExistsRequest request)Returns information about whether a particular index exists.BooleanResponseexistsAlias(java.util.function.Function<ExistsAliasRequest.Builder,ObjectBuilder<ExistsAliasRequest>> fn)Returns information about whether a particular alias exists.BooleanResponseexistsAlias(ExistsAliasRequest request)Returns information about whether a particular alias exists.BooleanResponseexistsIndexTemplate(java.util.function.Function<ExistsIndexTemplateRequest.Builder,ObjectBuilder<ExistsIndexTemplateRequest>> fn)Returns information about whether a particular index template exists.BooleanResponseexistsIndexTemplate(ExistsIndexTemplateRequest request)Returns information about whether a particular index template exists.BooleanResponseexistsTemplate(java.util.function.Function<ExistsTemplateRequest.Builder,ObjectBuilder<ExistsTemplateRequest>> fn)Returns information about whether a particular index template exists.BooleanResponseexistsTemplate(ExistsTemplateRequest request)Returns information about whether a particular index template exists.BooleanResponseexistsType(java.util.function.Function<ExistsTypeRequest.Builder,ObjectBuilder<ExistsTypeRequest>> fn)Returns information about whether a particular document type exists.BooleanResponseexistsType(ExistsTypeRequest request)Returns information about whether a particular document type exists.FlushResponseflush(java.util.function.Function<FlushRequest.Builder,ObjectBuilder<FlushRequest>> fn)Performs the flush operation on one or more indices.FlushResponseflush(FlushRequest request)Performs the flush operation on one or more indices.FlushSyncedResponseflushSynced(java.util.function.Function<FlushSyncedRequest.Builder,ObjectBuilder<FlushSyncedRequest>> fn)Performs a synced flush operation on one or more indices.FlushSyncedResponseflushSynced(FlushSyncedRequest request)Performs a synced flush operation on one or more indices.ForcemergeResponseforcemerge(java.util.function.Function<ForcemergeRequest.Builder,ObjectBuilder<ForcemergeRequest>> fn)Performs the force merge operation on one or more indices.ForcemergeResponseforcemerge(ForcemergeRequest request)Performs the force merge operation on one or more indices.GetResponseget(java.util.function.Function<GetRequest.Builder,ObjectBuilder<GetRequest>> fn)Returns information about one or more indices.GetResponseget(GetRequest request)Returns information about one or more indices.GetAliasResponsegetAlias(java.util.function.Function<GetAliasRequest.Builder,ObjectBuilder<GetAliasRequest>> fn)Returns an alias.GetAliasResponsegetAlias(GetAliasRequest request)Returns an alias.GetFieldMappingResponsegetFieldMapping(java.util.function.Function<GetFieldMappingRequest.Builder,ObjectBuilder<GetFieldMappingRequest>> fn)Returns mapping for one or more fields.GetFieldMappingResponsegetFieldMapping(GetFieldMappingRequest request)Returns mapping for one or more fields.GetIndexTemplateResponsegetIndexTemplate(java.util.function.Function<GetIndexTemplateRequest.Builder,ObjectBuilder<GetIndexTemplateRequest>> fn)Returns an index template.GetIndexTemplateResponsegetIndexTemplate(GetIndexTemplateRequest request)Returns an index template.GetMappingResponsegetMapping(java.util.function.Function<GetMappingRequest.Builder,ObjectBuilder<GetMappingRequest>> fn)Returns mappings for one or more indices.GetMappingResponsegetMapping(GetMappingRequest request)Returns mappings for one or more indices.GetSettingsResponsegetSettings(java.util.function.Function<GetSettingsRequest.Builder,ObjectBuilder<GetSettingsRequest>> fn)Returns settings for one or more indices.GetSettingsResponsegetSettings(GetSettingsRequest request)Returns settings for one or more indices.GetTemplateResponsegetTemplate(java.util.function.Function<GetTemplateRequest.Builder,ObjectBuilder<GetTemplateRequest>> fn)Returns an index template.GetTemplateResponsegetTemplate(GetTemplateRequest request)Returns an index template.GetUpgradeResponsegetUpgrade(java.util.function.Function<GetUpgradeRequest.Builder,ObjectBuilder<GetUpgradeRequest>> fn)DEPRECATED Returns a progress status of current upgrade.GetUpgradeResponsegetUpgrade(GetUpgradeRequest request)DEPRECATED Returns a progress status of current upgrade.OpenResponseopen(java.util.function.Function<OpenRequest.Builder,ObjectBuilder<OpenRequest>> fn)Opens an index.OpenResponseopen(OpenRequest request)Opens an index.PutAliasResponseputAlias(java.util.function.Function<PutAliasRequest.Builder,ObjectBuilder<PutAliasRequest>> fn)Creates or updates an alias.PutAliasResponseputAlias(PutAliasRequest request)Creates or updates an alias.PutIndexTemplateResponseputIndexTemplate(java.util.function.Function<PutIndexTemplateRequest.Builder,ObjectBuilder<PutIndexTemplateRequest>> fn)Creates or updates an index template.PutIndexTemplateResponseputIndexTemplate(PutIndexTemplateRequest request)Creates or updates an index template.PutMappingResponseputMapping(java.util.function.Function<PutMappingRequest.Builder,ObjectBuilder<PutMappingRequest>> fn)Updates the index mappings.PutMappingResponseputMapping(PutMappingRequest request)Updates the index mappings.PutSettingsResponseputSettings(java.util.function.Function<PutSettingsRequest.Builder,ObjectBuilder<PutSettingsRequest>> fn)Updates the index settings.PutSettingsResponseputSettings(PutSettingsRequest request)Updates the index settings.PutTemplateResponseputTemplate(java.util.function.Function<PutTemplateRequest.Builder,ObjectBuilder<PutTemplateRequest>> fn)Creates or updates an index template.PutTemplateResponseputTemplate(PutTemplateRequest request)Creates or updates an index template.RecoveryResponserecovery(java.util.function.Function<RecoveryRequest.Builder,ObjectBuilder<RecoveryRequest>> fn)Returns information about ongoing index shard recoveries.RecoveryResponserecovery(RecoveryRequest request)Returns information about ongoing index shard recoveries.RefreshResponserefresh(java.util.function.Function<RefreshRequest.Builder,ObjectBuilder<RefreshRequest>> fn)Performs the refresh operation in one or more indices.RefreshResponserefresh(RefreshRequest request)Performs the refresh operation in one or more indices.ResolveIndexResponseresolveIndex(java.util.function.Function<ResolveIndexRequest.Builder,ObjectBuilder<ResolveIndexRequest>> fn)Returns information about any matching indices, aliases, and data streamsResolveIndexResponseresolveIndex(ResolveIndexRequest request)Returns information about any matching indices, aliases, and data streamsRolloverResponserollover(java.util.function.Function<RolloverRequest.Builder,ObjectBuilder<RolloverRequest>> fn)Updates an alias to point to a new index when the existing index is considered to be too large or too old.RolloverResponserollover(RolloverRequest request)Updates an alias to point to a new index when the existing index is considered to be too large or too old.SegmentsResponsesegments(java.util.function.Function<SegmentsRequest.Builder,ObjectBuilder<SegmentsRequest>> fn)Provides low-level information about segments in a Lucene index.SegmentsResponsesegments(SegmentsRequest request)Provides low-level information about segments in a Lucene index.ShardStoresResponseshardStores(java.util.function.Function<ShardStoresRequest.Builder,ObjectBuilder<ShardStoresRequest>> fn)Provides store information for shard copies of indices.ShardStoresResponseshardStores(ShardStoresRequest request)Provides store information for shard copies of indices.ShrinkResponseshrink(java.util.function.Function<ShrinkRequest.Builder,ObjectBuilder<ShrinkRequest>> fn)Allow to shrink an existing index into a new index with fewer primary shards.ShrinkResponseshrink(ShrinkRequest request)Allow to shrink an existing index into a new index with fewer primary shards.SimulateIndexTemplateResponsesimulateIndexTemplate(java.util.function.Function<SimulateIndexTemplateRequest.Builder,ObjectBuilder<SimulateIndexTemplateRequest>> fn)Simulate matching the given index name against the index templates in the systemSimulateIndexTemplateResponsesimulateIndexTemplate(SimulateIndexTemplateRequest request)Simulate matching the given index name against the index templates in the systemSimulateTemplateResponsesimulateTemplate(java.util.function.Function<SimulateTemplateRequest.Builder,ObjectBuilder<SimulateTemplateRequest>> fn)Simulate resolving the given template name or bodySimulateTemplateResponsesimulateTemplate(SimulateTemplateRequest request)Simulate resolving the given template name or bodySplitResponsesplit(java.util.function.Function<SplitRequest.Builder,ObjectBuilder<SplitRequest>> fn)Allows you to split an existing index into a new index with more primary shards.SplitResponsesplit(SplitRequest request)Allows you to split an existing index into a new index with more primary shards.StatsResponsestats(java.util.function.Function<StatsRequest.Builder,ObjectBuilder<StatsRequest>> fn)Provides statistics on operations happening in an index.StatsResponsestats(StatsRequest request)Provides statistics on operations happening in an index.UpdateAliasesResponseupdateAliases(java.util.function.Function<UpdateAliasesRequest.Builder,ObjectBuilder<UpdateAliasesRequest>> fn)Updates index aliases.UpdateAliasesResponseupdateAliases(UpdateAliasesRequest request)Updates index aliases.UpgradeResponseupgrade(java.util.function.Function<UpgradeRequest.Builder,ObjectBuilder<UpgradeRequest>> fn)DEPRECATED Upgrades to the current version of Lucene.UpgradeResponseupgrade(UpgradeRequest request)DEPRECATED Upgrades to the current version of Lucene.ValidateQueryResponsevalidateQuery(java.util.function.Function<ValidateQueryRequest.Builder,ObjectBuilder<ValidateQueryRequest>> fn)Allows a user to validate a potentially expensive query without executing it.ValidateQueryResponsevalidateQuery(ValidateQueryRequest request)Allows a user to validate a potentially expensive query without executing it.IndicesClientwithRequestOptions(java.util.function.Function<org.opensearch.client.RequestOptions.Builder,org.opensearch.client.RequestOptions.Builder> fn)Creates a newIndicesClient(org.opensearch.client.base.Transport, org.opensearch.client.RequestOptions)with specific request options, inheriting existing options.IndicesClientwithRequestOptions(org.opensearch.client.RequestOptions options)Creates a newIndicesClient(org.opensearch.client.base.Transport, org.opensearch.client.RequestOptions)with specific request options.
-
Constructor Details
-
Method Details
-
addBlock
Adds a block to an index.- Throws:
java.io.IOException
-
addBlock
public final AddBlockResponse addBlock(java.util.function.Function<AddBlockRequest.Builder,ObjectBuilder<AddBlockRequest>> fn) throws java.io.IOExceptionAdds a block to an index.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
analyze
Performs the analysis process on a text and return the tokens breakdown of the text.- Throws:
java.io.IOException
-
analyze
public final AnalyzeResponse analyze(java.util.function.Function<AnalyzeRequest.Builder,ObjectBuilder<AnalyzeRequest>> fn) throws java.io.IOExceptionPerforms the analysis process on a text and return the tokens breakdown of the text.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
clearCache
Clears all or specific caches for one or more indices.- Throws:
java.io.IOException
-
clearCache
public final ClearCacheResponse clearCache(java.util.function.Function<ClearCacheRequest.Builder,ObjectBuilder<ClearCacheRequest>> fn) throws java.io.IOExceptionClears all or specific caches for one or more indices.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
clone
Clones an index- Throws:
java.io.IOException
-
clone
public final CloneResponse clone(java.util.function.Function<CloneRequest.Builder,ObjectBuilder<CloneRequest>> fn) throws java.io.IOExceptionClones an index- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
close
Closes an index.- Throws:
java.io.IOException
-
close
public final CloseResponse close(java.util.function.Function<CloseRequest.Builder,ObjectBuilder<CloseRequest>> fn) throws java.io.IOExceptionCloses an index.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
create
Creates an index with optional settings and mappings.- Throws:
java.io.IOException
-
create
public final CreateResponse create(java.util.function.Function<CreateRequest.Builder,ObjectBuilder<CreateRequest>> fn) throws java.io.IOExceptionCreates an index with optional settings and mappings.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
delete
Deletes an index.- Throws:
java.io.IOException
-
delete
public final DeleteResponse delete(java.util.function.Function<DeleteRequest.Builder,ObjectBuilder<DeleteRequest>> fn) throws java.io.IOExceptionDeletes an index.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
deleteAlias
Deletes an alias.- Throws:
java.io.IOException
-
deleteAlias
public final DeleteAliasResponse deleteAlias(java.util.function.Function<DeleteAliasRequest.Builder,ObjectBuilder<DeleteAliasRequest>> fn) throws java.io.IOExceptionDeletes an alias.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
deleteIndexTemplate
public DeleteIndexTemplateResponse deleteIndexTemplate(DeleteIndexTemplateRequest request) throws java.io.IOExceptionDeletes an index template.- Throws:
java.io.IOException
-
deleteIndexTemplate
public final DeleteIndexTemplateResponse deleteIndexTemplate(java.util.function.Function<DeleteIndexTemplateRequest.Builder,ObjectBuilder<DeleteIndexTemplateRequest>> fn) throws java.io.IOExceptionDeletes an index template.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
deleteTemplate
public DeleteTemplateResponse deleteTemplate(DeleteTemplateRequest request) throws java.io.IOExceptionDeletes an index template.- Throws:
java.io.IOException
-
deleteTemplate
public final DeleteTemplateResponse deleteTemplate(java.util.function.Function<DeleteTemplateRequest.Builder,ObjectBuilder<DeleteTemplateRequest>> fn) throws java.io.IOExceptionDeletes an index template.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
exists
Returns information about whether a particular index exists.- Throws:
java.io.IOException
-
exists
public final BooleanResponse exists(java.util.function.Function<ExistsRequest.Builder,ObjectBuilder<ExistsRequest>> fn) throws java.io.IOExceptionReturns information about whether a particular index exists.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
existsAlias
Returns information about whether a particular alias exists.- Throws:
java.io.IOException
-
existsAlias
public final BooleanResponse existsAlias(java.util.function.Function<ExistsAliasRequest.Builder,ObjectBuilder<ExistsAliasRequest>> fn) throws java.io.IOExceptionReturns information about whether a particular alias exists.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
existsIndexTemplate
public BooleanResponse existsIndexTemplate(ExistsIndexTemplateRequest request) throws java.io.IOExceptionReturns information about whether a particular index template exists.- Throws:
java.io.IOException
-
existsIndexTemplate
public final BooleanResponse existsIndexTemplate(java.util.function.Function<ExistsIndexTemplateRequest.Builder,ObjectBuilder<ExistsIndexTemplateRequest>> fn) throws java.io.IOExceptionReturns information about whether a particular index template exists.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
existsTemplate
Returns information about whether a particular index template exists.- Throws:
java.io.IOException
-
existsTemplate
public final BooleanResponse existsTemplate(java.util.function.Function<ExistsTemplateRequest.Builder,ObjectBuilder<ExistsTemplateRequest>> fn) throws java.io.IOExceptionReturns information about whether a particular index template exists.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
existsType
Returns information about whether a particular document type exists. (DEPRECATED)- Throws:
java.io.IOException
-
existsType
public final BooleanResponse existsType(java.util.function.Function<ExistsTypeRequest.Builder,ObjectBuilder<ExistsTypeRequest>> fn) throws java.io.IOExceptionReturns information about whether a particular document type exists. (DEPRECATED)- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
flush
Performs the flush operation on one or more indices.- Throws:
java.io.IOException
-
flush
public final FlushResponse flush(java.util.function.Function<FlushRequest.Builder,ObjectBuilder<FlushRequest>> fn) throws java.io.IOExceptionPerforms the flush operation on one or more indices.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
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:
java.io.IOException
-
flushSynced
public final FlushSyncedResponse flushSynced(java.util.function.Function<FlushSyncedRequest.Builder,ObjectBuilder<FlushSyncedRequest>> fn) throws java.io.IOExceptionPerforms 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 freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
forcemerge
Performs the force merge operation on one or more indices.- Throws:
java.io.IOException
-
forcemerge
public final ForcemergeResponse forcemerge(java.util.function.Function<ForcemergeRequest.Builder,ObjectBuilder<ForcemergeRequest>> fn) throws java.io.IOExceptionPerforms the force merge operation on one or more indices.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
get
Returns information about one or more indices.- Throws:
java.io.IOException
-
get
public final GetResponse get(java.util.function.Function<GetRequest.Builder,ObjectBuilder<GetRequest>> fn) throws java.io.IOExceptionReturns information about one or more indices.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
getAlias
Returns an alias.- Throws:
java.io.IOException
-
getAlias
public final GetAliasResponse getAlias(java.util.function.Function<GetAliasRequest.Builder,ObjectBuilder<GetAliasRequest>> fn) throws java.io.IOExceptionReturns an alias.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
getFieldMapping
public GetFieldMappingResponse getFieldMapping(GetFieldMappingRequest request) throws java.io.IOExceptionReturns mapping for one or more fields.- Throws:
java.io.IOException
-
getFieldMapping
public final GetFieldMappingResponse getFieldMapping(java.util.function.Function<GetFieldMappingRequest.Builder,ObjectBuilder<GetFieldMappingRequest>> fn) throws java.io.IOExceptionReturns mapping for one or more fields.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
getIndexTemplate
public GetIndexTemplateResponse getIndexTemplate(GetIndexTemplateRequest request) throws java.io.IOExceptionReturns an index template.- Throws:
java.io.IOException
-
getIndexTemplate
public final GetIndexTemplateResponse getIndexTemplate(java.util.function.Function<GetIndexTemplateRequest.Builder,ObjectBuilder<GetIndexTemplateRequest>> fn) throws java.io.IOExceptionReturns an index template.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
getMapping
Returns mappings for one or more indices.- Throws:
java.io.IOException
-
getMapping
public final GetMappingResponse getMapping(java.util.function.Function<GetMappingRequest.Builder,ObjectBuilder<GetMappingRequest>> fn) throws java.io.IOExceptionReturns mappings for one or more indices.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
getSettings
Returns settings for one or more indices.- Throws:
java.io.IOException
-
getSettings
public final GetSettingsResponse getSettings(java.util.function.Function<GetSettingsRequest.Builder,ObjectBuilder<GetSettingsRequest>> fn) throws java.io.IOExceptionReturns settings for one or more indices.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
getTemplate
Returns an index template.- Throws:
java.io.IOException
-
getTemplate
public final GetTemplateResponse getTemplate(java.util.function.Function<GetTemplateRequest.Builder,ObjectBuilder<GetTemplateRequest>> fn) throws java.io.IOExceptionReturns an index template.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
getUpgrade
DEPRECATED Returns a progress status of current upgrade.- Throws:
java.io.IOException
-
getUpgrade
public final GetUpgradeResponse getUpgrade(java.util.function.Function<GetUpgradeRequest.Builder,ObjectBuilder<GetUpgradeRequest>> fn) throws java.io.IOExceptionDEPRECATED Returns a progress status of current upgrade.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
open
Opens an index.- Throws:
java.io.IOException
-
open
public final OpenResponse open(java.util.function.Function<OpenRequest.Builder,ObjectBuilder<OpenRequest>> fn) throws java.io.IOExceptionOpens an index.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
putAlias
Creates or updates an alias.- Throws:
java.io.IOException
-
putAlias
public final PutAliasResponse putAlias(java.util.function.Function<PutAliasRequest.Builder,ObjectBuilder<PutAliasRequest>> fn) throws java.io.IOExceptionCreates or updates an alias.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
putIndexTemplate
public PutIndexTemplateResponse putIndexTemplate(PutIndexTemplateRequest request) throws java.io.IOExceptionCreates or updates an index template.- Throws:
java.io.IOException
-
putIndexTemplate
public final PutIndexTemplateResponse putIndexTemplate(java.util.function.Function<PutIndexTemplateRequest.Builder,ObjectBuilder<PutIndexTemplateRequest>> fn) throws java.io.IOExceptionCreates or updates an index template.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
putMapping
Updates the index mappings.- Throws:
java.io.IOException
-
putMapping
public final PutMappingResponse putMapping(java.util.function.Function<PutMappingRequest.Builder,ObjectBuilder<PutMappingRequest>> fn) throws java.io.IOExceptionUpdates the index mappings.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
putSettings
Updates the index settings.- Throws:
java.io.IOException
-
putSettings
public final PutSettingsResponse putSettings(java.util.function.Function<PutSettingsRequest.Builder,ObjectBuilder<PutSettingsRequest>> fn) throws java.io.IOExceptionUpdates the index settings.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
putTemplate
Creates or updates an index template.- Throws:
java.io.IOException
-
putTemplate
public final PutTemplateResponse putTemplate(java.util.function.Function<PutTemplateRequest.Builder,ObjectBuilder<PutTemplateRequest>> fn) throws java.io.IOExceptionCreates or updates an index template.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
recovery
Returns information about ongoing index shard recoveries.- Throws:
java.io.IOException
-
recovery
public final RecoveryResponse recovery(java.util.function.Function<RecoveryRequest.Builder,ObjectBuilder<RecoveryRequest>> fn) throws java.io.IOExceptionReturns information about ongoing index shard recoveries.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
refresh
Performs the refresh operation in one or more indices.- Throws:
java.io.IOException
-
refresh
public final RefreshResponse refresh(java.util.function.Function<RefreshRequest.Builder,ObjectBuilder<RefreshRequest>> fn) throws java.io.IOExceptionPerforms the refresh operation in one or more indices.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
resolveIndex
Returns information about any matching indices, aliases, and data streams- Throws:
java.io.IOException
-
resolveIndex
public final ResolveIndexResponse resolveIndex(java.util.function.Function<ResolveIndexRequest.Builder,ObjectBuilder<ResolveIndexRequest>> fn) throws java.io.IOExceptionReturns information about any matching indices, aliases, and data streams- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
rollover
Updates an alias to point to a new index when the existing index is considered to be too large or too old.- Throws:
java.io.IOException
-
rollover
public final RolloverResponse rollover(java.util.function.Function<RolloverRequest.Builder,ObjectBuilder<RolloverRequest>> fn) throws java.io.IOExceptionUpdates 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 freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
segments
Provides low-level information about segments in a Lucene index.- Throws:
java.io.IOException
-
segments
public final SegmentsResponse segments(java.util.function.Function<SegmentsRequest.Builder,ObjectBuilder<SegmentsRequest>> fn) throws java.io.IOExceptionProvides low-level information about segments in a Lucene index.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
shardStores
Provides store information for shard copies of indices.- Throws:
java.io.IOException
-
shardStores
public final ShardStoresResponse shardStores(java.util.function.Function<ShardStoresRequest.Builder,ObjectBuilder<ShardStoresRequest>> fn) throws java.io.IOExceptionProvides store information for shard copies of indices.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
shrink
Allow to shrink an existing index into a new index with fewer primary shards.- Throws:
java.io.IOException
-
shrink
public final ShrinkResponse shrink(java.util.function.Function<ShrinkRequest.Builder,ObjectBuilder<ShrinkRequest>> fn) throws java.io.IOExceptionAllow to shrink an existing index into a new index with fewer primary shards.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
simulateIndexTemplate
public SimulateIndexTemplateResponse simulateIndexTemplate(SimulateIndexTemplateRequest request) throws java.io.IOExceptionSimulate matching the given index name against the index templates in the system- Throws:
java.io.IOException
-
simulateIndexTemplate
public final SimulateIndexTemplateResponse simulateIndexTemplate(java.util.function.Function<SimulateIndexTemplateRequest.Builder,ObjectBuilder<SimulateIndexTemplateRequest>> fn) throws java.io.IOExceptionSimulate matching the given index name against the index templates in the system- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
simulateTemplate
public SimulateTemplateResponse simulateTemplate(SimulateTemplateRequest request) throws java.io.IOExceptionSimulate resolving the given template name or body- Throws:
java.io.IOException
-
simulateTemplate
public final SimulateTemplateResponse simulateTemplate(java.util.function.Function<SimulateTemplateRequest.Builder,ObjectBuilder<SimulateTemplateRequest>> fn) throws java.io.IOExceptionSimulate resolving the given template name or body- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
split
Allows you to split an existing index into a new index with more primary shards.- Throws:
java.io.IOException
-
split
public final SplitResponse split(java.util.function.Function<SplitRequest.Builder,ObjectBuilder<SplitRequest>> fn) throws java.io.IOExceptionAllows you to split an existing index into a new index with more primary shards.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
stats
Provides statistics on operations happening in an index.- Throws:
java.io.IOException
-
stats
public final StatsResponse stats(java.util.function.Function<StatsRequest.Builder,ObjectBuilder<StatsRequest>> fn) throws java.io.IOExceptionProvides statistics on operations happening in an index.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
updateAliases
public UpdateAliasesResponse updateAliases(UpdateAliasesRequest request) throws java.io.IOExceptionUpdates index aliases.- Throws:
java.io.IOException
-
updateAliases
public final UpdateAliasesResponse updateAliases(java.util.function.Function<UpdateAliasesRequest.Builder,ObjectBuilder<UpdateAliasesRequest>> fn) throws java.io.IOExceptionUpdates index aliases.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
upgrade
DEPRECATED Upgrades to the current version of Lucene.- Throws:
java.io.IOException
-
upgrade
public final UpgradeResponse upgrade(java.util.function.Function<UpgradeRequest.Builder,ObjectBuilder<UpgradeRequest>> fn) throws java.io.IOExceptionDEPRECATED Upgrades to the current version of Lucene.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
validateQuery
public ValidateQueryResponse validateQuery(ValidateQueryRequest request) throws java.io.IOExceptionAllows a user to validate a potentially expensive query without executing it.- Throws:
java.io.IOException
-
validateQuery
public final ValidateQueryResponse validateQuery(java.util.function.Function<ValidateQueryRequest.Builder,ObjectBuilder<ValidateQueryRequest>> fn) throws java.io.IOExceptionAllows a user to validate a potentially expensive query without executing it.- Parameters:
fn- a function that initializes a freshly created builder. This function can either return its builder argument after having set its properties or return another builder.- Throws:
java.io.IOException
-
withRequestOptions
Creates a newIndicesClient(org.opensearch.client.base.Transport, org.opensearch.client.RequestOptions)with specific request options.- Specified by:
withRequestOptionsin classApiClient<IndicesClient>
-
withRequestOptions
public IndicesClient withRequestOptions(java.util.function.Function<org.opensearch.client.RequestOptions.Builder,org.opensearch.client.RequestOptions.Builder> fn)Creates a newIndicesClient(org.opensearch.client.base.Transport, org.opensearch.client.RequestOptions)with specific request options, inheriting existing options.- Parameters:
fn- a function taking an options builder initialized with the current request options, or initialized with default values.
-