Module org.elasticsearch.server
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
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final StringPart of DFS_QUERY_THEN_FETCH, which fetches distributed term frequencies and executes KNN.static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringThe Can-Match phase.static final Stringstatic final StringPart of DFS_QUERY_THEN_FETCH, which fetches distributed term frequencies and executes KNN.static final Stringstatic final String -
Constructor Summary
ConstructorsConstructorDescriptionSearchTransportService(TransportService transportService, NodeClient client, BiFunction<Transport.Connection, ActionListener<? super SearchPhaseResult>, ActionListener<? super SearchPhaseResult>> responseWrapper) -
Method Summary
Modifier and TypeMethodDescriptionvoidcancelSearchTask(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 voidregisterRequestHandler(TransportService transportService, SearchService searchService) voidsendCanMatch(Transport.Connection connection, CanMatchNodeRequest request, SearchTask task, ActionListener<CanMatchNodeResponse> listener) voidsendClearAllScrollContexts(Transport.Connection connection, ActionListener<TransportResponse> listener) voidsendExecuteDfs(Transport.Connection connection, ShardSearchRequest request, SearchTask task, ActionListener<DfsSearchResult> listener) voidsendExecuteFetch(Transport.Connection connection, ShardFetchSearchRequest request, SearchTask task, ActionListener<FetchSearchResult> listener) voidsendExecuteFetchScroll(Transport.Connection connection, ShardFetchRequest request, SearchTask task, ActionListener<FetchSearchResult> listener) voidsendExecuteQuery(Transport.Connection connection, ShardSearchRequest request, SearchTask task, ActionListener<SearchPhaseResult> listener) voidsendExecuteQuery(Transport.Connection connection, QuerySearchRequest request, SearchTask task, ActionListener<QuerySearchResult> listener) voidsendExecuteRankFeature(Transport.Connection connection, RankFeatureShardRequest request, SearchTask task, ActionListener<RankFeatureResult> listener) voidsendExecuteScrollFetch(Transport.Connection connection, InternalScrollSearchRequest request, SearchTask task, ActionListener<ScrollQueryFetchSearchResult> listener) voidsendExecuteScrollQuery(Transport.Connection connection, InternalScrollSearchRequest request, SearchTask task, ActionListener<ScrollQuerySearchResult> listener) voidsendFreeContext(Transport.Connection connection, ShardSearchContextId contextId, ActionListener<SearchTransportService.SearchFreeContextResponse> listener)
-
Field Details
-
FREE_CONTEXT_SCROLL_ACTION_NAME
- See Also:
-
FREE_CONTEXT_ACTION_NAME
- See Also:
-
CLEAR_SCROLL_CONTEXTS_ACTION_NAME
- See Also:
-
DFS_ACTION_NAME
Part of DFS_QUERY_THEN_FETCH, which fetches distributed term frequencies and executes KNN.- See Also:
-
QUERY_ACTION_NAME
- See Also:
-
QUERY_ID_ACTION_NAME
Part of DFS_QUERY_THEN_FETCH, which fetches distributed term frequencies and executes KNN.- See Also:
-
QUERY_SCROLL_ACTION_NAME
- See Also:
-
QUERY_FETCH_SCROLL_ACTION_NAME
- See Also:
-
FETCH_ID_SCROLL_ACTION_NAME
- See Also:
-
FETCH_ID_ACTION_NAME
- See Also:
-
RANK_FEATURE_SHARD_ACTION_NAME
- See Also:
-
QUERY_CAN_MATCH_NODE_NAME
The Can-Match phase. It is executed to pre-filter shards that a search request hits. It rewrites the query on the shard and checks whether the result of the rewrite matches no documents, in which case the shard can be filtered out.- See Also:
-
-
Constructor Details
-
SearchTransportService
public SearchTransportService(TransportService transportService, NodeClient client, BiFunction<Transport.Connection, ActionListener<? super SearchPhaseResult>, ActionListener<? super SearchPhaseResult>> responseWrapper)
-
-
Method Details
-
sendFreeContext
public void sendFreeContext(Transport.Connection connection, ShardSearchContextId contextId, ActionListener<SearchTransportService.SearchFreeContextResponse> listener) -
sendCanMatch
public void sendCanMatch(Transport.Connection connection, CanMatchNodeRequest request, SearchTask task, ActionListener<CanMatchNodeResponse> listener) -
sendClearAllScrollContexts
public void sendClearAllScrollContexts(Transport.Connection connection, ActionListener<TransportResponse> listener) -
sendExecuteDfs
public void sendExecuteDfs(Transport.Connection connection, ShardSearchRequest request, SearchTask task, ActionListener<DfsSearchResult> listener) -
sendExecuteQuery
public void sendExecuteQuery(Transport.Connection connection, ShardSearchRequest request, SearchTask task, ActionListener<SearchPhaseResult> listener) -
sendExecuteQuery
public void sendExecuteQuery(Transport.Connection connection, QuerySearchRequest request, SearchTask task, ActionListener<QuerySearchResult> listener) -
sendExecuteScrollQuery
public void sendExecuteScrollQuery(Transport.Connection connection, InternalScrollSearchRequest request, SearchTask task, ActionListener<ScrollQuerySearchResult> listener) -
sendExecuteRankFeature
public void sendExecuteRankFeature(Transport.Connection connection, RankFeatureShardRequest request, SearchTask task, ActionListener<RankFeatureResult> listener) -
sendExecuteScrollFetch
public void sendExecuteScrollFetch(Transport.Connection connection, InternalScrollSearchRequest request, SearchTask task, ActionListener<ScrollQueryFetchSearchResult> listener) -
sendExecuteFetch
public void sendExecuteFetch(Transport.Connection connection, ShardFetchSearchRequest request, SearchTask task, ActionListener<FetchSearchResult> listener) -
sendExecuteFetchScroll
public void sendExecuteFetchScroll(Transport.Connection connection, ShardFetchRequest request, SearchTask task, ActionListener<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 isnullthe 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
-