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 java.lang.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 class
IndicesAliasesRequest.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,java.lang.Void>
PARSER
Parser for any oneAliasAction
. -
Constructor Summary
Constructors Constructor Description AliasActions(IndicesAliasesRequest.AliasActions.Type type)
AliasActions(StreamInput in)
Read from a stream. -
Method Summary
Modifier and Type Method Description IndicesAliasesRequest.AliasActions.Type
actionType()
Type of the action to perform.static IndicesAliasesRequest.AliasActions
add()
Build a newAliasAction
to add aliases.IndicesAliasesRequest.AliasActions
alias(java.lang.String alias)
Set the alias this action is operating on.java.lang.String[]
aliases()
Returns the array of aliases that the action relates toIndicesAliasesRequest.AliasActions
aliases(java.lang.String... aliases)
Aliases to use with this action.boolean
equals(java.lang.Object obj)
boolean
expandAliasesWildcards()
Returns true if wildcards expressions among aliases should be resolved, false otherwisejava.lang.String
filter()
IndicesAliasesRequest.AliasActions
filter(java.lang.String filter)
IndicesAliasesRequest.AliasActions
filter(java.util.Map<java.lang.String,java.lang.Object> filter)
IndicesAliasesRequest.AliasActions
filter(QueryBuilder filter)
static IndicesAliasesRequest.AliasActions
fromXContent(XContentParser parser)
java.lang.String[]
getOriginalAliases()
Returns the aliases as they were originally requested, before any potential name resolutionint
hashCode()
IndicesAliasesRequest.AliasActions
index(java.lang.String index)
Set the index this action is operating on.java.lang.String
indexRouting()
IndicesAliasesRequest.AliasActions
indexRouting(java.lang.String indexRouting)
java.lang.String[]
indices()
Returns the array of indices that the action relates toIndicesAliasesRequest.AliasActions
indices(java.lang.String... indices)
Sets the indices that the action relates to.IndicesOptions
indicesOptions()
Returns the indices options used to resolve indices.java.lang.Boolean
isHidden()
IndicesAliasesRequest.AliasActions
isHidden(java.lang.Boolean isHidden)
static IndicesAliasesRequest.AliasActions
remove()
Build a newAliasAction
to remove aliases.static IndicesAliasesRequest.AliasActions
removeIndex()
Build a newAliasAction
to remove an index.void
replaceAliases(java.lang.String... aliases)
Replaces current aliases with the provided aliases.IndicesAliasesRequest.AliasActions
routing(java.lang.String routing)
Set the default routing.java.lang.String
searchRouting()
IndicesAliasesRequest.AliasActions
searchRouting(java.lang.String searchRouting)
java.lang.String
toString()
XContentBuilder
toXContent(XContentBuilder builder, ToXContent.Params params)
java.lang.Boolean
writeIndex()
IndicesAliasesRequest.AliasActions
writeIndex(java.lang.Boolean writeIndex)
void
writeTo(StreamOutput out)
Write this into the StreamOutput.
-
Field Details
-
PARSER
public static final ConstructingObjectParser<IndicesAliasesRequest.AliasActions,java.lang.Void> PARSERParser for any oneAliasAction
.
-
-
Constructor Details
-
AliasActions
-
AliasActions
Read from a stream.- Throws:
java.io.IOException
-
-
Method Details
-
add
Build a newAliasAction
to add aliases. -
remove
Build a newAliasAction
to remove aliases. -
removeIndex
Build a newAliasAction
to remove an index. -
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput. -
actionType
Type of the action to perform. -
indices
Description copied from interface:IndicesRequest.Replaceable
Sets the indices that the action relates to.- Specified by:
indices
in interfaceIndicesRequest.Replaceable
-
index
Set the index this action is operating on. -
aliases
Aliases to use with this action. -
alias
Set the alias this action is operating on. -
routing
Set the default routing. -
searchRouting
public java.lang.String searchRouting() -
searchRouting
-
indexRouting
public java.lang.String indexRouting() -
indexRouting
-
filter
public java.lang.String filter() -
filter
-
filter
public IndicesAliasesRequest.AliasActions filter(java.util.Map<java.lang.String,java.lang.Object> filter) -
filter
-
writeIndex
-
writeIndex
public java.lang.Boolean writeIndex() -
isHidden
-
isHidden
public java.lang.Boolean isHidden() -
aliases
public java.lang.String[] aliases()Description copied from interface:AliasesRequest
Returns the array of aliases that the action relates to- Specified by:
aliases
in interfaceAliasesRequest
-
replaceAliases
public void replaceAliases(java.lang.String... aliases)Description copied from interface:AliasesRequest
Replaces current aliases with the provided aliases. Sometimes aliases expressions need to be resolved to concrete aliases prior to executing the transport action.- Specified by:
replaceAliases
in interfaceAliasesRequest
-
getOriginalAliases
public java.lang.String[] getOriginalAliases()Description copied from interface:AliasesRequest
Returns the aliases as they were originally requested, before any potential name resolution- Specified by:
getOriginalAliases
in interfaceAliasesRequest
-
expandAliasesWildcards
public boolean expandAliasesWildcards()Description copied from interface:AliasesRequest
Returns true if wildcards expressions among aliases should be resolved, false otherwise- Specified by:
expandAliasesWildcards
in interfaceAliasesRequest
-
indices
public java.lang.String[] indices()Description copied from interface:IndicesRequest
Returns the array of indices that the action relates to- Specified by:
indices
in interfaceIndicesRequest
-
indicesOptions
Description copied from interface:IndicesRequest
Returns 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:
indicesOptions
in interfaceIndicesRequest
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException- Specified by:
toXContent
in interfaceToXContent
- Throws:
java.io.IOException
-
fromXContent
public static IndicesAliasesRequest.AliasActions fromXContent(XContentParser parser) throws java.io.IOException- Throws:
java.io.IOException
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCode
in classjava.lang.Object
-