Package org.elasticsearch.action.support
Record Class IndicesOptions
java.lang.Object
java.lang.Record
org.elasticsearch.action.support.IndicesOptions
- All Implemented Interfaces:
org.elasticsearch.xcontent.ToXContent
,org.elasticsearch.xcontent.ToXContentFragment
public record IndicesOptions(EnumSet<IndicesOptions.Option> options, EnumSet<IndicesOptions.WildcardStates> expandWildcards)
extends Record
implements org.elasticsearch.xcontent.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
Modifier and TypeClassDescriptionstatic enum
static enum
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.ToXContent.Params
-
Field Summary
Modifier and TypeFieldDescriptionstatic final IndicesOptions
static final IndicesOptions
static final IndicesOptions
static final IndicesOptions
static final IndicesOptions
static final IndicesOptions
static final IndicesOptions
static final IndicesOptions
static final IndicesOptions
static final IndicesOptions
static final IndicesOptions
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
ConstructorDescriptionIndicesOptions
(EnumSet<IndicesOptions.Option> options, EnumSet<IndicesOptions.WildcardStates> expandWildcards) Creates an instance of aIndicesOptions
record class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
final boolean
Indicates whether some other object is "equal to" this one.Returns the value of theexpandWildcards
record component.boolean
boolean
boolean
boolean
static IndicesOptions
fromMap
(Map<String, Object> map, IndicesOptions defaultSettings) static IndicesOptions
fromOptions
(boolean ignoreUnavailable, boolean allowNoIndices, boolean expandToOpenIndices, boolean expandToClosedIndices) static IndicesOptions
fromOptions
(boolean ignoreUnavailable, boolean allowNoIndices, boolean expandToOpenIndices, boolean expandToClosedIndices, boolean expandToHiddenIndices) static IndicesOptions
fromOptions
(boolean ignoreUnavailable, boolean allowNoIndices, boolean expandToOpenIndices, boolean expandToClosedIndices, boolean allowAliasesToMultipleIndices, boolean forbidClosedIndices, boolean ignoreAliases, boolean ignoreThrottled) static IndicesOptions
fromOptions
(boolean ignoreUnavailable, boolean allowNoIndices, boolean expandToOpenIndices, boolean expandToClosedIndices, boolean expandToHiddenIndices, boolean allowAliasesToMultipleIndices, boolean forbidClosedIndices, boolean ignoreAliases, boolean ignoreThrottled) static IndicesOptions
fromOptions
(boolean ignoreUnavailable, boolean allowNoIndices, boolean expandToOpenIndices, boolean expandToClosedIndices, IndicesOptions defaultOptions) static IndicesOptions
fromParameters
(Object wildcardsString, Object ignoreUnavailableString, Object allowNoIndicesString, Object ignoreThrottled, IndicesOptions defaultSettings) static IndicesOptions
fromRequest
(RestRequest request, IndicesOptions defaultSettings) static IndicesOptions
fromXContent
(org.elasticsearch.xcontent.XContentParser parser) static IndicesOptions
fromXContent
(org.elasticsearch.xcontent.XContentParser parser, IndicesOptions defaults) final int
hashCode()
Returns a hash code value for this object.boolean
boolean
boolean
static boolean
isIndicesOptions
(String name) Returns true if the name represents a valid name for one of the indices option false otherwisestatic IndicesOptions
static IndicesOptions
static IndicesOptions
static IndicesOptions
options()
Returns the value of theoptions
record component.static IndicesOptions
static IndicesOptions
static IndicesOptions
static IndicesOptions
static IndicesOptions
static IndicesOptions
static IndicesOptions
toString()
Returns a string representation of this record class.org.elasticsearch.xcontent.XContentBuilder
toXContent
(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) void
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.elasticsearch.xcontent.ToXContentFragment
isFragment
-
Field Details
-
STRICT_EXPAND_OPEN
-
LENIENT_EXPAND_OPEN
-
LENIENT_EXPAND_OPEN_HIDDEN
-
LENIENT_EXPAND_OPEN_CLOSED
-
LENIENT_EXPAND_OPEN_CLOSED_HIDDEN
-
STRICT_EXPAND_OPEN_CLOSED
-
STRICT_EXPAND_OPEN_CLOSED_HIDDEN
-
STRICT_EXPAND_OPEN_FORBID_CLOSED
-
STRICT_EXPAND_OPEN_HIDDEN_FORBID_CLOSED
-
STRICT_EXPAND_OPEN_FORBID_CLOSED_IGNORE_THROTTLED
-
STRICT_SINGLE_INDEX_NO_EXPAND_FORBID_CLOSED
-
-
Constructor Details
-
IndicesOptions
public IndicesOptions(EnumSet<IndicesOptions.Option> options, EnumSet<IndicesOptions.WildcardStates> expandWildcards) Creates an instance of aIndicesOptions
record class.- Parameters:
options
- the value for theoptions
record componentexpandWildcards
- the value for theexpandWildcards
record component
-
-
Method Details
-
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
-
expandWildcardsHidden
public boolean expandWildcardsHidden()- Returns:
- Whether wildcard expressions should get expanded to hidden 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
-
expandWildcards
Returns the value of theexpandWildcards
record component.- Returns:
- the value of the
expandWildcards
record component
-
options
Returns the value of theoptions
record component.- Returns:
- the value of the
options
record component
-
writeIndicesOptions
- Throws:
IOException
-
readIndicesOptions
- Throws:
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, boolean expandToHiddenIndices) -
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) -
fromOptions
public static IndicesOptions fromOptions(boolean ignoreUnavailable, boolean allowNoIndices, boolean expandToOpenIndices, boolean expandToClosedIndices, boolean expandToHiddenIndices, boolean allowAliasesToMultipleIndices, boolean forbidClosedIndices, boolean ignoreAliases, boolean ignoreThrottled) -
fromRequest
-
fromMap
-
isIndicesOptions
Returns true if the name represents a valid name for one of the indices option false otherwise -
fromParameters
public static IndicesOptions fromParameters(Object wildcardsString, Object ignoreUnavailableString, Object allowNoIndicesString, Object ignoreThrottled, IndicesOptions defaultSettings) -
toXContent
public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException - Specified by:
toXContent
in interfaceorg.elasticsearch.xcontent.ToXContent
- Throws:
IOException
-
fromXContent
public static IndicesOptions fromXContent(org.elasticsearch.xcontent.XContentParser parser) throws IOException - Throws:
IOException
-
fromXContent
public static IndicesOptions fromXContent(org.elasticsearch.xcontent.XContentParser parser, @Nullable IndicesOptions defaults) throws IOException - Throws:
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), 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).
-
strictExpandHidden
- Returns:
- indices option that requires every specified index to exist, expands wildcards to both open and closed indices, includes hidden 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).
-
lenientExpandOpenHidden
- Returns:
- indices options that ignores unavailable indices, expands wildcards to open and hidden 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).
-
lenientExpandHidden
- Returns:
- indices options that ignores unavailable indices, expands wildcards to all open and closed indices and allows that no indices are resolved from wildcard expressions (not returning an error).
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
.