Module org.elasticsearch.server
Class IndexNameExpressionResolver
java.lang.Object
org.elasticsearch.cluster.metadata.IndexNameExpressionResolver
This class main focus is to resolve multi-syntax target expressions to resources or concrete indices. This resolution is influenced
by IndicesOptions and other flags passed through the method call. Examples of the functionality it provides:
- Resolve expressions to concrete indices
- Resolve expressions to data stream names
- Resolve expressions to resources (meaning indices, data streams and aliases)
Note: This class is performance sensitive, so we pay extra attention on the data structure usage and we avoid streams and iterators
when possible in favor of the classic for-i loops.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static final class
Resolves a date math expression based on the requested time.static final record
This represents a resolved expression in the form of the name of a resource in the cluster and a potential selector which defines which part of the resource the expression is targeting.static final class
static final class
In this class we collect the system access relevant code. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionIndexNameExpressionResolver
(ThreadContext threadContext, SystemIndices systemIndices, ProjectResolver projectResolver) -
Method Summary
Modifier and TypeMethodDescriptionString[]
allIndexAliases
(ProjectMetadata project, String index, Set<IndexNameExpressionResolver.ResolvedExpression> resolvedExpressions) Iterates through the list of indices and selects the effective list of all aliases for the given index.static void
assertExpressionHasNullOrDataSelector
(String expression) static String
combineSelector
(String baseExpression, IndexComponentSelector selectorExpression) static String
combineSelectorExpression
(String baseExpression, String selectorExpression) String[]
concreteIndexNames
(ClusterState state, IndicesRequest request) Same asconcreteIndexNames(ClusterState, IndicesOptions, String...)
, but the index expressions and options are encapsulated in the specified request.String[]
concreteIndexNames
(ClusterState state, IndicesOptions options, boolean includeDataStreams, String... indexExpressions) String[]
concreteIndexNames
(ClusterState state, IndicesOptions options, String... indexExpressions) Translates the provided index expression into actual concrete indices, properly deduplicated.String[]
concreteIndexNames
(ClusterState state, IndicesOptions options, IndicesRequest request) String[]
concreteIndexNames
(ProjectMetadata project, IndicesRequest request) Same asconcreteIndexNames(ProjectMetadata, IndicesOptions, String...)
, but the index expressions and options are encapsulated in the specified request.String[]
concreteIndexNames
(ProjectMetadata project, IndicesOptions options, boolean includeDataStreams, String... indexExpressions) String[]
concreteIndexNames
(ProjectMetadata project, IndicesOptions options, String... indexExpressions) Translates the provided index expression into actual concrete indices, properly deduplicated.String[]
concreteIndexNames
(ProjectMetadata project, IndicesOptions options, IndicesRequest request) String[]
concreteIndexNamesWithSystemIndexAccess
(ClusterState state, IndicesRequest request) Same asconcreteIndexNames(ClusterState, IndicesRequest)
, but access to system indices is always allowed.String[]
concreteIndexNamesWithSystemIndexAccess
(ProjectMetadata project, IndicesRequest request) Same asconcreteIndexNames(ProjectMetadata, IndicesRequest)
, but access to system indices is always allowed.Index[]
concreteIndices
(ClusterState state, IndicesRequest request) Same asconcreteIndices(ClusterState, IndicesOptions, String...)
, but the index expressions and options are encapsulated in the specified request and resolves data streams.Index[]
concreteIndices
(ClusterState state, IndicesRequest request, long startTime) Translates the provided index expression into actual concrete indices, properly deduplicated.Index[]
concreteIndices
(ClusterState state, IndicesOptions options, boolean includeDataStreams, String... indexExpressions) Index[]
concreteIndices
(ClusterState state, IndicesOptions options, String... indexExpressions) Translates the provided index expression into actual concrete indices, properly deduplicated.Index[]
concreteIndices
(ProjectMetadata projectMetadata, IndicesRequest request) Same asconcreteIndices(ProjectMetadata, IndicesOptions, String...)
, but the index expressions and options are encapsulated in the specified request and resolves data streams.Index[]
concreteIndices
(ProjectMetadata project, IndicesRequest request, long startTime) Translates the provided index expression into actual concrete indices, properly deduplicated.Index[]
concreteIndices
(ProjectMetadata project, IndicesOptions options, boolean includeDataStreams, String... indexExpressions) Index[]
concreteIndices
(ProjectMetadata project, IndicesOptions options, String... indexExpressions) Translates the provided index expression into actual concrete indices, properly deduplicated.concreteSingleIndex
(ClusterState state, IndicesRequest request) Utility method that allows to resolve an index expression to its corresponding single concrete index.concreteSingleIndex
(ProjectMetadata project, IndicesRequest request) Utility method that allows to resolve an index expression to its corresponding single concrete index.concreteWriteIndex
(ClusterState state, IndicesOptions options, String index, boolean allowNoIndices, boolean includeDataStreams) Utility method that allows to resolve an index expression to its corresponding single write index.concreteWriteIndex
(ProjectMetadata project, IndicesRequest request) Utility method that allows to resolve an index expression to its corresponding single write index.concreteWriteIndex
(ProjectMetadata project, IndicesOptions options, String index, boolean allowNoIndices, boolean includeDataStreams) Utility method that allows to resolve an index expression to its corresponding single write index.dataStreamNames
(ClusterState state, IndicesOptions options, String... indexExpressions) dataStreamNames
(ProjectMetadata project, IndicesOptions options, String... indexExpressions) dataStreams
(ClusterState state, IndicesOptions options, String... indexExpressions) dataStreams
(ProjectMetadata project, IndicesOptions options, String... indexExpressions) String[]
filteringAliases
(ProjectMetadata project, String index, Set<IndexNameExpressionResolver.ResolvedExpression> resolvedExpressions) Iterates through the list of indices and selects the effective list of filtering aliases for the given index.Determines the right predicate based on thegetSystemIndexAccessLevel()
.org.apache.lucene.util.automaton.Automaton
boolean
hasIndexAbstraction
(String indexAbstraction, ProjectMetadata project) static boolean
hasSelector
(String expression, IndexComponentSelector selector) static boolean
hasSelectorSuffix
(String expression) String[]
indexAliases
(ProjectMetadata project, String index, Predicate<AliasMetadata> requiredAlias, BiPredicate<DataStreamAlias, Boolean> requiredDataStreamAlias, boolean skipIdentity, Set<IndexNameExpressionResolver.ResolvedExpression> resolvedExpressions) Iterates through the list of indices and selects the effective list of required aliases for the given index.static boolean
isAllIndices
(Collection<String> aliasesOrIndices) Identifies whether the array containing index names given as argument refers to all indices The empty or null array identifies all indicesstatic <T> boolean
isAllIndices
(Collection<T> aliasesOrIndices, Function<T, String> resourceGetter) Identifies whether the array containing objects with index names given as argument refers to all indices The empty or null array identifies all indicesstatic boolean
isAllIndicesExpression
(Collection<IndexNameExpressionResolver.ResolvedExpression> aliasesOrIndices) Identifies whether the array containing index names given as argument refers to all indices The empty or null array identifies all indicesstatic boolean
isNoneExpression
(String[] expressions) Identifies if this expression list is *,-* which effectively means a request that requests no indices.static String
resolveDateMathExpression
(String dateExpression) static String
resolveDateMathExpression
(String dateExpression, long time) resolveExpressions
(ProjectMetadata project, String... expressions) Resolve an array of expressions to the set of indices and aliases that these expressions match.resolveExpressions
(ProjectMetadata project, IndicesOptions indicesOptions, boolean preserveDataStreams, String... expressions) Resolve the expression to the set of indices, aliases, and, optionally, datastreams that the expression matches.protected static Collection
<IndexNameExpressionResolver.ResolvedExpression> resolveExpressionsToResources
(IndexNameExpressionResolver.Context context, String... expressions) Resolve the expression to the set of indices, aliases, and, optionally, data streams that the expression matches.resolveSearchRouting
(ClusterState state, String routing, String... expressions) Resolves the search routing if in the expression aliases are used.resolveSearchRouting
(ProjectMetadata project, String routing, String... expressions) Resolves the search routing if in the expression aliases are used.resolveSearchRoutingAllIndices
(ProjectMetadata project, String routing) Sets the same routing for all indicesresolveWriteIndexAbstraction
(ProjectMetadata project, DocWriteRequest<?> request) ReturnsIndexAbstraction
instance for the provided write request.static boolean
shouldIncludeFailureIndices
(IndicesOptions indicesOptions, IndexComponentSelector expressionSelector) static boolean
shouldIncludeRegularIndices
(IndicesOptions indicesOptions, IndexComponentSelector expressionSelector) splitSelectorExpression
(String expression)
-
Field Details
-
EXCLUDED_DATA_STREAMS_KEY
- See Also:
-
SYSTEM_INDEX_ENFORCEMENT_INDEX_VERSION
-
-
Constructor Details
-
IndexNameExpressionResolver
public IndexNameExpressionResolver(ThreadContext threadContext, SystemIndices systemIndices, ProjectResolver projectResolver)
-
-
Method Details
-
concreteIndexNames
Same asconcreteIndexNames(ClusterState, IndicesOptions, String...)
, but the index expressions and options are encapsulated in the specified request. -
concreteIndexNames
Same asconcreteIndexNames(ProjectMetadata, IndicesOptions, String...)
, but the index expressions and options are encapsulated in the specified request. -
concreteIndexNamesWithSystemIndexAccess
Same asconcreteIndexNames(ClusterState, IndicesRequest)
, but access to system indices is always allowed. -
concreteIndexNamesWithSystemIndexAccess
public String[] concreteIndexNamesWithSystemIndexAccess(ProjectMetadata project, IndicesRequest request) Same asconcreteIndexNames(ProjectMetadata, IndicesRequest)
, but access to system indices is always allowed. -
concreteIndices
Same asconcreteIndices(ClusterState, IndicesOptions, String...)
, but the index expressions and options are encapsulated in the specified request and resolves data streams. -
concreteIndices
Same asconcreteIndices(ProjectMetadata, IndicesOptions, String...)
, but the index expressions and options are encapsulated in the specified request and resolves data streams. -
concreteIndexNames
public String[] concreteIndexNames(ClusterState state, IndicesOptions options, String... indexExpressions) Translates the provided index expression into actual concrete indices, properly deduplicated.- Parameters:
state
- the cluster state containing all the data to resolve to expressions to concrete indicesoptions
- defines how the aliases or indices need to be resolved to concrete indicesindexExpressions
- expressions that can be resolved to alias or index names.- Returns:
- the resolved concrete indices based on the cluster state, indices options and index expressions
- Throws:
IndexNotFoundException
- if one of the index expressions is pointing to a missing index or alias and the provided indices options in the context don't allow such a case, or if the final result of the indices resolution contains no indices and the indices options in the context don't allow such a case.IllegalArgumentException
- if one of the aliases resolve to multiple indices and the provided indices options in the context don't allow such a case; if a remote index is requested.
-
concreteIndexNames
public String[] concreteIndexNames(ProjectMetadata project, IndicesOptions options, String... indexExpressions) Translates the provided index expression into actual concrete indices, properly deduplicated.- Parameters:
project
- the project metadata containing all the data to resolve to expressions to concrete indicesoptions
- defines how the aliases or indices need to be resolved to concrete indicesindexExpressions
- expressions that can be resolved to alias or index names.- Returns:
- the resolved concrete indices based on the cluster state, indices options and index expressions
- Throws:
IndexNotFoundException
- if one of the index expressions is pointing to a missing index or alias and the provided indices options in the context don't allow such a case, or if the final result of the indices resolution contains no indices and the indices options in the context don't allow such a case.IllegalArgumentException
- if one of the aliases resolve to multiple indices and the provided indices options in the context don't allow such a case; if a remote index is requested.
-
concreteIndexNames
public String[] concreteIndexNames(ClusterState state, IndicesOptions options, boolean includeDataStreams, String... indexExpressions) -
concreteIndexNames
public String[] concreteIndexNames(ProjectMetadata project, IndicesOptions options, boolean includeDataStreams, String... indexExpressions) -
concreteIndexNames
public String[] concreteIndexNames(ClusterState state, IndicesOptions options, IndicesRequest request) -
concreteIndexNames
public String[] concreteIndexNames(ProjectMetadata project, IndicesOptions options, IndicesRequest request) -
dataStreamNames
public List<String> dataStreamNames(ClusterState state, IndicesOptions options, String... indexExpressions) -
dataStreamNames
public List<String> dataStreamNames(ProjectMetadata project, IndicesOptions options, String... indexExpressions) -
dataStreams
public List<IndexNameExpressionResolver.ResolvedExpression> dataStreams(ClusterState state, IndicesOptions options, String... indexExpressions) -
dataStreams
public List<IndexNameExpressionResolver.ResolvedExpression> dataStreams(ProjectMetadata project, IndicesOptions options, String... indexExpressions) -
resolveWriteIndexAbstraction
public IndexAbstraction resolveWriteIndexAbstraction(ProjectMetadata project, DocWriteRequest<?> request) ReturnsIndexAbstraction
instance for the provided write request. This instance isn't fully resolved, meaning thatIndexAbstraction.getWriteIndex()
should be invoked in order to get concrete write index.- Parameters:
project
- The projectrequest
- The provided write request- Returns:
IndexAbstraction
instance for the provided write request
-
resolveExpressionsToResources
protected static Collection<IndexNameExpressionResolver.ResolvedExpression> resolveExpressionsToResources(IndexNameExpressionResolver.Context context, String... expressions) Resolve the expression to the set of indices, aliases, and, optionally, data streams that the expression matches. If istrue
, data streams that are covered by the wildcards from the are returned as-is, without expanding them further to their respective backing indices. -
concreteIndices
public Index[] concreteIndices(ClusterState state, IndicesOptions options, String... indexExpressions) Translates the provided index expression into actual concrete indices, properly deduplicated.- Parameters:
state
- the cluster state containing all the data to resolve to expressions to concrete indicesoptions
- defines how the aliases or indices need to be resolved to concrete indicesindexExpressions
- expressions that can be resolved to alias or index names.- Returns:
- the resolved concrete indices based on the cluster state, indices options and index expressions
- Throws:
IndexNotFoundException
- if one of the index expressions is pointing to a missing index or alias and the provided indices options in the context don't allow such a case, or if the final result of the indices resolution contains no indices and the indices options in the context don't allow such a case.IllegalArgumentException
- if one of the aliases resolve to multiple indices and the provided indices options in the context don't allow such a case; if a remote index is requested.
-
concreteIndices
public Index[] concreteIndices(ProjectMetadata project, IndicesOptions options, String... indexExpressions) Translates the provided index expression into actual concrete indices, properly deduplicated.- Parameters:
project
- the project containing all the data to resolve to expressions to concrete indicesoptions
- defines how the aliases or indices need to be resolved to concrete indicesindexExpressions
- expressions that can be resolved to alias or index names.- Returns:
- the resolved concrete indices based on the cluster state, indices options and index expressions
- Throws:
IndexNotFoundException
- if one of the index expressions is pointing to a missing index or alias and the provided indices options in the context don't allow such a case, or if the final result of the indices resolution contains no indices and the indices options in the context don't allow such a case.IllegalArgumentException
- if one of the aliases resolve to multiple indices and the provided indices options in the context don't allow such a case; if a remote index is requested.
-
concreteIndices
public Index[] concreteIndices(ClusterState state, IndicesOptions options, boolean includeDataStreams, String... indexExpressions) -
concreteIndices
public Index[] concreteIndices(ProjectMetadata project, IndicesOptions options, boolean includeDataStreams, String... indexExpressions) -
concreteIndices
Translates the provided index expression into actual concrete indices, properly deduplicated.- Parameters:
state
- the cluster state containing all the data to resolve to expressions to concrete indicesrequest
- request containing expressions that can be resolved to alias, index, or data stream names.startTime
- The start of the request where concrete indices is being invoked for- Returns:
- the resolved concrete indices based on the cluster state, indices options and index expressions provided indices options in the context don't allow such a case, or if the final result of the indices resolution contains no indices and the indices options in the context don't allow such a case.
- Throws:
IllegalArgumentException
- if one of the aliases resolve to multiple indices and the provided indices options in the context don't allow such a case; if a remote index is requested.
-
concreteIndices
Translates the provided index expression into actual concrete indices, properly deduplicated.- Parameters:
project
- the project containing all the data to resolve to expressions to concrete indicesrequest
- request containing expressions that can be resolved to alias, index, or data stream names.startTime
- The start of the request where concrete indices is being invoked for- Returns:
- the resolved concrete indices based on the cluster state, indices options and index expressions provided indices options in the context don't allow such a case, or if the final result of the indices resolution contains no indices and the indices options in the context don't allow such a case.
- Throws:
IllegalArgumentException
- if one of the aliases resolve to multiple indices and the provided indices options in the context don't allow such a case; if a remote index is requested.
-
shouldIncludeRegularIndices
public static boolean shouldIncludeRegularIndices(IndicesOptions indicesOptions, IndexComponentSelector expressionSelector) -
shouldIncludeFailureIndices
public static boolean shouldIncludeFailureIndices(IndicesOptions indicesOptions, IndexComponentSelector expressionSelector) -
concreteSingleIndex
Utility method that allows to resolve an index expression to its corresponding single concrete index. Callers should make sure they provide properIndicesOptions
that require a single index as a result. The indices resolution must in fact return a single index when using this method, anIllegalArgumentException
gets thrown otherwise.- Parameters:
state
- the cluster state containing all the data to resolve to expression to a concrete indexrequest
- The request that defines how the an alias or an index need to be resolved to a concrete index and the expression that can be resolved to an alias or an index name.- Returns:
- the concrete index obtained as a result of the index resolution
- Throws:
IllegalArgumentException
- if the index resolution returns more than one index; if a remote index is requested.
-
concreteSingleIndex
Utility method that allows to resolve an index expression to its corresponding single concrete index. Callers should make sure they provide properIndicesOptions
that require a single index as a result. The indices resolution must in fact return a single index when using this method, anIllegalArgumentException
gets thrown otherwise.- Parameters:
project
- the project containing all the data to resolve to expression to a concrete indexrequest
- The request that defines how the an alias or an index need to be resolved to a concrete index and the expression that can be resolved to an alias or an index name.- Returns:
- the concrete index obtained as a result of the index resolution
- Throws:
IllegalArgumentException
- if the index resolution returns more than one index; if a remote index is requested.
-
concreteWriteIndex
Utility method that allows to resolve an index expression to its corresponding single write index.- Parameters:
project
- the project containing all the data to resolve to expression to a concrete indexrequest
- The request that defines how the an alias or an index need to be resolved to a concrete index and the expression that can be resolved to an alias or an index name.- Returns:
- the write index obtained as a result of the index resolution
- Throws:
IllegalArgumentException
- if the index resolution does not lead to an index, or leads to more than one index
-
concreteWriteIndex
public Index concreteWriteIndex(ClusterState state, IndicesOptions options, String index, boolean allowNoIndices, boolean includeDataStreams) Utility method that allows to resolve an index expression to its corresponding single write index.- Parameters:
state
- the cluster state containing all the data to resolve to expression to a concrete indexoptions
- defines how the aliases or indices need to be resolved to concrete indicesindex
- index that can be resolved to alias or index name.allowNoIndices
- whether to allow resolve to no indexincludeDataStreams
- Whether data streams should be included in the evaluation.- Returns:
- the write index obtained as a result of the index resolution or null if no index
- Throws:
IllegalArgumentException
- if the index resolution does not lead to an index, or leads to more than one index, as well as if a remote index is requested.
-
concreteWriteIndex
public Index concreteWriteIndex(ProjectMetadata project, IndicesOptions options, String index, boolean allowNoIndices, boolean includeDataStreams) Utility method that allows to resolve an index expression to its corresponding single write index.- Parameters:
project
- the project containing all the data to resolve to expression to a concrete indexoptions
- defines how the aliases or indices need to be resolved to concrete indicesindex
- index that can be resolved to alias or index name.allowNoIndices
- whether to allow resolve to no indexincludeDataStreams
- Whether data streams should be included in the evaluation.- Returns:
- the write index obtained as a result of the index resolution or null if no index
- Throws:
IllegalArgumentException
- if the index resolution does not lead to an index, or leads to more than one index, as well as if a remote index is requested.
-
hasIndexAbstraction
- Returns:
- whether the specified index, data stream or alias exists. If the data stream, index or alias contains date math then that is resolved too.
-
hasSelectorSuffix
- Returns:
- True if the provided expression contains the
::
character sequence.
-
hasSelector
-
splitSelectorExpression
- Returns:
- If the specified string is a selector expression then this method returns the base expression and its selector part.
-
combineSelector
public static String combineSelector(String baseExpression, @Nullable IndexComponentSelector selectorExpression) -
combineSelectorExpression
-
assertExpressionHasNullOrDataSelector
-
resolveExpressions
public Set<IndexNameExpressionResolver.ResolvedExpression> resolveExpressions(ProjectMetadata project, String... expressions) Resolve an array of expressions to the set of indices and aliases that these expressions match. -
resolveExpressions
public Set<IndexNameExpressionResolver.ResolvedExpression> resolveExpressions(ProjectMetadata project, IndicesOptions indicesOptions, boolean preserveDataStreams, String... expressions) Resolve the expression to the set of indices, aliases, and, optionally, datastreams that the expression matches. If istrue
, datastreams that are covered by the wildcards from the are returned as-is, without expanding them further to their respective backing indices. -
filteringAliases
public String[] filteringAliases(ProjectMetadata project, String index, Set<IndexNameExpressionResolver.ResolvedExpression> resolvedExpressions) Iterates through the list of indices and selects the effective list of filtering aliases for the given index.Only aliases with filters are returned. If the indices list contains a non-filtering reference to the index itself - null is returned. Returns
null
if no filtering is required. NOTE: The provided expressions must have been resolved already viaresolveExpressions(org.elasticsearch.cluster.metadata.ProjectMetadata, java.lang.String...)
. -
allIndexAliases
public String[] allIndexAliases(ProjectMetadata project, String index, Set<IndexNameExpressionResolver.ResolvedExpression> resolvedExpressions) Iterates through the list of indices and selects the effective list of all aliases for the given index. Aliases are returned even if the index is included in the resolved expressions. NOTE: The provided expressions must have been resolved already viaresolveExpressions(org.elasticsearch.cluster.metadata.ProjectMetadata, java.lang.String...)
. -
indexAliases
public String[] indexAliases(ProjectMetadata project, String index, Predicate<AliasMetadata> requiredAlias, BiPredicate<DataStreamAlias, Boolean> requiredDataStreamAlias, boolean skipIdentity, Set<IndexNameExpressionResolver.ResolvedExpression> resolvedExpressions) Iterates through the list of indices and selects the effective list of required aliases for the given index.Only aliases where the given predicate tests successfully are returned. If the indices list contains a non-required reference to the index itself - null is returned. Returns
null
if no filtering is required.NOTE: the provided expressions must have been resolved already via
resolveExpressions(org.elasticsearch.cluster.metadata.ProjectMetadata, java.lang.String...)
. -
resolveSearchRouting
public Map<String,Set<String>> resolveSearchRouting(ClusterState state, @Nullable String routing, String... expressions) Resolves the search routing if in the expression aliases are used. If expressions point to concrete indices or aliases with no routing defined the specified routing is used.- Returns:
- routing values grouped by concrete index
-
resolveSearchRouting
public Map<String,Set<String>> resolveSearchRouting(ProjectMetadata project, @Nullable String routing, String... expressions) Resolves the search routing if in the expression aliases are used. If expressions point to concrete indices or aliases with no routing defined the specified routing is used.- Returns:
- routing values grouped by concrete index
-
resolveSearchRoutingAllIndices
public static Map<String,Set<String>> resolveSearchRoutingAllIndices(ProjectMetadata project, String routing) Sets the same routing for all indices -
isAllIndicesExpression
public static boolean isAllIndicesExpression(Collection<IndexNameExpressionResolver.ResolvedExpression> aliasesOrIndices) Identifies whether the array containing index names given as argument refers to all indices The empty or null array identifies all indices- Parameters:
aliasesOrIndices
- the array containing index names- Returns:
- true if the provided array maps to all indices, false otherwise
-
isAllIndices
Identifies whether the array containing index names given as argument refers to all indices The empty or null array identifies all indices- Parameters:
aliasesOrIndices
- the array containing index names- Returns:
- true if the provided array maps to all indices, false otherwise
-
isAllIndices
public static <T> boolean isAllIndices(Collection<T> aliasesOrIndices, Function<T, String> resourceGetter) Identifies whether the array containing objects with index names given as argument refers to all indices The empty or null array identifies all indices- Type Parameters:
T
- any object that can contain an index expression in some form or another- Parameters:
aliasesOrIndices
- the array containing index namesresourceGetter
- allows for obtaining the index name from a generic object that contains an index expression- Returns:
- true if the provided array maps to all indices, false otherwise
-
isNoneExpression
Identifies if this expression list is *,-* which effectively means a request that requests no indices. -
getSystemIndexAccessLevel
- Returns:
- the system access level that will be applied in this resolution. See
SystemIndices.SystemIndexAccessLevel
for details.
-
getSystemIndexAccessPredicate
Determines the right predicate based on thegetSystemIndexAccessLevel()
. Specifically: - NONE implies no access to net-new system indices and data streams - BACKWARDS_COMPATIBLE_ONLY allows access also to net-new system resources - ALL allows access to everything - otherwise we fall back toSystemIndices.getProductSystemIndexNamePredicate(ThreadContext)
- Returns:
- the predicate that defines the access to system indices.
-
getSystemNameAutomaton
public org.apache.lucene.util.automaton.Automaton getSystemNameAutomaton() -
getNetNewSystemIndexPredicate
-
resolveDateMathExpression
- Returns:
- If the specified string is data math expression then this method returns the resolved expression.
-
resolveDateMathExpression
- Parameters:
time
- instant to consider when parsing the expression- Returns:
- If the specified string is data math expression then this method returns the resolved expression.
-