41
41
import org .elasticsearch .search .fetch .ShardFetchSearchRequest ;
42
42
import org .elasticsearch .search .internal .InternalScrollSearchRequest ;
43
43
import org .elasticsearch .search .internal .ShardSearchRequest ;
44
- import org .elasticsearch .search .internal .ShardSearchTransportRequest ;
45
44
import org .elasticsearch .search .query .QuerySearchRequest ;
46
45
import org .elasticsearch .search .query .QuerySearchResult ;
47
46
import org .elasticsearch .search .query .ScrollQuerySearchResult ;
@@ -109,7 +108,7 @@ public void sendFreeContext(Transport.Connection connection, long contextId, fin
109
108
TransportRequestOptions .EMPTY , new ActionListenerResponseHandler <>(listener , SearchFreeContextResponse ::new ));
110
109
}
111
110
112
- public void sendCanMatch (Transport .Connection connection , final ShardSearchTransportRequest request , SearchTask task , final
111
+ public void sendCanMatch (Transport .Connection connection , final ShardSearchRequest request , SearchTask task , final
113
112
ActionListener <SearchService .CanMatchResponse > listener ) {
114
113
transportService .sendChildRequest (connection , QUERY_CAN_MATCH_NAME , request , task ,
115
114
TransportRequestOptions .EMPTY , new ActionListenerResponseHandler <>(listener , SearchService .CanMatchResponse ::new ));
@@ -120,13 +119,13 @@ public void sendClearAllScrollContexts(Transport.Connection connection, final Ac
120
119
TransportRequestOptions .EMPTY , new ActionListenerResponseHandler <>(listener , (in ) -> TransportResponse .Empty .INSTANCE ));
121
120
}
122
121
123
- public void sendExecuteDfs (Transport .Connection connection , final ShardSearchTransportRequest request , SearchTask task ,
122
+ public void sendExecuteDfs (Transport .Connection connection , final ShardSearchRequest request , SearchTask task ,
124
123
final SearchActionListener <DfsSearchResult > listener ) {
125
124
transportService .sendChildRequest (connection , DFS_ACTION_NAME , request , task ,
126
125
new ConnectionCountingHandler <>(listener , DfsSearchResult ::new , clientConnections , connection .getNode ().getId ()));
127
126
}
128
127
129
- public void sendExecuteQuery (Transport .Connection connection , final ShardSearchTransportRequest request , SearchTask task ,
128
+ public void sendExecuteQuery (Transport .Connection connection , final ShardSearchRequest request , SearchTask task ,
130
129
final SearchActionListener <SearchPhaseResult > listener ) {
131
130
// we optimize this and expect a QueryFetchSearchResult if we only have a single shard in the search request
132
131
// this used to be the QUERY_AND_FETCH which doesn't exist anymore.
@@ -306,7 +305,7 @@ public static void registerRequestHandler(TransportService transportService, Sea
306
305
TransportActionProxy .registerProxyAction (transportService , CLEAR_SCROLL_CONTEXTS_ACTION_NAME ,
307
306
(in ) -> TransportResponse .Empty .INSTANCE );
308
307
309
- transportService .registerRequestHandler (DFS_ACTION_NAME , ThreadPool .Names .SAME , ShardSearchTransportRequest ::new ,
308
+ transportService .registerRequestHandler (DFS_ACTION_NAME , ThreadPool .Names .SAME , ShardSearchRequest ::new ,
310
309
(request , channel , task ) -> {
311
310
searchService .executeDfsPhase (request , (SearchTask ) task , new ActionListener <SearchPhaseResult >() {
312
311
@ Override
@@ -330,7 +329,7 @@ public void onFailure(Exception e) {
330
329
});
331
330
TransportActionProxy .registerProxyAction (transportService , DFS_ACTION_NAME , DfsSearchResult ::new );
332
331
333
- transportService .registerRequestHandler (QUERY_ACTION_NAME , ThreadPool .Names .SAME , ShardSearchTransportRequest ::new ,
332
+ transportService .registerRequestHandler (QUERY_ACTION_NAME , ThreadPool .Names .SAME , ShardSearchRequest ::new ,
334
333
(request , channel , task ) -> {
335
334
searchService .executeQueryPhase (request , (SearchTask ) task , new ChannelActionListener <>(
336
335
channel , QUERY_ACTION_NAME , request ));
@@ -374,7 +373,7 @@ public void onFailure(Exception e) {
374
373
TransportActionProxy .registerProxyAction (transportService , FETCH_ID_ACTION_NAME , FetchSearchResult ::new );
375
374
376
375
// this is cheap, it does not fetch during the rewrite phase, so we can let it quickly execute on a networking thread
377
- transportService .registerRequestHandler (QUERY_CAN_MATCH_NAME , ThreadPool .Names .SAME , ShardSearchTransportRequest ::new ,
376
+ transportService .registerRequestHandler (QUERY_CAN_MATCH_NAME , ThreadPool .Names .SAME , ShardSearchRequest ::new ,
378
377
(request , channel , task ) -> {
379
378
searchService .canMatch (request , new ChannelActionListener <>(channel , QUERY_CAN_MATCH_NAME , request ));
380
379
});
0 commit comments