Skip to content

Commit

Permalink
Removing unused method from TransportSearchAction (#3437)
Browse files Browse the repository at this point in the history
* Removing unused method from TransportSearchAction

Signed-off-by: Ankit Jain <[email protected]>
(cherry picked from commit 1e6dd56)
  • Loading branch information
jainankitk authored and github-actions[bot] committed May 26, 2022
1 parent e88eaf6 commit 10a70dd
Showing 1 changed file with 0 additions and 76 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
import org.opensearch.common.settings.Setting;
import org.opensearch.common.settings.Setting.Property;
import org.opensearch.common.unit.TimeValue;
import org.opensearch.common.util.concurrent.AtomicArray;
import org.opensearch.common.util.concurrent.CountDown;
import org.opensearch.index.Index;
import org.opensearch.index.query.Rewriteable;
Expand Down Expand Up @@ -298,81 +297,6 @@ void executeOnShardTarget(
);
}

public void executeRequest(
Task task,
SearchRequest searchRequest,
String actionName,
boolean includeSearchContext,
SinglePhaseSearchAction phaseSearchAction,
ActionListener<SearchResponse> listener
) {
executeRequest(task, searchRequest, new SearchAsyncActionProvider() {
@Override
public AbstractSearchAsyncAction<? extends SearchPhaseResult> asyncSearchAction(
SearchTask task,
SearchRequest searchRequest,
Executor executor,
GroupShardsIterator<SearchShardIterator> shardsIts,
SearchTimeProvider timeProvider,
BiFunction<String, String, Transport.Connection> connectionLookup,
ClusterState clusterState,
Map<String, AliasFilter> aliasFilter,
Map<String, Float> concreteIndexBoosts,
Map<String, Set<String>> indexRoutings,
ActionListener<SearchResponse> listener,
boolean preFilter,
ThreadPool threadPool,
SearchResponse.Clusters clusters
) {
return new AbstractSearchAsyncAction<SearchPhaseResult>(
actionName,
logger,
searchTransportService,
connectionLookup,
aliasFilter,
concreteIndexBoosts,
indexRoutings,
executor,
searchRequest,
listener,
shardsIts,
timeProvider,
clusterState,
task,
new ArraySearchPhaseResults<>(shardsIts.size()),
searchRequest.getMaxConcurrentShardRequests(),
clusters
) {
@Override
protected void executePhaseOnShard(
SearchShardIterator shardIt,
SearchShardTarget shard,
SearchActionListener<SearchPhaseResult> listener
) {
final Transport.Connection connection = getConnection(shard.getClusterAlias(), shard.getNodeId());
phaseSearchAction.executeOnShardTarget(task, shard, connection, listener);
}

@Override
protected SearchPhase getNextPhase(SearchPhaseResults<SearchPhaseResult> results, SearchPhaseContext context) {
return new SearchPhase(getName()) {
@Override
public void run() {
final AtomicArray<SearchPhaseResult> atomicArray = results.getAtomicArray();
sendSearchResponse(InternalSearchResponse.empty(), atomicArray);
}
};
}

@Override
boolean buildPointInTimeFromSearchResults() {
return includeSearchContext;
}
};
}
}, listener);
}

private void executeRequest(
Task task,
SearchRequest searchRequest,
Expand Down

0 comments on commit 10a70dd

Please sign in to comment.