Package org.elasticsearch.index.query
Class SearchIndexNameMatcher
org.elasticsearch.index.query.SearchIndexNameMatcher
- All Implemented Interfaces:
<>
public class SearchIndexNameMatcher
extends
implements <>
A predicate that checks whether an index pattern matches the current search shard target.
-
Constructor Summary
ConstructorDescriptionindexName, clusterAlias, ClusterService clusterService, IndexNameExpressionResolver expressionResolver)
Creates a new index name matcher. -
Method Summary
Modifier and TypeMethodDescriptionboolean
pattern)
Given an index pattern, checks whether it matches against the current shard.Methods inherited from class java.lang.
, , , , , , , , , ,
Methods inherited from interface java.util.function.
, ,
-
Constructor Details
-
SearchIndexNameMatcher
public SearchIndexNameMatcher( indexName, 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 toRemoteClusterAware.LOCAL_CLUSTER_GROUP_KEY
.clusterService
- the cluster service.
-
-
Method Details
-
test
public boolean test( 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:
in interface
<>
-