public class ShardSearchTransportRequest extends TransportRequest implements ShardSearchRequest, IndicesRequest
ShardSearchLocalRequest
but gets sent over the transport and holds also the indices coming from the original request that generated it, plus its headers and context.TransportRequest.EmptyIndicesRequest.Replaceable| Constructor and Description |
|---|
ShardSearchTransportRequest() |
ShardSearchTransportRequest(OriginalIndices originalIndices,
SearchRequest searchRequest,
ShardId shardId,
int numberOfShards,
AliasFilter aliasFilter,
float indexBoost,
long nowInMillis,
java.lang.String clusterAlias) |
| Modifier and Type | Method and Description |
|---|---|
BytesReference |
cacheKey()
Returns the cache key for this shard search request, based on its content
|
Task |
createTask(long id,
java.lang.String type,
java.lang.String action,
TaskId parentTaskId)
Returns the task object that should be used to keep track of the processing of the request.
|
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. |
java.lang.String |
getDescription()
Returns optional description of the request to be displayed by the task manager
|
Rewriteable<Rewriteable> |
getRewriteable() |
float |
indexBoost() |
java.lang.String[] |
indices()
Returns the array of indices that the action relates to
|
IndicesOptions |
indicesOptions()
Returns the indices options used to resolve indices.
|
boolean |
isProfile()
Returns true if this shard search is being profiled or not
|
long |
nowInMillis() |
int |
numberOfShards() |
void |
readFrom(StreamInput in)
Set this object's fields from a StreamInput.
|
java.lang.Boolean |
requestCache() |
Scroll |
scroll() |
SearchType |
searchType() |
void |
searchType(SearchType searchType) |
void |
setAliasFilter(AliasFilter filter) |
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() |
void |
writeTo(StreamOutput out)
Write this object's fields to a StreamOutput.
|
getParentTask, setParentTaskremoteAddress, remoteAddressclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitparseAliasFiltersetParentTaskpublic ShardSearchTransportRequest()
public ShardSearchTransportRequest(OriginalIndices originalIndices, SearchRequest searchRequest, ShardId shardId, int numberOfShards, AliasFilter aliasFilter, float indexBoost, long nowInMillis, java.lang.String clusterAlias)
public void searchType(SearchType searchType)
public java.lang.String[] indices()
IndicesRequestindices in interface IndicesRequestpublic IndicesOptions indicesOptions()
IndicesRequestindicesOptions in interface IndicesRequestpublic ShardId shardId()
shardId in interface ShardSearchRequestpublic java.lang.String[] types()
types in interface ShardSearchRequestpublic SearchSourceBuilder source()
source in interface ShardSearchRequestpublic AliasFilter getAliasFilter()
getAliasFilter in interface ShardSearchRequestpublic void setAliasFilter(AliasFilter filter)
setAliasFilter in interface ShardSearchRequestpublic void source(SearchSourceBuilder source)
source in interface ShardSearchRequestpublic int numberOfShards()
numberOfShards in interface ShardSearchRequestpublic SearchType searchType()
searchType in interface ShardSearchRequestpublic float indexBoost()
indexBoost in interface ShardSearchRequestpublic long nowInMillis()
nowInMillis in interface ShardSearchRequestpublic java.lang.Boolean requestCache()
requestCache in interface ShardSearchRequestpublic Scroll scroll()
scroll in interface ShardSearchRequestpublic void readFrom(StreamInput in) throws java.io.IOException
StreamablereadFrom in interface StreamablereadFrom in class TransportRequestjava.io.IOExceptionpublic void writeTo(StreamOutput out) throws java.io.IOException
StreamablewriteTo in interface StreamablewriteTo in class TransportRequestjava.io.IOExceptionpublic BytesReference cacheKey() throws java.io.IOException
ShardSearchRequestcacheKey in interface ShardSearchRequestjava.io.IOExceptionpublic void setProfile(boolean profile)
ShardSearchRequestsetProfile in interface ShardSearchRequestprofile - True if the shard should be profiledpublic boolean isProfile()
ShardSearchRequestisProfile in interface ShardSearchRequestpublic Task createTask(long id, java.lang.String type, java.lang.String action, TaskId parentTaskId)
TaskAwareRequestcreateTask in interface TaskAwareRequestpublic java.lang.String getDescription()
TaskAwareRequestgetDescription in interface TaskAwareRequestpublic java.lang.String getClusterAlias()
ShardSearchRequestnull if the request if targeted to the local
cluster.getClusterAlias in interface ShardSearchRequestpublic Rewriteable<Rewriteable> getRewriteable()
getRewriteable in interface ShardSearchRequest