Module org.elasticsearch.server
Package org.elasticsearch.action
Record Class ResolvedIndexExpression
java.lang.Object
java.lang.Record
org.elasticsearch.action.ResolvedIndexExpression
- Record Components:
original- the original index expression, as provided by the userlocalExpressions- the local expressions that replace the original along with their resolution result and failure inforemoteExpressions- 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-*"]
}
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordRepresents local (non-remote) resolution results, including expanded indices, and aResolvedIndexExpression.LocalIndexResolutionResult.static enumIndicates if a local index resolution attempt was successful or failed. -
Constructor Summary
ConstructorsConstructorDescriptionResolvedIndexExpression(String original, ResolvedIndexExpression.LocalExpressions localExpressions, Set<String> remoteExpressions) Creates an instance of aResolvedIndexExpressionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thelocalExpressionsrecord component.original()Returns the value of theoriginalrecord component.Returns the value of theremoteExpressionsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ResolvedIndexExpression
public ResolvedIndexExpression(String original, ResolvedIndexExpression.LocalExpressions localExpressions, Set<String> remoteExpressions) Creates an instance of aResolvedIndexExpressionrecord class.- Parameters:
original- the value for theoriginalrecord componentlocalExpressions- the value for thelocalExpressionsrecord componentremoteExpressions- the value for theremoteExpressionsrecord component
-
-
Method Details
-
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). -
original
Returns the value of theoriginalrecord component.- Returns:
- the value of the
originalrecord component
-
localExpressions
Returns the value of thelocalExpressionsrecord component.- Returns:
- the value of the
localExpressionsrecord component
-
remoteExpressions
Returns the value of theremoteExpressionsrecord component.- Returns:
- the value of the
remoteExpressionsrecord component
-