Package org.elasticsearch.action.support
Class IndicesOptions
java.lang.Object
org.elasticsearch.action.support.IndicesOptions
- All Implemented Interfaces:
ToXContent,ToXContentFragment
public class IndicesOptions extends java.lang.Object implements ToXContentFragment
Controls how to deal with unavailable concrete indices (closed or missing), how wildcard expressions are expanded
to actual indices (all, closed or open indices) and how to deal with wildcard expressions that resolve to no indices.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classIndicesOptions.Optionstatic classIndicesOptions.WildcardStatesNested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params -
Field Summary
Fields Modifier and Type Field Description static IndicesOptionsLENIENT_EXPAND_OPENstatic IndicesOptionsLENIENT_EXPAND_OPEN_CLOSEDstatic IndicesOptionsSTRICT_EXPAND_OPENstatic IndicesOptionsSTRICT_EXPAND_OPEN_CLOSEDstatic IndicesOptionsSTRICT_EXPAND_OPEN_FORBID_CLOSEDstatic IndicesOptionsSTRICT_EXPAND_OPEN_FORBID_CLOSED_IGNORE_THROTTLEDstatic IndicesOptionsSTRICT_SINGLE_INDEX_NO_EXPAND_FORBID_CLOSED -
Constructor Summary
Constructors Constructor Description IndicesOptions(java.util.EnumSet<IndicesOptions.Option> options, java.util.EnumSet<IndicesOptions.WildcardStates> expandWildcards) -
Method Summary
Modifier and Type Method Description booleanallowAliasesToMultipleIndices()booleanallowNoIndices()booleanequals(java.lang.Object obj)booleanexpandWildcardsClosed()booleanexpandWildcardsOpen()booleanforbidClosedIndices()static IndicesOptionsfromMap(java.util.Map<java.lang.String,java.lang.Object> map, IndicesOptions defaultSettings)static IndicesOptionsfromOptions(boolean ignoreUnavailable, boolean allowNoIndices, boolean expandToOpenIndices, boolean expandToClosedIndices)static IndicesOptionsfromOptions(boolean ignoreUnavailable, boolean allowNoIndices, boolean expandToOpenIndices, boolean expandToClosedIndices, boolean allowAliasesToMultipleIndices, boolean forbidClosedIndices, boolean ignoreAliases, boolean ignoreThrottled)static IndicesOptionsfromOptions(boolean ignoreUnavailable, boolean allowNoIndices, boolean expandToOpenIndices, boolean expandToClosedIndices, IndicesOptions defaultOptions)static IndicesOptionsfromParameters(java.lang.Object wildcardsString, java.lang.Object ignoreUnavailableString, java.lang.Object allowNoIndicesString, java.lang.Object ignoreThrottled, IndicesOptions defaultSettings)static IndicesOptionsfromRequest(RestRequest request, IndicesOptions defaultSettings)inthashCode()booleanignoreAliases()booleanignoreThrottled()booleanignoreUnavailable()static booleanisIndicesOptions(java.lang.String name)Returns true if the name represents a valid name for one of the indices option false otherwisestatic IndicesOptionslenientExpand()static IndicesOptionslenientExpandOpen()static IndicesOptionsreadIndicesOptions(StreamInput in)static IndicesOptionsstrictExpand()static IndicesOptionsstrictExpandOpen()static IndicesOptionsstrictExpandOpenAndForbidClosed()static IndicesOptionsstrictExpandOpenAndForbidClosedIgnoreThrottled()static IndicesOptionsstrictSingleIndexNoExpandForbidClosed()java.lang.StringtoString()XContentBuildertoXContent(XContentBuilder builder, ToXContent.Params params)voidwriteIndicesOptions(StreamOutput out)
-
Field Details
-
Constructor Details
-
IndicesOptions
public IndicesOptions(java.util.EnumSet<IndicesOptions.Option> options, java.util.EnumSet<IndicesOptions.WildcardStates> expandWildcards)
-
-
Method Details
-
ignoreUnavailable
public boolean ignoreUnavailable()- Returns:
- Whether specified concrete indices should be ignored when unavailable (missing or closed)
-
allowNoIndices
public boolean allowNoIndices()- Returns:
- Whether to ignore if a wildcard expression resolves to no concrete indices. The `_all` string or empty list of indices count as wildcard expressions too. Also when an alias points to a closed index this option decides if no concrete indices are allowed.
-
expandWildcardsOpen
public boolean expandWildcardsOpen()- Returns:
- Whether wildcard expressions should get expanded to open indices
-
expandWildcardsClosed
public boolean expandWildcardsClosed()- Returns:
- Whether wildcard expressions should get expanded to closed indices
-
forbidClosedIndices
public boolean forbidClosedIndices()- Returns:
- Whether execution on closed indices is allowed.
-
allowAliasesToMultipleIndices
public boolean allowAliasesToMultipleIndices()- Returns:
- whether aliases pointing to multiple indices are allowed
-
ignoreAliases
public boolean ignoreAliases()- Returns:
- whether aliases should be ignored (when resolving a wildcard)
-
ignoreThrottled
public boolean ignoreThrottled()- Returns:
- whether indices that are marked as throttled should be ignored
-
writeIndicesOptions
- Throws:
java.io.IOException
-
readIndicesOptions
- Throws:
java.io.IOException
-
fromOptions
public static IndicesOptions fromOptions(boolean ignoreUnavailable, boolean allowNoIndices, boolean expandToOpenIndices, boolean expandToClosedIndices) -
fromOptions
public static IndicesOptions fromOptions(boolean ignoreUnavailable, boolean allowNoIndices, boolean expandToOpenIndices, boolean expandToClosedIndices, IndicesOptions defaultOptions) -
fromOptions
public static IndicesOptions fromOptions(boolean ignoreUnavailable, boolean allowNoIndices, boolean expandToOpenIndices, boolean expandToClosedIndices, boolean allowAliasesToMultipleIndices, boolean forbidClosedIndices, boolean ignoreAliases, boolean ignoreThrottled) -
fromRequest
-
fromMap
public static IndicesOptions fromMap(java.util.Map<java.lang.String,java.lang.Object> map, IndicesOptions defaultSettings) -
isIndicesOptions
public static boolean isIndicesOptions(java.lang.String name)Returns true if the name represents a valid name for one of the indices option false otherwise -
fromParameters
public static IndicesOptions fromParameters(java.lang.Object wildcardsString, java.lang.Object ignoreUnavailableString, java.lang.Object allowNoIndicesString, java.lang.Object ignoreThrottled, IndicesOptions defaultSettings) -
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException- Specified by:
toXContentin interfaceToXContent- Throws:
java.io.IOException
-
strictExpandOpen
- Returns:
- indices options that requires every specified index to exist, expands wildcards only to open indices and allows that no indices are resolved from wildcard expressions (not returning an error).
-
strictExpandOpenAndForbidClosed
- Returns:
- indices options that requires every specified index to exist, expands wildcards only to open indices, allows that no indices are resolved from wildcard expressions (not returning an error) and forbids the use of closed indices by throwing an error.
-
strictExpandOpenAndForbidClosedIgnoreThrottled
- Returns:
- indices options that requires every specified index to exist, expands wildcards only to open indices, allows that no indices are resolved from wildcard expressions (not returning an error) and forbids the use of closed indices by throwing an error and ignores indices that are throttled.
-
strictExpand
- Returns:
- indices option that requires every specified index to exist, expands wildcards to both open and closed indices and allows that no indices are resolved from wildcard expressions (not returning an error).
-
strictSingleIndexNoExpandForbidClosed
- Returns:
- indices option that requires each specified index or alias to exist, doesn't expand wildcards and throws error if any of the aliases resolves to multiple indices
-
lenientExpandOpen
- Returns:
- indices options that ignores unavailable indices, expands wildcards only to open indices and allows that no indices are resolved from wildcard expressions (not returning an error).
-
lenientExpand
- Returns:
- indices options that ignores unavailable indices, expands wildcards to both open and closed indices and allows that no indices are resolved from wildcard expressions (not returning an error).
-
equals
public boolean equals(java.lang.Object obj)- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-