Class SearchIndexNameMatcher

java.lang.Object
org.elasticsearch.index.query.SearchIndexNameMatcher
All Implemented Interfaces:
java.util.function.Predicate<java.lang.String>

public class SearchIndexNameMatcher
extends java.lang.Object
implements java.util.function.Predicate<java.lang.String>
A predicate that checks whether an index pattern matches the current search shard target.
  • Constructor Summary

    Constructors
    Constructor Description
    SearchIndexNameMatcher​(java.lang.String indexName, java.lang.String clusterAlias, ClusterService clusterService, IndexNameExpressionResolver expressionResolver)
    Creates a new index name matcher.
  • Method Summary

    Modifier and Type Method Description
    boolean test​(java.lang.String pattern)
    Given an index pattern, checks whether it matches against the current shard.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface java.util.function.Predicate

    and, negate, or
  • Constructor Details

    • SearchIndexNameMatcher

      public SearchIndexNameMatcher​(java.lang.String indexName, java.lang.String clusterAlias, ClusterService clusterService, IndexNameExpressionResolver expressionResolver)
      Creates a new index name matcher.
      Parameters:
      indexName - he name of the local index.
      clusterAlias - the cluster alias of this search shard target. If it is a local target, the alias should be null or equal to RemoteClusterAware.LOCAL_CLUSTER_GROUP_KEY.
      clusterService - the cluster service.
  • Method Details

    • test

      public boolean test​(java.lang.String pattern)
      Given an index pattern, checks whether it matches against the current shard. If this shard represents a remote shard target, then in order to match the pattern contain the separator ':', and must match on both the cluster alias and index name.
      Specified by:
      test in interface java.util.function.Predicate<java.lang.String>