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
.-
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
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)
int
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.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.-
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,java.lang.Void> PARSER
Parser for any oneAliasAction
.
-
-
Constructor Detail
-
AliasActions
public AliasActions(IndicesAliasesRequest.AliasActions.Type type)
-
AliasActions
public AliasActions(StreamInput in) throws java.io.IOException
Read from a stream.- Throws:
java.io.IOException
-
-
Method Detail
-
add
public static IndicesAliasesRequest.AliasActions add()
Build a newAliasAction
to add aliases.
-
remove
public static IndicesAliasesRequest.AliasActions remove()
Build a newAliasAction
to remove aliases.
-
removeIndex
public static IndicesAliasesRequest.AliasActions removeIndex()
Build a newAliasAction
to remove an index.
-
writeTo
public void writeTo(StreamOutput out) throws java.io.IOException
Description copied from interface:Writeable
Write this into the StreamOutput.
-
actionType
public IndicesAliasesRequest.AliasActions.Type actionType()
Type of the action to perform.
-
indices
public IndicesAliasesRequest.AliasActions indices(java.lang.String... indices)
Description copied from interface:IndicesRequest.Replaceable
Sets the indices that the action relates to.- Specified by:
indices
in interfaceIndicesRequest.Replaceable
-
index
public IndicesAliasesRequest.AliasActions index(java.lang.String index)
Set the index this action is operating on.
-
aliases
public IndicesAliasesRequest.AliasActions aliases(java.lang.String... aliases)
Aliases to use with this action.
-
alias
public IndicesAliasesRequest.AliasActions alias(java.lang.String alias)
Set the alias this action is operating on.
-
routing
public IndicesAliasesRequest.AliasActions routing(java.lang.String routing)
Set the default routing.
-
searchRouting
public java.lang.String searchRouting()
-
searchRouting
public IndicesAliasesRequest.AliasActions searchRouting(java.lang.String searchRouting)
-
indexRouting
public java.lang.String indexRouting()
-
indexRouting
public IndicesAliasesRequest.AliasActions indexRouting(java.lang.String indexRouting)
-
filter
public java.lang.String filter()
-
filter
public IndicesAliasesRequest.AliasActions filter(java.lang.String filter)
-
filter
public IndicesAliasesRequest.AliasActions filter(java.util.Map<java.lang.String,java.lang.Object> filter)
-
filter
public IndicesAliasesRequest.AliasActions filter(QueryBuilder filter)
-
writeIndex
public IndicesAliasesRequest.AliasActions writeIndex(java.lang.Boolean writeIndex)
-
writeIndex
public java.lang.Boolean writeIndex()
-
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
-
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
public IndicesOptions 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
-
-