Package org.elasticsearch.action.search
Class SearchTransportService
java.lang.Object
org.elasticsearch.action.search.SearchTransportService
An encapsulation of
SearchService
operations exposed through
transport.-
Nested Class Summary
-
Field Summary
-
Constructor Summary
ConstructorDescriptionSearchTransportService(TransportService transportService, NodeClient client, BiFunction<Transport.Connection,org.elasticsearch.action.search.SearchActionListener,ActionListener> responseWrapper)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
cancelSearchTask(SearchTask task, String reason)
getConnection(String clusterAlias, DiscoveryNode node)
Returns a connection to the given node on the provided cluster.Return a map of nodeId to pending number of search requests.static void
registerRequestHandler(TransportService transportService, SearchService searchService)
void
sendCanMatch(Transport.Connection connection, ShardSearchRequest request, SearchTask task, ActionListener<SearchService.CanMatchResponse> listener)
void
sendClearAllScrollContexts(Transport.Connection connection, ActionListener<TransportResponse> listener)
void
sendExecuteDfs(Transport.Connection connection, ShardSearchRequest request, SearchTask task, org.elasticsearch.action.search.SearchActionListener<DfsSearchResult> listener)
void
sendExecuteFetch(Transport.Connection connection, ShardFetchSearchRequest request, SearchTask task, org.elasticsearch.action.search.SearchActionListener<FetchSearchResult> listener)
void
sendExecuteFetchScroll(Transport.Connection connection, ShardFetchRequest request, SearchTask task, org.elasticsearch.action.search.SearchActionListener<FetchSearchResult> listener)
void
sendExecuteQuery(Transport.Connection connection, ShardSearchRequest request, SearchTask task, org.elasticsearch.action.search.SearchActionListener<SearchPhaseResult> listener)
void
sendExecuteQuery(Transport.Connection connection, QuerySearchRequest request, SearchTask task, org.elasticsearch.action.search.SearchActionListener<QuerySearchResult> listener)
void
sendExecuteScrollFetch(Transport.Connection connection, InternalScrollSearchRequest request, SearchTask task, org.elasticsearch.action.search.SearchActionListener<ScrollQueryFetchSearchResult> listener)
void
sendExecuteScrollQuery(Transport.Connection connection, InternalScrollSearchRequest request, SearchTask task, org.elasticsearch.action.search.SearchActionListener<ScrollQuerySearchResult> listener)
void
sendFreeContext(Transport.Connection connection, ShardSearchContextId contextId, ActionListener<SearchTransportService.SearchFreeContextResponse> listener)
void
sendFreeContext(Transport.Connection connection, ShardSearchContextId contextId, OriginalIndices originalIndices)
-
Field Details
-
FREE_CONTEXT_SCROLL_ACTION_NAME
- See Also:
- Constant Field Values
-
FREE_CONTEXT_ACTION_NAME
- See Also:
- Constant Field Values
-
CLEAR_SCROLL_CONTEXTS_ACTION_NAME
- See Also:
- Constant Field Values
-
DFS_ACTION_NAME
- See Also:
- Constant Field Values
-
QUERY_ACTION_NAME
- See Also:
- Constant Field Values
-
QUERY_ID_ACTION_NAME
- See Also:
- Constant Field Values
-
QUERY_SCROLL_ACTION_NAME
- See Also:
- Constant Field Values
-
QUERY_FETCH_SCROLL_ACTION_NAME
- See Also:
- Constant Field Values
-
FETCH_ID_SCROLL_ACTION_NAME
- See Also:
- Constant Field Values
-
FETCH_ID_ACTION_NAME
- See Also:
- Constant Field Values
-
QUERY_CAN_MATCH_NAME
- See Also:
- Constant Field Values
-
-
Constructor Details
-
SearchTransportService
public SearchTransportService(TransportService transportService, NodeClient client, BiFunction<Transport.Connection,org.elasticsearch.action.search.SearchActionListener,ActionListener> responseWrapper)
-
-
Method Details
-
sendFreeContext
public void sendFreeContext(Transport.Connection connection, ShardSearchContextId contextId, OriginalIndices originalIndices) -
sendFreeContext
public void sendFreeContext(Transport.Connection connection, ShardSearchContextId contextId, ActionListener<SearchTransportService.SearchFreeContextResponse> listener) -
sendCanMatch
public void sendCanMatch(Transport.Connection connection, ShardSearchRequest request, SearchTask task, ActionListener<SearchService.CanMatchResponse> listener) -
sendClearAllScrollContexts
public void sendClearAllScrollContexts(Transport.Connection connection, ActionListener<TransportResponse> listener) -
sendExecuteDfs
public void sendExecuteDfs(Transport.Connection connection, ShardSearchRequest request, SearchTask task, org.elasticsearch.action.search.SearchActionListener<DfsSearchResult> listener) -
sendExecuteQuery
public void sendExecuteQuery(Transport.Connection connection, ShardSearchRequest request, SearchTask task, org.elasticsearch.action.search.SearchActionListener<SearchPhaseResult> listener) -
sendExecuteQuery
public void sendExecuteQuery(Transport.Connection connection, QuerySearchRequest request, SearchTask task, org.elasticsearch.action.search.SearchActionListener<QuerySearchResult> listener) -
sendExecuteScrollQuery
public void sendExecuteScrollQuery(Transport.Connection connection, InternalScrollSearchRequest request, SearchTask task, org.elasticsearch.action.search.SearchActionListener<ScrollQuerySearchResult> listener) -
sendExecuteScrollFetch
public void sendExecuteScrollFetch(Transport.Connection connection, InternalScrollSearchRequest request, SearchTask task, org.elasticsearch.action.search.SearchActionListener<ScrollQueryFetchSearchResult> listener) -
sendExecuteFetch
public void sendExecuteFetch(Transport.Connection connection, ShardFetchSearchRequest request, SearchTask task, org.elasticsearch.action.search.SearchActionListener<FetchSearchResult> listener) -
sendExecuteFetchScroll
public void sendExecuteFetchScroll(Transport.Connection connection, ShardFetchRequest request, SearchTask task, org.elasticsearch.action.search.SearchActionListener<FetchSearchResult> listener) -
getRemoteClusterService
-
getPendingSearchRequests
Return a map of nodeId to pending number of search requests. This is a snapshot of the current pending search and not a live map. -
registerRequestHandler
public static void registerRequestHandler(TransportService transportService, SearchService searchService) -
getConnection
Returns a connection to the given node on the provided cluster. If the cluster alias isnull
the node will be resolved against the local cluster.- Parameters:
clusterAlias
- the cluster alias the node should be resolved againstnode
- the node to resolve- Returns:
- a connection to the given node belonging to the cluster with the provided alias.
-
cancelSearchTask
-
getNamedWriteableRegistry
-