Interface ShardSearchRequest
-
- All Known Implementing Classes:
ShardSearchLocalRequest,ShardSearchTransportRequest
public interface ShardSearchRequestShard level request that represents a search. It provides all the methods that theSearchContextneeds. Provides a cache key based on its content that can be used to cache shard level response.
-
-
Method Summary
Modifier and Type Method Description java.lang.BooleanallowPartialSearchResults()BytesReferencecacheKey()Returns the cache key for this shard search request, based on its contentAliasFiltergetAliasFilter()java.lang.StringgetClusterAlias()Returns the cluster alias in case the request is part of a cross-cluster search request,nullotherwise.Rewriteable<Rewriteable>getRewriteable()floatindexBoost()java.lang.String[]indexRoutings()Returns the routing values resolved by the coordinating node for the index pointed byshardId().booleanisProfile()Returns true if this shard search is being profiled or notlongnowInMillis()intnumberOfShards()static QueryBuilderparseAliasFilter(CheckedFunction<byte[],QueryBuilder,java.io.IOException> filterParser, IndexMetaData metaData, java.lang.String... aliasNames)Returns the filter associated with listed filtering aliases.java.lang.Stringpreference()Returns the preference of the originalSearchRequest.preference().java.lang.BooleanrequestCache()Scrollscroll()SearchTypesearchType()voidsetAliasFilter(AliasFilter filter)voidsetProfile(boolean profile)Sets if this shard search needs to be profiled or notShardIdshardId()SearchSourceBuildersource()voidsource(SearchSourceBuilder source)java.lang.String[]types()
-
-
-
Method Detail
-
shardId
ShardId shardId()
-
types
java.lang.String[] types()
-
source
SearchSourceBuilder source()
-
getAliasFilter
AliasFilter getAliasFilter()
-
setAliasFilter
void setAliasFilter(AliasFilter filter)
-
source
void source(SearchSourceBuilder source)
-
numberOfShards
int numberOfShards()
-
searchType
SearchType searchType()
-
indexBoost
float indexBoost()
-
nowInMillis
long nowInMillis()
-
requestCache
java.lang.Boolean requestCache()
-
allowPartialSearchResults
java.lang.Boolean allowPartialSearchResults()
-
scroll
Scroll scroll()
-
indexRoutings
java.lang.String[] indexRoutings()
Returns the routing values resolved by the coordinating node for the index pointed byshardId().
-
preference
java.lang.String preference()
Returns the preference of the originalSearchRequest.preference().
-
setProfile
void setProfile(boolean profile)
Sets if this shard search needs to be profiled or not- Parameters:
profile- True if the shard should be profiled
-
isProfile
boolean isProfile()
Returns true if this shard search is being profiled or not
-
cacheKey
BytesReference cacheKey() throws java.io.IOException
Returns the cache key for this shard search request, based on its content- Throws:
java.io.IOException
-
parseAliasFilter
static QueryBuilder parseAliasFilter(CheckedFunction<byte[],QueryBuilder,java.io.IOException> filterParser, IndexMetaData metaData, java.lang.String... aliasNames)
Returns the filter associated with listed filtering aliases.The list of filtering aliases should be obtained by calling MetaData.filteringAliases. Returns
nullif no filtering is required.
-
getClusterAlias
@Nullable java.lang.String getClusterAlias()
Returns the cluster alias in case the request is part of a cross-cluster search request,nullotherwise.
-
getRewriteable
Rewriteable<Rewriteable> getRewriteable()
-
-