Class IndexNameExpressionResolver.SelectorResolver

java.lang.Object
org.elasticsearch.cluster.metadata.IndexNameExpressionResolver.SelectorResolver
Enclosing class:
IndexNameExpressionResolver

public static final class IndexNameExpressionResolver.SelectorResolver extends Object
  • Field Details

  • 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 default IndexComponentSelector.DATA selector will be returned. If suffixes are present but not supported by the index options, this will throw IndexNotFoundException. When suffixes are not allowed by the context, the selector returned will be null.
      Parameters:
      expression - The expression to check for selectors
      options - 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 throw IndexNotFoundException.
      Parameters:
      context - Context object
      matchAllExpression - The match all expression given to the index request (e.g. `*`, `*::failures`, `_all::data`)
      Returns:
      The selector for this match all expression
    • validateIndexSelectorString

      public static void validateIndexSelectorString(String indexName, String suffix)