java.lang.Object
org.elasticsearch.action.ResolvedIndices
Container for information about results of the resolution of index expression.
Contains local indices, map of remote indices and metadata.
-
Method Summary
Modifier and TypeMethodDescriptionIndex[]
Get the concrete local cluster indices.Get metadata for concrete local cluster indices.Get the local cluster indices.Get the remote cluster indices, structured as a map where the key is the remote cluster alias.Get the search context ID.static ResolvedIndices
resolveWithIndexNamesAndOptions
(String[] indexNames, IndicesOptions indicesOptions, ClusterState clusterState, IndexNameExpressionResolver indexNameExpressionResolver, RemoteClusterService remoteClusterService, long startTimeInMillis) static ResolvedIndices
resolveWithIndicesRequest
(IndicesRequest request, ClusterState clusterState, IndexNameExpressionResolver indexNameExpressionResolver, RemoteClusterService remoteClusterService, long startTimeInMillis) Create a newResolvedIndices
instance from anIndicesRequest
.static ResolvedIndices
resolveWithPIT
(PointInTimeBuilder pit, IndicesOptions indicesOptions, ClusterState clusterState, NamedWriteableRegistry namedWriteableRegistry) Create a newResolvedIndices
instance from aPointInTimeBuilder
.
-
Method Details
-
getRemoteClusterIndices
Get the remote cluster indices, structured as a map where the key is the remote cluster alias.
NOTE: The returned indices are *not* guaranteed to be concrete indices that exist. In addition to simple concrete index names, returned index names can be any combination of the following:- Aliases
- Wildcards
- Invalid index/alias names
- Returns:
- The remote cluster indices map
-
getLocalIndices
Get the local cluster indices. If the returned value is null, no local cluster indices are referenced. If the returned value is anOriginalIndices
instance with an empty or nullOriginalIndices.indices()
array, potentially all local cluster indices are referenced, depending on ifOriginalIndices.indicesOptions()
is configured to expand wildcards.
NOTE: The returned indices are *not* guaranteed to be concrete indices that exist. In addition to simple concrete index names, returned index names can be any combination of the following:- Aliases
- Wildcards
- Invalid index/alias names
- Returns:
- The local cluster indices
-
getConcreteLocalIndicesMetadata
Get metadata for concrete local cluster indices. All indices returned are guaranteed to be concrete indices that exist.- Returns:
- Metadata for concrete local cluster indices
-
getConcreteLocalIndices
Get the concrete local cluster indices. All indices returned are guaranteed to be concrete indices that exist.- Returns:
- The concrete local cluster indices
-
getSearchContextId
Get the search context ID. Returns a non-null value only when the instance is created usingresolveWithPIT(PointInTimeBuilder, IndicesOptions, ClusterState, NamedWriteableRegistry)
.- Returns:
- The search context ID
-
resolveWithIndicesRequest
public static ResolvedIndices resolveWithIndicesRequest(IndicesRequest request, ClusterState clusterState, IndexNameExpressionResolver indexNameExpressionResolver, RemoteClusterService remoteClusterService, long startTimeInMillis) Create a newResolvedIndices
instance from anIndicesRequest
.- Parameters:
request
- The indices requestclusterState
- The cluster stateindexNameExpressionResolver
- The index name expression resolver used to resolve concrete local indicesremoteClusterService
- The remote cluster service used to group remote cluster indicesstartTimeInMillis
- The request start time in milliseconds- Returns:
- a new
ResolvedIndices
instance
-
resolveWithIndexNamesAndOptions
public static ResolvedIndices resolveWithIndexNamesAndOptions(String[] indexNames, IndicesOptions indicesOptions, ClusterState clusterState, IndexNameExpressionResolver indexNameExpressionResolver, RemoteClusterService remoteClusterService, long startTimeInMillis) -
resolveWithPIT
public static ResolvedIndices resolveWithPIT(PointInTimeBuilder pit, IndicesOptions indicesOptions, ClusterState clusterState, NamedWriteableRegistry namedWriteableRegistry) Create a newResolvedIndices
instance from aPointInTimeBuilder
.- Parameters:
pit
- The point-in-time builderindicesOptions
- The indices options to propagate to the newResolvedIndices
instanceclusterState
- The cluster statenamedWriteableRegistry
- The named writeable registry used to decode the search context ID- Returns:
- a new
ResolvedIndices
instance
-