Module org.elasticsearch.server
Class IndexNameExpressionResolver.SelectorResolver
java.lang.Object
org.elasticsearch.cluster.metadata.IndexNameExpressionResolver.SelectorResolver
- Enclosing class:
IndexNameExpressionResolver
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionparseExpression(String expression, IndicesOptions options) Parses an index expression for a selector suffix.static IndexComponentSelectorparseMatchAllToSelector(IndexNameExpressionResolver.Context context, String matchAllExpression) Parses an index expression for selector suffixes.
-
Field Details
-
SELECTOR_SEPARATOR
- See Also:
-
-
Method Details
-
parseExpression
public static IndexNameExpressionResolver.ResolvedExpression parseExpression(String expression, IndicesOptions options) Parses an index expression for a selector suffix. If a suffix is present and supported by the index options, the expression and its suffix are split apart and returned. If a suffix is not present on the expression, the defaultIndexComponentSelector.DATAselector will be returned. If suffixes are present but not supported by the index options, this will throwIndexNotFoundException. When suffixes are not allowed by the context, the selector returned will be null.- Parameters:
expression- The expression to check for selectorsoptions- IndicesOptions object- Returns:
- A resolved expression, optionally paired with a selector if present and supported.
-
parseMatchAllToSelector
public static IndexComponentSelector parseMatchAllToSelector(IndexNameExpressionResolver.Context context, String matchAllExpression) Parses an index expression for selector suffixes. If a suffix is present and supported by the index options, the suffix is returned. If a suffix is not present on the expression, the default selector defined in the context is returned. If selectors are disabled in the options, this will return a null value. If a selector is provided when selectors are disabled in the options, this will throwIndexNotFoundException.- Parameters:
context- Context objectmatchAllExpression- The match all expression given to the index request (e.g. `*`, `*::failures`, `_all::data`)- Returns:
- The selector for this match all expression
-