Class ResolvedIndices

java.lang.Object
org.elasticsearch.action.ResolvedIndices

public class ResolvedIndices extends Object
Container for information about results of the resolution of index expression. Contains local indices, map of remote indices and metadata.
  • Method Details

    • getRemoteClusterIndices

      public Map<String,OriginalIndices> 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

      @Nullable public OriginalIndices getLocalIndices()
      Get the local cluster indices. If the returned value is null, no local cluster indices are referenced. If the returned value is an OriginalIndices instance with an empty or null OriginalIndices.indices() array, potentially all local cluster indices are referenced, depending on if OriginalIndices.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

      public Map<Index,IndexMetadata> 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

      public Index[] 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

      @Nullable public SearchContextId getSearchContextId()
      Get the search context ID. Returns a non-null value only when the instance is created using resolveWithPIT(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 new ResolvedIndices instance from an IndicesRequest.
      Parameters:
      request - The indices request
      clusterState - The cluster state
      indexNameExpressionResolver - The index name expression resolver used to resolve concrete local indices
      remoteClusterService - The remote cluster service used to group remote cluster indices
      startTimeInMillis - 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 new ResolvedIndices instance from a PointInTimeBuilder.
      Parameters:
      pit - The point-in-time builder
      indicesOptions - The indices options to propagate to the new ResolvedIndices instance
      clusterState - The cluster state
      namedWriteableRegistry - The named writeable registry used to decode the search context ID
      Returns:
      a new ResolvedIndices instance