ShardSearchRequest
public class ShardSearchLocalRequest extends java.lang.Object implements ShardSearchRequest
{ from : 0, size : 20, (optional, can be set on the request) sort : { "name.first" : {}, "name.last" : { reverse : true } } fields : [ "name.first", "name.last" ] query : { ... } aggs : { "agg1" : { terms : { ... } } } }
Constructor | Description |
---|---|
ShardSearchLocalRequest(ShardId shardId,
int numberOfShards,
SearchType searchType,
SearchSourceBuilder source,
java.lang.String[] types,
java.lang.Boolean requestCache,
AliasFilter aliasFilter,
float indexBoost,
boolean allowPartialSearchResults) |
|
ShardSearchLocalRequest(ShardId shardId,
java.lang.String[] types,
long nowInMillis,
AliasFilter aliasFilter) |
Modifier and Type | Method | Description |
---|---|---|
java.lang.Boolean |
allowPartialSearchResults() |
|
BytesReference |
cacheKey() |
Returns the cache key for this shard search request, based on its content
|
AliasFilter |
getAliasFilter() |
|
java.lang.String |
getClusterAlias() |
Returns the cluster alias if this request is for a remote cluster or
null if the request if targeted to the local
cluster. |
Rewriteable<Rewriteable> |
getRewriteable() |
|
float |
indexBoost() |
|
protected void |
innerReadFrom(StreamInput in) |
|
protected void |
innerWriteTo(StreamOutput out,
boolean asKey) |
|
boolean |
isProfile() |
Returns true if this shard search is being profiled or not
|
long |
nowInMillis() |
|
int |
numberOfShards() |
|
java.lang.Boolean |
requestCache() |
|
Scroll |
scroll() |
|
SearchType |
searchType() |
|
void |
setAliasFilter(AliasFilter aliasFilter) |
|
void |
setProfile(boolean profile) |
Sets if this shard search needs to be profiled or not
|
ShardId |
shardId() |
|
SearchSourceBuilder |
source() |
|
void |
source(SearchSourceBuilder source) |
|
java.lang.String[] |
types() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public ShardSearchLocalRequest(ShardId shardId, java.lang.String[] types, long nowInMillis, AliasFilter aliasFilter)
public ShardSearchLocalRequest(ShardId shardId, int numberOfShards, SearchType searchType, SearchSourceBuilder source, java.lang.String[] types, java.lang.Boolean requestCache, AliasFilter aliasFilter, float indexBoost, boolean allowPartialSearchResults)
public ShardId shardId()
shardId
in interface ShardSearchRequest
public java.lang.String[] types()
types
in interface ShardSearchRequest
public SearchSourceBuilder source()
source
in interface ShardSearchRequest
public AliasFilter getAliasFilter()
getAliasFilter
in interface ShardSearchRequest
public void setAliasFilter(AliasFilter aliasFilter)
setAliasFilter
in interface ShardSearchRequest
public void source(SearchSourceBuilder source)
source
in interface ShardSearchRequest
public int numberOfShards()
numberOfShards
in interface ShardSearchRequest
public SearchType searchType()
searchType
in interface ShardSearchRequest
public float indexBoost()
indexBoost
in interface ShardSearchRequest
public long nowInMillis()
nowInMillis
in interface ShardSearchRequest
public java.lang.Boolean requestCache()
requestCache
in interface ShardSearchRequest
public java.lang.Boolean allowPartialSearchResults()
allowPartialSearchResults
in interface ShardSearchRequest
public Scroll scroll()
scroll
in interface ShardSearchRequest
public void setProfile(boolean profile)
ShardSearchRequest
setProfile
in interface ShardSearchRequest
profile
- True if the shard should be profiledpublic boolean isProfile()
ShardSearchRequest
isProfile
in interface ShardSearchRequest
protected void innerReadFrom(StreamInput in) throws java.io.IOException
java.io.IOException
protected void innerWriteTo(StreamOutput out, boolean asKey) throws java.io.IOException
java.io.IOException
public BytesReference cacheKey() throws java.io.IOException
ShardSearchRequest
cacheKey
in interface ShardSearchRequest
java.io.IOException
public java.lang.String getClusterAlias()
ShardSearchRequest
null
if the request if targeted to the local
cluster.getClusterAlias
in interface ShardSearchRequest
public Rewriteable<Rewriteable> getRewriteable()
getRewriteable
in interface ShardSearchRequest