docs: private void prepareTokens(ResponseBuilder rb, ComponentFields mtasFields)
        throws IOException {
      Set<String> ids = MtasSolrResultUtil
          .getIdsFromParameters(rb.req.getParams(), PARAM_MTAS_STATS_TOKENS);
      if (!ids.isEmpty()) {
        int tmpCounter = 0;
        String[] fields = new String[ids.size()];
        String[] keys = new String[ids.size()];
        String[] minima = new String[ids.size()];
        String[] maxima = new String[ids.size()];
        String[] types = new String[ids.size()];
        for (String id : ids) {
          fields[tmpCounter] = rb.req.getParams().get(PARAM_MTAS_STATS_TOKENS
              + "." + id + "." + NAME_MTAS_STATS_TOKENS_FIELD, null);
          keys[tmpCounter] = rb.req.getParams()
              .get(PARAM_MTAS_STATS_TOKENS + "." + id + "."
                  + NAME_MTAS_STATS_TOKENS_KEY, String.valueOf(tmpCounter))
              .trim();
          minima[tmpCounter] = rb.req.getParams().get(PARAM_MTAS_STATS_TOKENS
              + "." + id + "." + NAME_MTAS_STATS_TOKENS_MINIMUM, null);
          maxima[tmpCounter] = rb.req.getParams().get(PARAM_MTAS_STATS_TOKENS
              + "." + id + "." + NAME_MTAS_STATS_TOKENS_MAXIMUM, null);
          types[tmpCounter] = rb.req.getParams().get(PARAM_MTAS_STATS_TOKENS + "."
              + id + "." + NAME_MTAS_STATS_TOKENS_TYPE, null);
          tmpCounter++;
        }
        String uniqueKeyField = rb.req.getSchema().getUniqueKeyField().getName();
        mtasFields.doStats = true;
        mtasFields.doStatsTokens = true;
        rb.setNeedDocSet(true);
        for (String field : fields) {
          if (field == null || field.isEmpty()) {
            throw new IOException("no (valid) field in mtas stats tokens");
          } else if (!mtasFields.list.containsKey(field)) {
            mtasFields.list.put(field, new ComponentField(uniqueKeyField));
          }
        }
        MtasSolrResultUtil.compareAndCheck(keys, fields,
            NAME_MTAS_STATS_TOKENS_KEY, NAME_MTAS_STATS_TOKENS_FIELD, true);
        MtasSolrResultUtil.compareAndCheck(minima, fields,
            NAME_MTAS_STATS_TOKENS_MINIMUM, NAME_MTAS_STATS_TOKENS_FIELD, false);
        MtasSolrResultUtil.compareAndCheck(maxima, fields,
            NAME_MTAS_STATS_TOKENS_MAXIMUM, NAME_MTAS_STATS_TOKENS_FIELD, false);
        MtasSolrResultUtil.compareAndCheck(types, fields,
            NAME_MTAS_STATS_TOKENS_TYPE, NAME_MTAS_STATS_TOKENS_FIELD, false);
        for (int i = 0; i < fields.length; i++) {
          String field = fields[i];
          String key = keys[i];
          String type = (types[i] == null) || (types[i].isEmpty()) ? null
              : types[i].trim();
          Double minimum = (minima[i] == null) || (minima[i].isEmpty()) ? null
              : Double.parseDouble(minima[i]);
          Double maximum = (maxima[i] == null) || (maxima[i].isEmpty()) ? null
              : Double.parseDouble(maxima[i]);
          try {
            mtasFields.list.get(field).statsTokenList
                .add(new ComponentToken(key, minimum, maximum, type));
          } catch (ParseException e) {
            throw new IOException(e.getMessage());
          }
        }
      }
    }