Record Class ResolvedIndexExpression

java.lang.Object
java.lang.Record
org.elasticsearch.action.ResolvedIndexExpression
Record Components:
original - the original index expression, as provided by the user
localExpressions - the local expressions that replace the original along with their resolution result and failure info
remoteExpressions - the remote expressions that replace the original

public record ResolvedIndexExpression(String original, ResolvedIndexExpression.LocalExpressions localExpressions, Set<String> remoteExpressions) extends Record
This class allows capturing context about index expression replacements performed on an IndicesRequest.Replaceable during index resolution, in particular the results of local resolution, and the remote (unresolved) expressions if any.

The replacements are separated into local and remote expressions. For local expressions, the class allows recording local index resolution results along with failure info. For remote expressions, only the expressions are recorded.

An example structure is:


 {
   "original": "my-index-*",
   "localExpressions": {
     "expressions": ["my-index-000001", "my-index-000002"],
     "localIndexResolutionResult": "SUCCESS"
   },
   "remoteExpressions": ["remote1:my-index-*", "remote2:my-index-*"]
 }
 
  • Constructor Details

  • Method Details

    • 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 Objects::equals(Object,Object).
      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.
    • original

      public String original()
      Returns the value of the original record component.
      Returns:
      the value of the original record component
    • localExpressions

      public ResolvedIndexExpression.LocalExpressions localExpressions()
      Returns the value of the localExpressions record component.
      Returns:
      the value of the localExpressions record component
    • remoteExpressions

      public Set<String> remoteExpressions()
      Returns the value of the remoteExpressions record component.
      Returns:
      the value of the remoteExpressions record component