Class ShardSearchTransportRequest
- java.lang.Object
-
- org.elasticsearch.transport.TransportMessage
-
- org.elasticsearch.transport.TransportRequest
-
- org.elasticsearch.search.internal.ShardSearchTransportRequest
-
- All Implemented Interfaces:
IndicesRequest,Streamable,Writeable,ShardSearchRequest,TaskAwareRequest
public class ShardSearchTransportRequest extends TransportRequest implements ShardSearchRequest, IndicesRequest
Shard level search request that represents an actual search sent from the coordinating node to the nodes holding the shards where the query needs to be executed. Holds the same info asShardSearchLocalRequestbut gets sent over the transport and holds also the indices coming from the original request that generated it, plus its headers and context.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.elasticsearch.transport.TransportRequest
TransportRequest.Empty
-
Nested classes/interfaces inherited from interface org.elasticsearch.action.IndicesRequest
IndicesRequest.Replaceable
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
-
Constructor Summary
Constructors Constructor Description ShardSearchTransportRequest(OriginalIndices originalIndices, SearchRequest searchRequest, ShardId shardId, int numberOfShards, AliasFilter aliasFilter, float indexBoost, long nowInMillis, java.lang.String clusterAlias, java.lang.String[] indexRoutings)ShardSearchTransportRequest(StreamInput in)
-
Method Summary
Modifier and Type Method Description booleanallowPartialSearchResults()BytesReferencecacheKey()Returns the cache key for this shard search request, based on its contentTaskcreateTask(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.AliasFiltergetAliasFilter()java.lang.StringgetClusterAlias()Returns the cluster alias in case the request is part of a cross-cluster search request,nullotherwise.java.lang.StringgetDescription()Returns optional description of the request to be displayed by the task managerRewriteable<Rewriteable>getRewriteable()floatindexBoost()java.lang.String[]indexRoutings()Returns the routing values resolved by the coordinating node for the index pointed byShardSearchRequest.shardId().java.lang.String[]indices()Returns the array of indices that the action relates toIndicesOptionsindicesOptions()Returns the indices options used to resolve indices.longnowInMillis()intnumberOfShards()java.lang.Stringpreference()Returns the preference of the originalSearchRequest.preference().voidreadFrom(StreamInput in)Set this object's fields from a StreamInput.java.lang.BooleanrequestCache()Scrollscroll()SearchTypesearchType()voidsetAliasFilter(AliasFilter filter)ShardIdshardId()SearchSourceBuildersource()voidsource(SearchSourceBuilder source)java.lang.String[]types()voidwriteTo(StreamOutput out)Write this object's fields to a StreamOutput.-
Methods inherited from class org.elasticsearch.transport.TransportRequest
getParentTask, setParentTask
-
Methods inherited from class org.elasticsearch.transport.TransportMessage
remoteAddress, remoteAddress
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.tasks.TaskAwareRequest
setParentTask
-
-
-
-
Constructor Detail
-
ShardSearchTransportRequest
public ShardSearchTransportRequest(OriginalIndices originalIndices, SearchRequest searchRequest, ShardId shardId, int numberOfShards, AliasFilter aliasFilter, float indexBoost, long nowInMillis, @Nullable java.lang.String clusterAlias, java.lang.String[] indexRoutings)
-
ShardSearchTransportRequest
public ShardSearchTransportRequest(StreamInput in) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
writeTo
public void writeTo(StreamOutput out) throws java.io.IOException
Description copied from interface:StreamableWrite this object's fields to a StreamOutput.- Specified by:
writeToin interfaceStreamable- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin classTransportRequest- Throws:
java.io.IOException
-
indices
public java.lang.String[] indices()
Description copied from interface:IndicesRequestReturns the array of indices that the action relates to- Specified by:
indicesin interfaceIndicesRequest
-
indicesOptions
public IndicesOptions indicesOptions()
Description copied from interface:IndicesRequestReturns the indices options used to resolve indices. They tell for instance whether a single index is accepted, whether an empty array will be converted to _all, and how wildcards will be expanded if needed.- Specified by:
indicesOptionsin interfaceIndicesRequest
-
shardId
public ShardId shardId()
- Specified by:
shardIdin interfaceShardSearchRequest
-
types
public java.lang.String[] types()
- Specified by:
typesin interfaceShardSearchRequest
-
source
public SearchSourceBuilder source()
- Specified by:
sourcein interfaceShardSearchRequest
-
getAliasFilter
public AliasFilter getAliasFilter()
- Specified by:
getAliasFilterin interfaceShardSearchRequest
-
setAliasFilter
public void setAliasFilter(AliasFilter filter)
- Specified by:
setAliasFilterin interfaceShardSearchRequest
-
source
public void source(SearchSourceBuilder source)
- Specified by:
sourcein interfaceShardSearchRequest
-
numberOfShards
public int numberOfShards()
- Specified by:
numberOfShardsin interfaceShardSearchRequest
-
searchType
public SearchType searchType()
- Specified by:
searchTypein interfaceShardSearchRequest
-
indexBoost
public float indexBoost()
- Specified by:
indexBoostin interfaceShardSearchRequest
-
nowInMillis
public long nowInMillis()
- Specified by:
nowInMillisin interfaceShardSearchRequest
-
requestCache
public java.lang.Boolean requestCache()
- Specified by:
requestCachein interfaceShardSearchRequest
-
allowPartialSearchResults
public boolean allowPartialSearchResults()
- Specified by:
allowPartialSearchResultsin interfaceShardSearchRequest
-
scroll
public Scroll scroll()
- Specified by:
scrollin interfaceShardSearchRequest
-
indexRoutings
public java.lang.String[] indexRoutings()
Description copied from interface:ShardSearchRequestReturns the routing values resolved by the coordinating node for the index pointed byShardSearchRequest.shardId().- Specified by:
indexRoutingsin interfaceShardSearchRequest
-
preference
public java.lang.String preference()
Description copied from interface:ShardSearchRequestReturns the preference of the originalSearchRequest.preference().- Specified by:
preferencein interfaceShardSearchRequest
-
readFrom
public void readFrom(StreamInput in) throws java.io.IOException
Description copied from interface:StreamableSet this object's fields from a StreamInput.- Specified by:
readFromin interfaceStreamable- Overrides:
readFromin classTransportRequest- Throws:
java.io.IOException
-
cacheKey
public BytesReference cacheKey() throws java.io.IOException
Description copied from interface:ShardSearchRequestReturns the cache key for this shard search request, based on its content- Specified by:
cacheKeyin interfaceShardSearchRequest- Throws:
java.io.IOException
-
createTask
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)
Description copied from interface:TaskAwareRequestReturns the task object that should be used to keep track of the processing of the request.- Specified by:
createTaskin interfaceTaskAwareRequest
-
getDescription
public java.lang.String getDescription()
Description copied from interface:TaskAwareRequestReturns optional description of the request to be displayed by the task manager- Specified by:
getDescriptionin interfaceTaskAwareRequest
-
getClusterAlias
public java.lang.String getClusterAlias()
Description copied from interface:ShardSearchRequestReturns the cluster alias in case the request is part of a cross-cluster search request,nullotherwise.- Specified by:
getClusterAliasin interfaceShardSearchRequest
-
getRewriteable
public Rewriteable<Rewriteable> getRewriteable()
- Specified by:
getRewriteablein interfaceShardSearchRequest
-
-