docs: @SuppressWarnings("unchecked")
    public void distributedProcess(ResponseBuilder rb,
        ComponentFields mtasFields) {
  
      if (mtasFields.doList) {
        // compute total from shards
        HashMap<String, HashMap<String, Integer>> listShardTotals = new HashMap<>();
        for (ShardRequest sreq : rb.finished) {
          if (sreq.params.getBool(MtasSolrSearchComponent.PARAM_MTAS, false)
              && sreq.params.getBool(PARAM_MTAS_LIST, false)) {
            for (ShardResponse response : sreq.responses) {
              NamedList<Object> result = response.getSolrResponse().getResponse();
              try {
                ArrayList<NamedList<Object>> data = (ArrayList<NamedList<Object>>) result
                    .findRecursive("mtas", NAME);
                if (data != null) {
                  for (NamedList<Object> dataItem : data) {
                    Object key = dataItem.get("key");
                    Object total = dataItem.get("total");
                    if ((key != null) && (key instanceof String)
                        && (total != null) && (total instanceof Integer)) {
                      if (!listShardTotals.containsKey(key)) {
                        listShardTotals.put((String) key,
                            new HashMap<String, Integer>());
                      }
                      HashMap<String, Integer> listShardTotal = listShardTotals
                          .get(key);
                      listShardTotal.put(response.getShard(), (Integer) total);
                    }
                  }
                }
              } catch (ClassCastException e) {
                log.debug(e);
              }
            }
          }
        }
        // compute shard requests
        HashMap<String, ModifiableSolrParams> shardRequests = new HashMap<>();
        int requestId = 0;
        for (String field : mtasFields.list.keySet()) {
          for (ComponentList list : mtasFields.list.get(field).listList) {
            requestId++;
            if (listShardTotals.containsKey(list.key) && (list.number > 0)) {
              Integer start = list.start;
              Integer number = list.number;
              HashMap<String, Integer> totals = listShardTotals.get(list.key);
              for (int i = 0; i < rb.shards.length; i++) {
                if (number < 0) {
                  break;
                }
                int subTotal = totals.get(rb.shards[i]);
                // System.out.println(i + " : " + rb.shards[i] + " : "
                // + totals.get(rb.shards[i]) + " - " + start + " " + number);
                if ((start >= 0) && (start < subTotal)) {
                  ModifiableSolrParams params;
                  if (!shardRequests.containsKey(rb.shards[i])) {
                    shardRequests.put(rb.shards[i], new ModifiableSolrParams());
                  }
                  params = shardRequests.get(rb.shards[i]);
                  params.add(PARAM_MTAS_LIST + "." + requestId + "."
                      + NAME_MTAS_LIST_FIELD, list.field);
                  params.add(PARAM_MTAS_LIST + "." + requestId + "."
                      + NAME_MTAS_LIST_QUERY_VALUE, list.queryValue);
                  params.add(PARAM_MTAS_LIST + "." + requestId + "."
                      + NAME_MTAS_LIST_QUERY_TYPE, list.queryType);
                  params.add(PARAM_MTAS_LIST + "." + requestId + "."
                      + NAME_MTAS_LIST_QUERY_PREFIX, list.queryPrefix);
                  params.add(PARAM_MTAS_LIST + "." + requestId + "."
                      + NAME_MTAS_LIST_QUERY_IGNORE, list.queryIgnore);
                  params.add(
                      PARAM_MTAS_LIST + "." + requestId + "."
                          + NAME_MTAS_LIST_QUERY_MAXIMUM_IGNORE_LENGTH,
                      list.queryMaximumIgnoreLength);
                  int subRequestId = 0;
                  for (String name : list.queryVariables.keySet()) {
                    if (list.queryVariables.get(name) == null
                        || list.queryVariables.get(name).length == 0) {
                      params.add(
                          PARAM_MTAS_LIST + "." + requestId + "."
                              + NAME_MTAS_LIST_QUERY_VARIABLE + "." + subRequestId
                              + "." + SUBNAME_MTAS_LIST_QUERY_VARIABLE_NAME,
                          name);
                      subRequestId++;
                    } else {
                      for (String value : list.queryVariables.get(name)) {
                        params.add(PARAM_MTAS_LIST + "." + requestId + "."
                            + NAME_MTAS_LIST_QUERY_VARIABLE + "." + subRequestId
                            + "." + SUBNAME_MTAS_LIST_QUERY_VARIABLE_NAME, name);
                        params.add(PARAM_MTAS_LIST + "." + requestId + "."
                            + NAME_MTAS_LIST_QUERY_VARIABLE + "." + subRequestId
                            + "." + SUBNAME_MTAS_LIST_QUERY_VARIABLE_VALUE,
                            value);
                        subRequestId++;
                      }
                    }
                  }
                  params.add(PARAM_MTAS_LIST + "." + requestId + "."
                      + NAME_MTAS_LIST_KEY, list.key);
                  params.add(PARAM_MTAS_LIST + "." + requestId + "."
                      + NAME_MTAS_LIST_PREFIX, list.prefix);
                  params.add(PARAM_MTAS_LIST + "." + requestId + "."
                      + NAME_MTAS_LIST_START, Integer.toString(start));
                  params.add(
                      PARAM_MTAS_LIST + "." + requestId + "."
                          + NAME_MTAS_LIST_NUMBER,
                      Integer.toString(Math.min(number, (subTotal - start))));
                  params.add(PARAM_MTAS_LIST + "." + requestId + "."
                      + NAME_MTAS_LIST_LEFT, Integer.toString(list.left));
                  params.add(PARAM_MTAS_LIST + "." + requestId + "."
                      + NAME_MTAS_LIST_RIGHT, Integer.toString(list.right));
                  params.add(PARAM_MTAS_LIST + "." + requestId + "."
                      + NAME_MTAS_LIST_OUTPUT, list.output);
                  number -= (subTotal - start);
                  start = 0;
                } else {
                  start -= subTotal;
                }
              }
            }
          }
        }
  
        for (Entry<String, ModifiableSolrParams> entry : shardRequests
            .entrySet()) {
          ShardRequest sreq = new ShardRequest();
          sreq.shards = new String[] { entry.getKey() };
          sreq.purpose = ShardRequest.PURPOSE_PRIVATE;
          sreq.params = new ModifiableSolrParams();
          sreq.params.add(CommonParams.FQ, rb.req.getParams().getParams(CommonParams.FQ));
          sreq.params.add(CommonParams.Q, rb.req.getParams().getParams(CommonParams.Q));
          sreq.params.add(CommonParams.CACHE, rb.req.getParams().getParams(CommonParams.CACHE));
          sreq.params.add(CommonParams.ROWS, "0");
          sreq.params.add(MtasSolrSearchComponent.PARAM_MTAS, rb.req
              .getOriginalParams().getParams(MtasSolrSearchComponent.PARAM_MTAS));
          sreq.params.add(PARAM_MTAS_LIST,
              rb.req.getOriginalParams().getParams(PARAM_MTAS_LIST));
          sreq.params.add(entry.getValue());
          rb.addRequest(searchComponent, sreq);
        }
      }
    }