Module org.elasticsearch.server
Package org.elasticsearch.action.support
Record Class IndicesOptions.WildcardOptions
java.lang.Object
java.lang.Record
org.elasticsearch.action.support.IndicesOptions.WildcardOptions
- Record Components:
matchOpen
- , open indices will be matchedmatchClosed
- , closed indices will be matchedincludeHidden
- , hidden indices will be included in the result. This is a post filter, it requires matchOpen or matchClosed to have an effect.resolveAliases
- , aliases will be included in the result, if false we treat them like they do not existallowEmptyExpressions
- , when an expression does not result in any indices, if false it throws an error if true it treats it as an empty result
- All Implemented Interfaces:
ToXContent
,ToXContentFragment
- Enclosing class:
- IndicesOptions
public static record IndicesOptions.WildcardOptions(boolean matchOpen, boolean matchClosed, boolean includeHidden, boolean resolveAliases, boolean allowEmptyExpressions)
extends Record
implements ToXContentFragment
Controls the way the wildcard expressions will be resolved.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final IndicesOptions.WildcardOptions
static final String
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS
-
Constructor Summary
ConstructorsConstructorDescriptionWildcardOptions
(boolean matchOpen, boolean matchClosed, boolean includeHidden, boolean resolveAliases, boolean allowEmptyExpressions) Creates an instance of aWildcardOptions
record class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the value of theallowEmptyExpressions
record component.builder()
builder
(IndicesOptions.WildcardOptions wildcardOptions) final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
Returns the value of theincludeHidden
record component.boolean
Returns the value of thematchClosed
record component.boolean
Returns the value of thematchOpen
record component.parseParameters
(Object expandWildcards, Object allowNoIndices, IndicesOptions.WildcardOptions defaultOptions) boolean
Returns the value of theresolveAliases
record component.final String
toString()
Returns a string representation of this record class.toXContent
(XContentBuilder builder, boolean wildcardStatesAsUserInput) This converter to XContent only includes the fields a user can interact, internal options like the resolveAliases are not added.toXContent
(XContentBuilder builder, ToXContent.Params params) 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
-
EXPAND_WILDCARDS
- See Also:
-
ALLOW_NO_INDICES
- See Also:
-
DEFAULT
-
-
Constructor Details
-
WildcardOptions
public WildcardOptions(boolean matchOpen, boolean matchClosed, boolean includeHidden, boolean resolveAliases, boolean allowEmptyExpressions) Creates an instance of aWildcardOptions
record class.- Parameters:
matchOpen
- the value for thematchOpen
record componentmatchClosed
- the value for thematchClosed
record componentincludeHidden
- the value for theincludeHidden
record componentresolveAliases
- the value for theresolveAliases
record componentallowEmptyExpressions
- the value for theallowEmptyExpressions
record component
-
-
Method Details
-
parseParameters
public static IndicesOptions.WildcardOptions parseParameters(Object expandWildcards, Object allowNoIndices, IndicesOptions.WildcardOptions defaultOptions) -
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContent
in interfaceToXContent
- Throws:
IOException
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, boolean wildcardStatesAsUserInput) throws IOException This converter to XContent only includes the fields a user can interact, internal options like the resolveAliases are not added.- Parameters:
wildcardStatesAsUserInput
- , some parts of the code expect the serialization of the expand_wildcards field to be a comma separated string that matches the allowed user input, this includes all the states along with the values 'all' and 'none'.- Throws:
IOException
-
builder
-
builder
public static IndicesOptions.WildcardOptions.Builder builder(IndicesOptions.WildcardOptions wildcardOptions) -
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 with '=='. -
matchOpen
public boolean matchOpen()Returns the value of thematchOpen
record component.- Returns:
- the value of the
matchOpen
record component
-
matchClosed
public boolean matchClosed()Returns the value of thematchClosed
record component.- Returns:
- the value of the
matchClosed
record component
-
includeHidden
public boolean includeHidden()Returns the value of theincludeHidden
record component.- Returns:
- the value of the
includeHidden
record component
-
resolveAliases
public boolean resolveAliases()Returns the value of theresolveAliases
record component.- Returns:
- the value of the
resolveAliases
record component
-
allowEmptyExpressions
public boolean allowEmptyExpressions()Returns the value of theallowEmptyExpressions
record component.- Returns:
- the value of the
allowEmptyExpressions
record component
-