public class ShardSearchLocalRequest extends ContextAndHeaderHolder 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 : { ... } } } }
headers
Constructor and Description |
---|
ShardSearchLocalRequest(ShardId shardId,
int numberOfShards,
SearchType searchType,
BytesReference source,
String[] types,
Boolean requestCache) |
ShardSearchLocalRequest(String[] types,
long nowInMillis) |
ShardSearchLocalRequest(String[] types,
long nowInMillis,
String[] filteringAliases) |
Modifier and Type | Method and Description |
---|---|
BytesReference |
cacheKey()
Returns the cache key for this shard search request, based on its content
|
BytesReference |
extraSource() |
String[] |
filteringAliases() |
String |
index() |
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() |
Boolean |
requestCache() |
Scroll |
scroll() |
SearchType |
searchType() |
void |
setProfile(boolean profile)
Sets if this shard search needs to be profiled or not
|
int |
shardId() |
BytesReference |
source() |
void |
source(BytesReference source) |
Template |
template() |
BytesReference |
templateSource() |
String[] |
types() |
contextSize, copyContextAndHeadersFrom, copyContextFrom, copyHeadersFrom, getContext, getFromContext, getFromContext, getHeader, getHeaders, hasHeader, hasInContext, isContextEmpty, putAllInContext, putHeader, putInContext
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
copyContextAndHeadersFrom
contextSize, copyContextFrom, getContext, getFromContext, getFromContext, hasInContext, isContextEmpty, putAllInContext, putInContext
copyHeadersFrom, getHeader, getHeaders, hasHeader, putHeader
public ShardSearchLocalRequest(String[] types, long nowInMillis)
public ShardSearchLocalRequest(String[] types, long nowInMillis, String[] filteringAliases)
public ShardSearchLocalRequest(ShardId shardId, int numberOfShards, SearchType searchType, BytesReference source, String[] types, Boolean requestCache)
public String index()
index
in interface ShardSearchRequest
public int shardId()
shardId
in interface ShardSearchRequest
public String[] types()
types
in interface ShardSearchRequest
public BytesReference source()
source
in interface ShardSearchRequest
public void source(BytesReference source)
source
in interface ShardSearchRequest
public BytesReference extraSource()
extraSource
in interface ShardSearchRequest
public int numberOfShards()
numberOfShards
in interface ShardSearchRequest
public SearchType searchType()
searchType
in interface ShardSearchRequest
public String[] filteringAliases()
filteringAliases
in interface ShardSearchRequest
public long nowInMillis()
nowInMillis
in interface ShardSearchRequest
public Template template()
template
in interface ShardSearchRequest
public BytesReference templateSource()
templateSource
in interface ShardSearchRequest
public Boolean requestCache()
requestCache
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 IOException
IOException
protected void innerWriteTo(StreamOutput out, boolean asKey) throws IOException
IOException
public BytesReference cacheKey() throws IOException
ShardSearchRequest
cacheKey
in interface ShardSearchRequest
IOException
Copyright © 2009–2016. All rights reserved.