Package org.elasticsearch.client
Interface IndicesAdminClient
- All Superinterfaces:
ElasticsearchClient
Administrative actions/operations against indices.
- See Also:
AdminClient.indices()
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addBlock(AddIndexBlockRequest request, ActionListener<AddIndexBlockResponse> listener)
Adds a block to an indexaliases(IndicesAliasesRequest request)
Allows to add/remove aliases from indices.void
aliases(IndicesAliasesRequest request, ActionListener<AcknowledgedResponse> listener)
Allows to add/remove aliases from indices.aliasesExist(GetAliasesRequest request)
Check to existence of index aliases.void
aliasesExist(GetAliasesRequest request, ActionListener<AliasesExistResponse> listener)
Check the existence of specified index aliases.analyze(AnalyzeAction.Request request)
Analyze text under the provided index.void
analyze(AnalyzeAction.Request request, ActionListener<AnalyzeAction.Response> listener)
Analyze text under the provided index.clearCache(ClearIndicesCacheRequest request)
Clear indices cache.void
clearCache(ClearIndicesCacheRequest request, ActionListener<ClearIndicesCacheResponse> listener)
Clear indices cache.close(CloseIndexRequest request)
Closes an index based on the index name.void
close(CloseIndexRequest request, ActionListener<CloseIndexResponse> listener)
Closes an index based on the index name.create(CreateIndexRequest request)
Creates an index using an explicit request allowing to specify the settings of the index.void
create(CreateIndexRequest request, ActionListener<CreateIndexResponse> listener)
Creates an index using an explicit request allowing to specify the settings of the index.delete(DeleteIndexRequest request)
Deletes an index based on the index name.void
delete(DeleteIndexRequest request, ActionListener<AcknowledgedResponse> listener)
Deletes an index based on the index name.deleteTemplate(DeleteIndexTemplateRequest request)
Deletes index template.void
deleteTemplate(DeleteIndexTemplateRequest request, ActionListener<AcknowledgedResponse> listener)
Deletes an index template.exists(IndicesExistsRequest request)
Indices Exists.void
exists(IndicesExistsRequest request, ActionListener<IndicesExistsResponse> listener)
The status of one or more indices.flush(FlushRequest request)
Explicitly flush one or more indices (releasing memory from the node).void
flush(FlushRequest request, ActionListener<FlushResponse> listener)
Explicitly flush one or more indices (releasing memory from the node).forceMerge(ForceMergeRequest request)
Explicitly force merge one or more indices into a the number of segments.void
forceMerge(ForceMergeRequest request, ActionListener<ForceMergeResponse> listener)
Explicitly force merge one or more indices into a the number of segments.getAliases(GetAliasesRequest request)
Get specific index aliases that exists in particular indices and / or by name.void
getAliases(GetAliasesRequest request, ActionListener<GetAliasesResponse> listener)
Get specific index aliases that exists in particular indices and / or by name.getFieldMappings(GetFieldMappingsRequest request)
Get the mappings of specific fieldsvoid
getFieldMappings(GetFieldMappingsRequest request, ActionListener<GetFieldMappingsResponse> listener)
Get the mappings of specific fieldsgetIndex(GetIndexRequest request)
Get index metadata for particular indices.void
getIndex(GetIndexRequest request, ActionListener<GetIndexResponse> listener)
Get index metadata for particular indices.getMappings(GetMappingsRequest request)
Get the complete mappings of one or more typesvoid
getMappings(GetMappingsRequest request, ActionListener<GetMappingsResponse> listener)
Get the complete mappings of one or more typesgetSettings(GetSettingsRequest request)
Executed a per index settings get request.void
getSettings(GetSettingsRequest request, ActionListener<GetSettingsResponse> listener)
Executed a per index settings get request and returns the settings for the indices specified.getTemplates(GetIndexTemplatesRequest request)
Gets index template.void
getTemplates(GetIndexTemplatesRequest request, ActionListener<GetIndexTemplatesResponse> listener)
Gets an index template.open(OpenIndexRequest request)
Open an index based on the index name.void
open(OpenIndexRequest request, ActionListener<OpenIndexResponse> listener)
Open an index based on the index name.prepareAddBlock(IndexMetadata.APIBlock block, String... indices)
Adds a block to an indexAllows to add/remove aliases from indices.prepareAliasesExist(String... aliases)
Allows to check to existence of aliases from indices.Analyze text/texts.prepareAnalyze(String text)
Analyze text.prepareAnalyze(String index, String text)
Analyze text under the provided index.prepareClearCache(String... indices)
Clear indices cache.prepareClose(String... indices)
Closes one or more indices based on their index name.prepareCreate(String index)
Creates an index using an explicit request allowing to specify the settings of the index.prepareDelete(String... indices)
Deletes an index based on the index name.prepareDeleteTemplate(String name)
Deletes an index template.prepareExists(String... indices)
Indices exists.prepareFlush(String... indices)
Explicitly flush one or more indices (releasing memory from the node).prepareForceMerge(String... indices)
Explicitly force merge one or more indices into a the number of segments.prepareGetAliases(String... aliases)
Get specific index aliases that exists in particular indices and / or by name.prepareGetFieldMappings(String... indices)
Get the mappings of specific fieldsGet index metadata for particular indices.prepareGetMappings(String... indices)
Get the complete mappings of one or more typesprepareGetSettings(String... indices)
Returns a builder for a per index settings get request.prepareGetTemplates(String... name)
Gets an index template (optional).prepareOpen(String... indices)
Opens one or more indices based on their index name.preparePutMapping(String... indices)
Add mapping definition for a type into one or more indices.preparePutTemplate(String name)
Puts an index template.prepareRecoveries(String... indices)
Indices recoveriesprepareRefresh(String... indices)
Explicitly refresh one or more indices (making the content indexed since the last refresh searchable).prepareResizeIndex(String sourceIndex, String targetIndex)
Resize an index using an explicit request allowing to specify the settings, mappings and aliases of the target index of the index.prepareRolloverIndex(String sourceAlias)
Swaps the index pointed to by an alias given all provided conditions are satisfiedprepareSegments(String... indices)
The segments of one or more indices.prepareShardStores(String... indices)
The shard stores info of one or more indices.prepareStats(String... indices)
Indices stats.prepareSyncedFlush(String... indices)
Explicitly sync flush one or more indices (write sync id to shards for faster recovery).prepareTypesExists(String... index)
Deprecated.Types are deprecated and are in the process of being removed.prepareUpdateSettings(String... indices)
Update indices settings.prepareUpgrade(String... indices)
Check upgrade status of one or more indicesprepareUpgradeStatus(String... indices)
Explicitly upgrade one or more indicesprepareValidateQuery(String... indices)
Validate a query for correctness.putMapping(PutMappingRequest request)
Add mapping definition for a type into one or more indices.void
putMapping(PutMappingRequest request, ActionListener<AcknowledgedResponse> listener)
Add mapping definition for a type into one or more indices.putTemplate(PutIndexTemplateRequest request)
Puts an index template.void
putTemplate(PutIndexTemplateRequest request, ActionListener<AcknowledgedResponse> listener)
Puts an index template.recoveries(RecoveryRequest request)
Indices recoveriesvoid
recoveries(RecoveryRequest request, ActionListener<RecoveryResponse> listener)
Indices recoveriesrefresh(RefreshRequest request)
Explicitly refresh one or more indices (making the content indexed since the last refresh searchable).void
refresh(RefreshRequest request, ActionListener<RefreshResponse> listener)
Explicitly refresh one or more indices (making the content indexed since the last refresh searchable).resizeIndex(ResizeRequest request)
Resize an index using an explicit request allowing to specify the settings, mappings and aliases of the target index of the index.void
resizeIndex(ResizeRequest request, ActionListener<ResizeResponse> listener)
Shrinks an index using an explicit request allowing to specify the settings, mappings and aliases of the target index of the index.resolveIndex(ResolveIndexAction.Request request)
Resolves names and wildcard expressions to indices, aliases, and data streamsvoid
resolveIndex(ResolveIndexAction.Request request, ActionListener<ResolveIndexAction.Response> listener)
Resolves names and wildcard expressions to indices, aliases, and data streamsrolloverIndex(RolloverRequest request)
Swaps the index pointed to by an alias given all provided conditions are satisfiedvoid
rolloverIndex(RolloverRequest request, ActionListener<RolloverResponse> listener)
Swaps the index pointed to by an alias given all provided conditions are satisfiedsegments(IndicesSegmentsRequest request)
The segments of one or more indices.void
segments(IndicesSegmentsRequest request, ActionListener<IndicesSegmentResponse> listener)
The segments of one or more indices.shardStores(IndicesShardStoresRequest request)
The shard stores info of one or more indices.void
shardStores(IndicesShardStoresRequest request, ActionListener<IndicesShardStoresResponse> listener)
The shard stores info of one or more indices.stats(IndicesStatsRequest request)
Indices stats.void
stats(IndicesStatsRequest request, ActionListener<IndicesStatsResponse> listener)
Indices stats.syncedFlush(SyncedFlushRequest request)
Explicitly sync flush one or more indices (write sync id to shards for faster recovery).void
syncedFlush(SyncedFlushRequest request, ActionListener<SyncedFlushResponse> listener)
Explicitly sync flush one or more indices (write sync id to shards for faster recovery).typesExists(TypesExistsRequest request)
Deprecated.Types are deprecated and are in the process of being removed.void
typesExists(TypesExistsRequest request, ActionListener<TypesExistsResponse> listener)
Deprecated.Types are deprecated and are in the process of being removed.updateSettings(UpdateSettingsRequest request)
Updates settings of one or more indices.void
updateSettings(UpdateSettingsRequest request, ActionListener<AcknowledgedResponse> listener)
Updates settings of one or more indices.upgrade(UpgradeRequest request)
Explicitly upgrade one or more indicesvoid
upgrade(UpgradeRequest request, ActionListener<UpgradeResponse> listener)
Explicitly upgrade one or more indicesupgradeStatus(UpgradeStatusRequest request)
Check upgrade status of one or more indicesvoid
upgradeStatus(UpgradeStatusRequest request, ActionListener<UpgradeStatusResponse> listener)
Check upgrade status of one or more indicesvalidateQuery(ValidateQueryRequest request)
Validate a query for correctness.void
validateQuery(ValidateQueryRequest request, ActionListener<ValidateQueryResponse> listener)
Validate a query for correctness.Methods inherited from interface org.elasticsearch.client.ElasticsearchClient
execute, execute, threadPool
-
Method Details
-
exists
Indices Exists.- Parameters:
request
- The indices exists request- Returns:
- The result future
- See Also:
Requests.indicesExistsRequest(String...)
-
exists
The status of one or more indices.- Parameters:
request
- The indices status requestlistener
- A listener to be notified with a result- See Also:
Requests.indicesExistsRequest(String...)
-
prepareExists
Indices exists. -
typesExists
Deprecated.Types are deprecated and are in the process of being removed.Types exists.- Parameters:
request
- The types exists request- Returns:
- The result future
-
typesExists
@Deprecated void typesExists(TypesExistsRequest request, ActionListener<TypesExistsResponse> listener)Deprecated.Types are deprecated and are in the process of being removed.Types exists.- Parameters:
request
- The types existslistener
- A listener to be notified with a result
-
prepareTypesExists
Deprecated.Types are deprecated and are in the process of being removed.Types exists. -
stats
Indices stats. -
stats
Indices stats. -
prepareStats
Indices stats. -
recoveries
Indices recoveries -
recoveries
Indices recoveries -
prepareRecoveries
Indices recoveries -
segments
The segments of one or more indices.- Parameters:
request
- The indices segments request- Returns:
- The result future
- See Also:
Requests.indicesSegmentsRequest(String...)
-
segments
The segments of one or more indices.- Parameters:
request
- The indices segments requestlistener
- A listener to be notified with a result- See Also:
Requests.indicesSegmentsRequest(String...)
-
prepareSegments
The segments of one or more indices. -
shardStores
The shard stores info of one or more indices.- Parameters:
request
- The indices shard stores request- Returns:
- The result future
- See Also:
Requests.indicesShardStoresRequest(String...)
-
shardStores
void shardStores(IndicesShardStoresRequest request, ActionListener<IndicesShardStoresResponse> listener)The shard stores info of one or more indices.- Parameters:
request
- The indices shard stores requestlistener
- A listener to be notified with a result- See Also:
Requests.indicesShardStoresRequest(String...)
-
prepareShardStores
The shard stores info of one or more indices. -
create
Creates an index using an explicit request allowing to specify the settings of the index.- Parameters:
request
- The create index request- Returns:
- The result future
- See Also:
Requests.createIndexRequest(String)
-
create
Creates an index using an explicit request allowing to specify the settings of the index.- Parameters:
request
- The create index requestlistener
- A listener to be notified with a result- See Also:
Requests.createIndexRequest(String)
-
prepareCreate
Creates an index using an explicit request allowing to specify the settings of the index.- Parameters:
index
- The index name to create
-
delete
Deletes an index based on the index name.- Parameters:
request
- The delete index request- Returns:
- The result future
- See Also:
Requests.deleteIndexRequest(String)
-
delete
Deletes an index based on the index name.- Parameters:
request
- The delete index requestlistener
- A listener to be notified with a result- See Also:
Requests.deleteIndexRequest(String)
-
prepareDelete
Deletes an index based on the index name.- Parameters:
indices
- The indices to delete. Use "_all" to delete all indices.
-
close
Closes an index based on the index name.- Parameters:
request
- The close index request- Returns:
- The result future
- See Also:
Requests.closeIndexRequest(String)
-
close
Closes an index based on the index name.- Parameters:
request
- The close index requestlistener
- A listener to be notified with a result- See Also:
Requests.closeIndexRequest(String)
-
prepareClose
Closes one or more indices based on their index name.- Parameters:
indices
- The name of the indices to close
-
open
Open an index based on the index name.- Parameters:
request
- The close index request- Returns:
- The result future
- See Also:
Requests.openIndexRequest(String)
-
open
Open an index based on the index name.- Parameters:
request
- The close index requestlistener
- A listener to be notified with a result- See Also:
Requests.openIndexRequest(String)
-
prepareAddBlock
Adds a block to an index- Parameters:
block
- The block to addindices
- The name of the indices to add the block to
-
addBlock
Adds a block to an index- Parameters:
request
- The add index block requestlistener
- A listener to be notified with a result- See Also:
Requests.openIndexRequest(String)
-
prepareOpen
Opens one or more indices based on their index name.- Parameters:
indices
- The name of the indices to close
-
refresh
Explicitly refresh one or more indices (making the content indexed since the last refresh searchable).- Parameters:
request
- The refresh request- Returns:
- The result future
- See Also:
Requests.refreshRequest(String...)
-
refresh
Explicitly refresh one or more indices (making the content indexed since the last refresh searchable).- Parameters:
request
- The refresh requestlistener
- A listener to be notified with a result- See Also:
Requests.refreshRequest(String...)
-
prepareRefresh
Explicitly refresh one or more indices (making the content indexed since the last refresh searchable). -
flush
Explicitly flush one or more indices (releasing memory from the node).- Parameters:
request
- The flush request- Returns:
- A result future
- See Also:
Requests.flushRequest(String...)
-
flush
Explicitly flush one or more indices (releasing memory from the node).- Parameters:
request
- The flush requestlistener
- A listener to be notified with a result- See Also:
Requests.flushRequest(String...)
-
prepareFlush
Explicitly flush one or more indices (releasing memory from the node). -
syncedFlush
Explicitly sync flush one or more indices (write sync id to shards for faster recovery).- Parameters:
request
- The sync flush request- Returns:
- A result future
- See Also:
Requests.syncedFlushRequest(String...)
-
syncedFlush
Explicitly sync flush one or more indices (write sync id to shards for faster recovery).- Parameters:
request
- The sync flush requestlistener
- A listener to be notified with a result- See Also:
Requests.syncedFlushRequest(String...)
-
prepareSyncedFlush
Explicitly sync flush one or more indices (write sync id to shards for faster recovery). -
forceMerge
Explicitly force merge one or more indices into a the number of segments.- Parameters:
request
- The optimize request- Returns:
- A result future
- See Also:
Requests.forceMergeRequest(String...)
-
forceMerge
Explicitly force merge one or more indices into a the number of segments.- Parameters:
request
- The force merge requestlistener
- A listener to be notified with a result- See Also:
Requests.forceMergeRequest(String...)
-
prepareForceMerge
Explicitly force merge one or more indices into a the number of segments. -
upgrade
Explicitly upgrade one or more indices- Parameters:
request
- The upgrade request- Returns:
- A result future
- See Also:
Requests.upgradeRequest(String...)
-
upgrade
Explicitly upgrade one or more indices- Parameters:
request
- The upgrade requestlistener
- A listener to be notified with a result- See Also:
Requests.upgradeRequest(String...)
-
prepareUpgradeStatus
Explicitly upgrade one or more indices -
upgradeStatus
Check upgrade status of one or more indices- Parameters:
request
- The upgrade request- Returns:
- A result future
- See Also:
Requests.upgradeRequest(String...)
-
upgradeStatus
Check upgrade status of one or more indices- Parameters:
request
- The upgrade requestlistener
- A listener to be notified with a result- See Also:
Requests.upgradeRequest(String...)
-
prepareUpgrade
Check upgrade status of one or more indices -
getMappings
Get the complete mappings of one or more types -
getMappings
Get the complete mappings of one or more types -
prepareGetMappings
Get the complete mappings of one or more types -
getFieldMappings
void getFieldMappings(GetFieldMappingsRequest request, ActionListener<GetFieldMappingsResponse> listener)Get the mappings of specific fields -
prepareGetFieldMappings
Get the mappings of specific fields -
getFieldMappings
Get the mappings of specific fields -
putMapping
Add mapping definition for a type into one or more indices.- Parameters:
request
- The create mapping request- Returns:
- A result future
- See Also:
Requests.putMappingRequest(String...)
-
putMapping
Add mapping definition for a type into one or more indices.- Parameters:
request
- The create mapping requestlistener
- A listener to be notified with a result- See Also:
Requests.putMappingRequest(String...)
-
preparePutMapping
Add mapping definition for a type into one or more indices. -
aliases
Allows to add/remove aliases from indices.- Parameters:
request
- The index aliases request- Returns:
- The result future
- See Also:
Requests.indexAliasesRequest()
-
aliases
Allows to add/remove aliases from indices.- Parameters:
request
- The index aliases requestlistener
- A listener to be notified with a result- See Also:
Requests.indexAliasesRequest()
-
prepareAliases
IndicesAliasesRequestBuilder prepareAliases()Allows to add/remove aliases from indices. -
getAliases
Get specific index aliases that exists in particular indices and / or by name.- Parameters:
request
- The result future
-
getAliases
Get specific index aliases that exists in particular indices and / or by name.- Parameters:
request
- The index aliases requestlistener
- A listener to be notified with a result
-
prepareGetAliases
Get specific index aliases that exists in particular indices and / or by name. -
prepareAliasesExist
Allows to check to existence of aliases from indices. -
aliasesExist
Check to existence of index aliases.- Parameters:
request
- The result future
-
aliasesExist
Check the existence of specified index aliases.- Parameters:
request
- The index aliases requestlistener
- A listener to be notified with a result
-
getIndex
Get index metadata for particular indices.- Parameters:
request
- The result future
-
getIndex
Get index metadata for particular indices.- Parameters:
request
- The index aliases requestlistener
- A listener to be notified with a result
-
prepareGetIndex
GetIndexRequestBuilder prepareGetIndex()Get index metadata for particular indices. -
clearCache
Clear indices cache.- Parameters:
request
- The clear indices cache request- Returns:
- The result future
- See Also:
Requests.clearIndicesCacheRequest(String...)
-
clearCache
void clearCache(ClearIndicesCacheRequest request, ActionListener<ClearIndicesCacheResponse> listener)Clear indices cache.- Parameters:
request
- The clear indices cache requestlistener
- A listener to be notified with a result- See Also:
Requests.clearIndicesCacheRequest(String...)
-
prepareClearCache
Clear indices cache. -
updateSettings
Updates settings of one or more indices.- Parameters:
request
- the update settings request- Returns:
- The result future
-
updateSettings
Updates settings of one or more indices.- Parameters:
request
- the update settings requestlistener
- A listener to be notified with the response
-
prepareUpdateSettings
Update indices settings. -
analyze
Analyze text under the provided index. -
analyze
Analyze text under the provided index. -
prepareAnalyze
Analyze text under the provided index.- Parameters:
index
- The index nametext
- The text to analyze
-
prepareAnalyze
Analyze text.- Parameters:
text
- The text to analyze
-
prepareAnalyze
AnalyzeRequestBuilder prepareAnalyze()Analyze text/texts. -
putTemplate
Puts an index template. -
putTemplate
Puts an index template. -
preparePutTemplate
Puts an index template.- Parameters:
name
- The name of the template.
-
deleteTemplate
Deletes index template. -
deleteTemplate
void deleteTemplate(DeleteIndexTemplateRequest request, ActionListener<AcknowledgedResponse> listener)Deletes an index template. -
prepareDeleteTemplate
Deletes an index template.- Parameters:
name
- The name of the template.
-
getTemplates
Gets index template. -
getTemplates
void getTemplates(GetIndexTemplatesRequest request, ActionListener<GetIndexTemplatesResponse> listener)Gets an index template. -
prepareGetTemplates
Gets an index template (optional). -
validateQuery
Validate a query for correctness.- Parameters:
request
- The count request- Returns:
- The result future
-
validateQuery
Validate a query for correctness.- Parameters:
request
- The count requestlistener
- A listener to be notified of the result
-
prepareValidateQuery
Validate a query for correctness. -
getSettings
Executed a per index settings get request and returns the settings for the indices specified. Note: this is a per index request and will not include settings that are set on the cluster level. This request is not exhaustive, it will not return default values for setting. -
getSettings
Executed a per index settings get request. -
prepareGetSettings
Returns a builder for a per index settings get request.- Parameters:
indices
- the indices to fetch the setting for.- See Also:
getSettings(org.elasticsearch.action.admin.indices.settings.get.GetSettingsRequest)
-
prepareResizeIndex
Resize an index using an explicit request allowing to specify the settings, mappings and aliases of the target index of the index. -
resizeIndex
Resize an index using an explicit request allowing to specify the settings, mappings and aliases of the target index of the index. -
resizeIndex
Shrinks an index using an explicit request allowing to specify the settings, mappings and aliases of the target index of the index. -
prepareRolloverIndex
Swaps the index pointed to by an alias given all provided conditions are satisfied -
rolloverIndex
Swaps the index pointed to by an alias given all provided conditions are satisfied -
rolloverIndex
Swaps the index pointed to by an alias given all provided conditions are satisfied -
resolveIndex
void resolveIndex(ResolveIndexAction.Request request, ActionListener<ResolveIndexAction.Response> listener)Resolves names and wildcard expressions to indices, aliases, and data streams -
resolveIndex
Resolves names and wildcard expressions to indices, aliases, and data streams
-