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 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,java.lang.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
Modifier and Type Method Description IndicesAliasesRequest.AliasActions.TypeactionType()Type of the action to perform.static IndicesAliasesRequest.AliasActionsadd()Build a newAliasActionto add aliases.IndicesAliasesRequest.AliasActionsalias(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.AliasActionsaliases(java.lang.String... aliases)Aliases to use with this action.booleanequals(java.lang.Object obj)booleanexpandAliasesWildcards()Returns true if wildcards expressions among aliases should be resolved, false otherwisejava.lang.Stringfilter()IndicesAliasesRequest.AliasActionsfilter(java.lang.String filter)IndicesAliasesRequest.AliasActionsfilter(java.util.Map<java.lang.String,java.lang.Object> filter)IndicesAliasesRequest.AliasActionsfilter(QueryBuilder filter)static IndicesAliasesRequest.AliasActionsfromXContent(XContentParser parser)java.lang.String[]getOriginalAliases()Returns the aliases as they were originally requested, before any potential name resolutioninthashCode()IndicesAliasesRequest.AliasActionsindex(java.lang.String index)Set the index this action is operating on.java.lang.StringindexRouting()IndicesAliasesRequest.AliasActionsindexRouting(java.lang.String indexRouting)java.lang.String[]indices()Returns the array of indices that the action relates toIndicesAliasesRequest.AliasActionsindices(java.lang.String... indices)Sets the indices that the action relates to.IndicesOptionsindicesOptions()Returns the indices options used to resolve indices.static IndicesAliasesRequest.AliasActionsremove()Build a newAliasActionto remove aliases.static IndicesAliasesRequest.AliasActionsremoveIndex()Build a newAliasActionto remove an index.voidreplaceAliases(java.lang.String... aliases)Replaces current aliases with the provided aliases.IndicesAliasesRequest.AliasActionsrouting(java.lang.String routing)Set the default routing.java.lang.StringsearchRouting()IndicesAliasesRequest.AliasActionssearchRouting(java.lang.String searchRouting)java.lang.StringtoString()XContentBuildertoXContent(XContentBuilder builder, ToXContent.Params params)java.lang.BooleanwriteIndex()IndicesAliasesRequest.AliasActionswriteIndex(java.lang.Boolean writeIndex)voidwriteTo(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 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 java.io.IOException
Description copied from interface:WriteableWrite 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.ReplaceableSets the indices that the action relates to.- Specified by:
indicesin 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:AliasesRequestReturns the array of aliases that the action relates to- Specified by:
aliasesin interfaceAliasesRequest
-
replaceAliases
public void replaceAliases(java.lang.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 java.lang.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 java.lang.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 java.io.IOException
- Specified by:
toXContentin 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:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-