Interface ShardSearchRequest
-
- All Known Implementing Classes:
ShardSearchLocalRequest
,ShardSearchTransportRequest
public interface ShardSearchRequest
Shard level request that represents a search. It provides all the methods that theSearchContext
needs. 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.Boolean
allowPartialSearchResults()
BytesReference
cacheKey()
Returns the cache key for this shard search request, based on its contentAliasFilter
getAliasFilter()
java.lang.String
getClusterAlias()
Returns the cluster alias in case the request is part of a cross-cluster search request,null
otherwise.Rewriteable<Rewriteable>
getRewriteable()
float
indexBoost()
java.lang.String[]
indexRoutings()
Returns the routing values resolved by the coordinating node for the index pointed byshardId()
.boolean
isProfile()
Returns true if this shard search is being profiled or notlong
nowInMillis()
int
numberOfShards()
static QueryBuilder
parseAliasFilter(CheckedFunction<byte[],QueryBuilder,java.io.IOException> filterParser, IndexMetaData metaData, java.lang.String... aliasNames)
Returns the filter associated with listed filtering aliases.java.lang.String
preference()
Returns the preference of the originalSearchRequest.preference()
.java.lang.Boolean
requestCache()
Scroll
scroll()
SearchType
searchType()
void
setAliasFilter(AliasFilter filter)
void
setProfile(boolean profile)
Sets if this shard search needs to be profiled or notShardId
shardId()
SearchSourceBuilder
source()
void
source(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
null
if 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,null
otherwise.
-
getRewriteable
Rewriteable<Rewriteable> getRewriteable()
-
-