Record Class IndicesOptions.WildcardOptions

java.lang.Object
java.lang.Record
org.elasticsearch.action.support.IndicesOptions.WildcardOptions
Record Components:
matchOpen - , open indices will be matched
matchClosed - , closed indices will be matched
includeHidden - , 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 exist
allowEmptyExpressions - , 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.
  • Field Details

  • Constructor Details

    • WildcardOptions

      public WildcardOptions(boolean matchOpen, boolean matchClosed, boolean includeHidden, boolean resolveAliases, boolean allowEmptyExpressions)
      Creates an instance of a WildcardOptions record class.
      Parameters:
      matchOpen - the value for the matchOpen record component
      matchClosed - the value for the matchClosed record component
      includeHidden - the value for the includeHidden record component
      resolveAliases - the value for the resolveAliases record component
      allowEmptyExpressions - the value for the allowEmptyExpressions 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 interface ToXContent
      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

      public static IndicesOptions.WildcardOptions.Builder builder()
    • builder

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • matchOpen

      public boolean matchOpen()
      Returns the value of the matchOpen record component.
      Returns:
      the value of the matchOpen record component
    • matchClosed

      public boolean matchClosed()
      Returns the value of the matchClosed record component.
      Returns:
      the value of the matchClosed record component
    • includeHidden

      public boolean includeHidden()
      Returns the value of the includeHidden record component.
      Returns:
      the value of the includeHidden record component
    • resolveAliases

      public boolean resolveAliases()
      Returns the value of the resolveAliases record component.
      Returns:
      the value of the resolveAliases record component
    • allowEmptyExpressions

      public boolean allowEmptyExpressions()
      Returns the value of the allowEmptyExpressions record component.
      Returns:
      the value of the allowEmptyExpressions record component