IndicesRequest
, Streamable
, Writeable
, ShardSearchRequest
, TaskAwareRequest
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.IndicesRequest.Replaceable
TransportRequest.Empty
Writeable.Reader<V>, Writeable.Writer<V>
Constructor | 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 | Description |
---|---|---|
java.lang.Boolean |
allowPartialSearchResults() |
|
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,
java.util.Map<java.lang.String,java.lang.String> headers) |
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setParentTask
remoteAddress, remoteAddress
getParentTask, setParentTask
public 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()
IndicesRequest
indices
in interface IndicesRequest
public IndicesOptions indicesOptions()
IndicesRequest
indicesOptions
in interface IndicesRequest
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 filter)
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 readFrom(StreamInput in) throws java.io.IOException
Streamable
readFrom
in interface Streamable
readFrom
in class TransportRequest
java.io.IOException
public void writeTo(StreamOutput out) throws java.io.IOException
Streamable
writeTo
in interface Streamable
writeTo
in interface Writeable
writeTo
in class TransportRequest
java.io.IOException
public BytesReference cacheKey() throws java.io.IOException
ShardSearchRequest
cacheKey
in interface ShardSearchRequest
java.io.IOException
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
public Task createTask(long id, java.lang.String type, java.lang.String action, TaskId parentTaskId, java.util.Map<java.lang.String,java.lang.String> headers)
TaskAwareRequest
createTask
in interface TaskAwareRequest
public java.lang.String getDescription()
TaskAwareRequest
getDescription
in interface TaskAwareRequest
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