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 Stringstatic final IndicesOptions.WildcardOptionsstatic final StringFields 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 aWildcardOptionsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theallowEmptyExpressionsrecord component.builder()builder(IndicesOptions.WildcardOptions wildcardOptions) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theincludeHiddenrecord component.booleanReturns the value of thematchClosedrecord component.booleanReturns the value of thematchOpenrecord component.parseParameters(Object expandWildcards, Object allowNoIndices, IndicesOptions.WildcardOptions defaultOptions) booleanReturns the value of theresolveAliasesrecord component.final StringtoString()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, waitMethods 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 aWildcardOptionsrecord class.- Parameters:
matchOpen- the value for thematchOpenrecord componentmatchClosed- the value for thematchClosedrecord componentincludeHidden- the value for theincludeHiddenrecord componentresolveAliases- the value for theresolveAliasesrecord componentallowEmptyExpressions- the value for theallowEmptyExpressionsrecord 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:
toXContentin 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 thematchOpenrecord component.- Returns:
- the value of the
matchOpenrecord component
-
matchClosed
public boolean matchClosed()Returns the value of thematchClosedrecord component.- Returns:
- the value of the
matchClosedrecord component
-
includeHidden
public boolean includeHidden()Returns the value of theincludeHiddenrecord component.- Returns:
- the value of the
includeHiddenrecord component
-
resolveAliases
public boolean resolveAliases()Returns the value of theresolveAliasesrecord component.- Returns:
- the value of the
resolveAliasesrecord component
-
allowEmptyExpressions
public boolean allowEmptyExpressions()Returns the value of theallowEmptyExpressionsrecord component.- Returns:
- the value of the
allowEmptyExpressionsrecord component
-