docs: public void prepare(ResponseBuilder rb, ComponentFields mtasFields)
        throws IOException {
      Set<String> ids = MtasSolrResultUtil
          .getIdsFromParameters(rb.req.getParams(), PARAM_MTAS_DOCUMENT);
      if (!ids.isEmpty()) {
        int tmpCounter = 0;
        String[] fields = new String[ids.size()];
        String[] keys = new String[ids.size()];
        String[] prefixes = new String[ids.size()];
        String[] types = new String[ids.size()];
        String[] regexps = new String[ids.size()];
        String[] lists = new String[ids.size()];
        Boolean[] listRegexps = new Boolean[ids.size()];
        Boolean[] listExpands = new Boolean[ids.size()];
        int[] listExpandNumbers = new int[ids.size()];
        String[] ignoreRegexps = new String[ids.size()];
        String[] ignoreLists = new String[ids.size()];
        Boolean[] ignoreListRegexps = new Boolean[ids.size()];
        String[] listNumbers = new String[ids.size()];
        for (String id : ids) {
          fields[tmpCounter] = rb.req.getParams().get(
              PARAM_MTAS_DOCUMENT + "." + id + "." + NAME_MTAS_DOCUMENT_FIELD,
              null);
          keys[tmpCounter] = rb.req.getParams()
              .get(PARAM_MTAS_DOCUMENT + "." + id + "." + NAME_MTAS_DOCUMENT_KEY,
                  String.valueOf(tmpCounter))
              .trim();
          prefixes[tmpCounter] = rb.req.getParams().get(
              PARAM_MTAS_DOCUMENT + "." + id + "." + NAME_MTAS_DOCUMENT_PREFIX,
              null);
          types[tmpCounter] = rb.req.getParams().get(
              PARAM_MTAS_DOCUMENT + "." + id + "." + NAME_MTAS_DOCUMENT_TYPE,
              null);
          regexps[tmpCounter] = rb.req.getParams().get(
              PARAM_MTAS_DOCUMENT + "." + id + "." + NAME_MTAS_DOCUMENT_REGEXP,
              null);
          lists[tmpCounter] = rb.req.getParams().get(
              PARAM_MTAS_DOCUMENT + "." + id + "." + NAME_MTAS_DOCUMENT_LIST,
              null);
          listRegexps[tmpCounter] = rb.req.getParams().getBool(PARAM_MTAS_DOCUMENT
              + "." + id + "." + NAME_MTAS_DOCUMENT_LIST_REGEXP, false);
          listExpands[tmpCounter] = rb.req.getParams().getBool(PARAM_MTAS_DOCUMENT
              + "." + id + "." + NAME_MTAS_DOCUMENT_LIST_EXPAND, false);
          listExpandNumbers[tmpCounter] = rb.req.getParams()
              .getInt(PARAM_MTAS_DOCUMENT + "." + id + "."
                  + NAME_MTAS_DOCUMENT_LIST_EXPAND_NUMBER, 10);
          ignoreRegexps[tmpCounter] = rb.req.getParams().get(PARAM_MTAS_DOCUMENT
              + "." + id + "." + NAME_MTAS_DOCUMENT_IGNORE_REGEXP, null);
          ignoreLists[tmpCounter] = rb.req.getParams().get(PARAM_MTAS_DOCUMENT
              + "." + id + "." + NAME_MTAS_DOCUMENT_IGNORE_LIST, null);
          ignoreListRegexps[tmpCounter] = rb.req.getParams()
              .getBool(PARAM_MTAS_DOCUMENT + "." + id + "."
                  + NAME_MTAS_DOCUMENT_IGNORE_LIST_REGEXP, false);
          listNumbers[tmpCounter] = rb.req.getParams().get(
              PARAM_MTAS_DOCUMENT + "." + id + "." + NAME_MTAS_DOCUMENT_NUMBER,
              null);
          tmpCounter++;
        }
        String uniqueKeyField = rb.req.getSchema().getUniqueKeyField().getName();
        mtasFields.doDocument = true;
        rb.setNeedDocList(true);
        for (String field : fields) {
          if (field == null || field.isEmpty()) {
            throw new IOException("no (valid) field in mtas document");
          } else if (!mtasFields.list.containsKey(field)) {
            mtasFields.list.put(field, new ComponentField(uniqueKeyField));
          }
        }
        MtasSolrResultUtil.compareAndCheck(keys, fields, NAME_MTAS_DOCUMENT_KEY,
            NAME_MTAS_DOCUMENT_FIELD, true);
        MtasSolrResultUtil.compareAndCheck(prefixes, fields,
            NAME_MTAS_DOCUMENT_PREFIX, NAME_MTAS_DOCUMENT_FIELD, false);
        MtasSolrResultUtil.compareAndCheck(types, fields, NAME_MTAS_DOCUMENT_TYPE,
            NAME_MTAS_DOCUMENT_FIELD, false);
        MtasSolrResultUtil.compareAndCheck(regexps, fields,
            NAME_MTAS_DOCUMENT_REGEXP, NAME_MTAS_DOCUMENT_FIELD, false);
        MtasSolrResultUtil.compareAndCheck(lists, fields, NAME_MTAS_DOCUMENT_LIST,
            NAME_MTAS_DOCUMENT_FIELD, false);
        MtasSolrResultUtil.compareAndCheck(ignoreRegexps, fields,
            NAME_MTAS_DOCUMENT_IGNORE_REGEXP, NAME_MTAS_DOCUMENT_FIELD, false);
        MtasSolrResultUtil.compareAndCheck(ignoreLists, fields,
            NAME_MTAS_DOCUMENT_IGNORE_LIST, NAME_MTAS_DOCUMENT_FIELD, false);
        MtasSolrResultUtil.compareAndCheck(listNumbers, fields,
            NAME_MTAS_DOCUMENT_NUMBER, NAME_MTAS_DOCUMENT_FIELD, false);
        for (int i = 0; i < fields.length; i++) {
          String key = (keys[i] == null) || (keys[i].isEmpty())
              ? String.valueOf(i) + ":" + fields[i] + ":" + prefixes[i]
              : keys[i].trim();
          String prefix = prefixes[i];
          if (prefix == null || prefix.isEmpty()) {
            throw new IOException("no (valid) prefix in mtas document");
          }
          String type = types[i];
          String regexp = regexps[i];
          String[] list = null;
          Boolean listRegexp = listRegexps[i];
          Boolean listExpand = listExpands[i];
          int listExpandNumber = listExpandNumbers[i];
          if (lists[i] != null) {
            ArrayList<String> tmpList = new ArrayList<>();
            String[] subList = lists[i].split("(?<!\\\\),");
            for (int j = 0; j < subList.length; j++) {
              tmpList.add(subList[j].replace("\\,", ",").replace("\\\\", "\\"));
            }
            list = tmpList.toArray(new String[tmpList.size()]);
          }
          int listNumber = Math.max(0,
              (listNumbers[i] == null) || (listNumbers[i].isEmpty()) ? 0
                  : Integer.parseInt(listNumbers[i]));
          String ignoreRegexp = ignoreRegexps[i];
          String[] ignoreList = null;
          Boolean ignoreListRegexp = ignoreListRegexps[i];
          if (ignoreLists[i] != null) {
            ArrayList<String> tmpList = new ArrayList<>();
            String[] subList = ignoreLists[i].split("(?<!\\\\),");
            for (int j = 0; j < subList.length; j++) {
              tmpList.add(subList[j].replace("\\,", ",").replace("\\\\", "\\"));
            }
            ignoreList = tmpList.toArray(new String[tmpList.size()]);
          }
          mtasFields.list.get(fields[i]).documentList.add(new ComponentDocument(
              key, prefix, type, regexp, list, listNumber, listRegexp, listExpand,
              listExpandNumber, ignoreRegexp, ignoreList, ignoreListRegexp));
        }
      }
    }