code: private SimpleOrderedMap<Object> createToken(ComponentToken token,
        Boolean encode) throws IOException {
      // System.out.println("Create stats position " + position.dataType + " "
      // + position.statsType + " " + position.statsItems + " --- " + encode);
      SimpleOrderedMap<Object> mtasTokenResponse = new SimpleOrderedMap<>();
      mtasTokenResponse.add("key", token.key);
      MtasSolrMtasResult data = new MtasSolrMtasResult(token.dataCollector,
          token.dataType, token.statsType, token.statsItems, null, null);
      if (encode) {
        mtasTokenResponse.add("_encoded_data", MtasSolrResultUtil.encode(data));
      } else {
        mtasTokenResponse.add(token.dataCollector.getCollectorType(), data);
        MtasSolrResultUtil.rewrite(mtasTokenResponse, searchComponent);
      }
      return mtasTokenResponse;
    }
docs: Creates the token.
  
  @param token the token
  @param encode the encode
  @return the simple ordered map
  @throws IOException Signals that an I/O exception has occurred.