Class IndicesAliasesRequest.AliasActions
- java.lang.Object
-
- org.elasticsearch.action.admin.indices.alias.IndicesAliasesRequest.AliasActions
-
- All Implemented Interfaces:
AliasesRequest,IndicesRequest,IndicesRequest.Replaceable,Writeable,ToXContent,ToXContentObject
- Enclosing class:
- IndicesAliasesRequest
public static class IndicesAliasesRequest.AliasActions extends Object implements AliasesRequest, Writeable, ToXContentObject
Request to take one or more actions on one or more indexes and alias combinations.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classIndicesAliasesRequest.AliasActions.Type-
Nested classes/interfaces inherited from interface org.elasticsearch.action.IndicesRequest
IndicesRequest.Replaceable
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
-
Field Summary
Fields Modifier and Type Field Description static ConstructingObjectParser<IndicesAliasesRequest.AliasActions,Void>PARSERParser for any oneAliasAction.-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
Constructor Summary
Constructors Constructor Description AliasActions(IndicesAliasesRequest.AliasActions.Type type)AliasActions(StreamInput in)Read from a stream.
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject
isFragment
-
-
-
-
Field Detail
-
PARSER
public static final ConstructingObjectParser<IndicesAliasesRequest.AliasActions,Void> PARSER
Parser for any oneAliasAction.
-
-
Constructor Detail
-
AliasActions
public AliasActions(IndicesAliasesRequest.AliasActions.Type type)
-
AliasActions
public AliasActions(StreamInput in) throws IOException
Read from a stream.- Throws:
IOException
-
-
Method Detail
-
add
public static IndicesAliasesRequest.AliasActions add()
Build a newAliasActionto add aliases.
-
remove
public static IndicesAliasesRequest.AliasActions remove()
Build a newAliasActionto remove aliases.
-
removeIndex
public static IndicesAliasesRequest.AliasActions removeIndex()
Build a newAliasActionto remove an index.
-
writeTo
public void writeTo(StreamOutput out) throws IOException
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
actionType
public IndicesAliasesRequest.AliasActions.Type actionType()
Type of the action to perform.
-
indices
public IndicesAliasesRequest.AliasActions indices(String... indices)
Description copied from interface:IndicesRequest.ReplaceableSets the indices that the action relates to.- Specified by:
indicesin interfaceIndicesRequest.Replaceable
-
index
public IndicesAliasesRequest.AliasActions index(String index)
Set the index this action is operating on.
-
aliases
public IndicesAliasesRequest.AliasActions aliases(String... aliases)
Aliases to use with this action.
-
alias
public IndicesAliasesRequest.AliasActions alias(String alias)
Set the alias this action is operating on.
-
routing
public IndicesAliasesRequest.AliasActions routing(String routing)
Set the default routing.
-
searchRouting
public String searchRouting()
-
searchRouting
public IndicesAliasesRequest.AliasActions searchRouting(String searchRouting)
-
indexRouting
public String indexRouting()
-
indexRouting
public IndicesAliasesRequest.AliasActions indexRouting(String indexRouting)
-
filter
public String filter()
-
filter
public IndicesAliasesRequest.AliasActions filter(String filter)
-
filter
public IndicesAliasesRequest.AliasActions filter(Map<String,Object> filter)
-
filter
public IndicesAliasesRequest.AliasActions filter(QueryBuilder filter)
-
writeIndex
public IndicesAliasesRequest.AliasActions writeIndex(Boolean writeIndex)
-
writeIndex
public Boolean writeIndex()
-
aliases
public String[] aliases()
Description copied from interface:AliasesRequestReturns the array of aliases that the action relates to- Specified by:
aliasesin interfaceAliasesRequest
-
replaceAliases
public void replaceAliases(String... aliases)
Description copied from interface:AliasesRequestReplaces current aliases with the provided aliases. Sometimes aliases expressions need to be resolved to concrete aliases prior to executing the transport action.- Specified by:
replaceAliasesin interfaceAliasesRequest
-
getOriginalAliases
public String[] getOriginalAliases()
Description copied from interface:AliasesRequestReturns the aliases as they were originally requested, before any potential name resolution- Specified by:
getOriginalAliasesin interfaceAliasesRequest
-
expandAliasesWildcards
public boolean expandAliasesWildcards()
Description copied from interface:AliasesRequestReturns true if wildcards expressions among aliases should be resolved, false otherwise- Specified by:
expandAliasesWildcardsin interfaceAliasesRequest
-
indices
public String[] indices()
Description copied from interface:IndicesRequestReturns the array of indices that the action relates to- Specified by:
indicesin interfaceIndicesRequest
-
indicesOptions
public IndicesOptions indicesOptions()
Description copied from interface:IndicesRequestReturns the indices options used to resolve indices. They tell for instance whether a single index is accepted, whether an empty array will be converted to _all, and how wildcards will be expanded if needed.- Specified by:
indicesOptionsin interfaceIndicesRequest
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
- Specified by:
toXContentin interfaceToXContent- Throws:
IOException
-
fromXContent
public static IndicesAliasesRequest.AliasActions fromXContent(XContentParser parser) throws IOException
- Throws:
IOException
-
-