int depth=req.getParams().getInt("__higo_ms_depth__", 0);
HttpCommComponent comm = new HttpCommComponent(depth);
ShardRequest sreq = new ShardRequest();
sreq.params = new ModifiableSolrParams(rb.req.getParams());
for (SearchComponent c : components) {
c.modifyRequest(rb, c, sreq);
c.distributedProcess(rb);
}
sreq.responses = new ArrayList<ShardResponse>();
for (int i=0;i<scheduleInfo.shards.length;i++) {
ModifiableSolrParams params = new ModifiableSolrParams(sreq.params);
params.remove(ShardParams.SHARDS); // not a top-level request
params.remove("indent");
params.remove(ShardParams.PARTIONS);
params.remove(CommonParams.HEADER_ECHO_PARAMS);
params.set(ShardParams.IS_SHARD, true); // a sub (shard) request
if(scheduleInfo.partions!=null)
{
params.set(ShardParams.PARTIONS, scheduleInfo.partions);
}
if(scheduleInfo.hasSubShards)
{
params.set(ShardParams.SHARDS,scheduleInfo.subShards[i]);
}
// params.set(FacetParams.IS_SUB_SHARDS, true);
params.set(FacetParams.FACET_CROSS_OFFSET, 0);
params.set(FacetParams.FACET_CROSS_LIMIT, MdrillGroupBy.MAX_CROSS_ROWS);
params.remove(CommonParams.QT);
comm.submit( scheduleInfo,sreq, scheduleInfo.shards[i], params,depth);
}
while (true) {
ShardResponse srsp = comm.takeCompletedOrError();