docs: @SuppressWarnings("unchecked")
    private HashMap<String, HashMap<String, HashSet<String>>> computeMissingTermvectorItemsPerShard(
        List<ShardRequest> requests, String... args) throws IOException {
      HashMap<String, HashMap<String, HashSet<String>>> result = new HashMap<>();
      HashMap<String, HashMap<String, HashSet<String>>> itemsPerShardSets = new HashMap<>();
      HashMap<String, HashSet<String>> itemSets = new HashMap<>();
      // loop over responses different shards
      for (ShardRequest sreq : requests) {
        if (sreq.params.getBool(MtasSolrSearchComponent.PARAM_MTAS, false)
            && sreq.params.getBool(PARAM_MTAS_TERMVECTOR, false)) {
          for (ShardResponse shardResponse : sreq.responses) {
            NamedList<Object> response = shardResponse.getSolrResponse()
                .getResponse();
            try {
              // get termvector data
              ArrayList<NamedList<Object>> data = (ArrayList<NamedList<Object>>) response
                  .findRecursive(args);
              if (data != null) {
                // loop over temvector results
                for (int i = 0; i < data.size(); i++) {
                  NamedList<Object> dataItem = data.get(i);
                  try {
                    // get termvector result
                    String termvectorKey = (String) dataItem.get("key");
                    MtasSolrMtasResult list = (MtasSolrMtasResult) dataItem
                        .get("list");
                    if (termvectorKey != null && list != null) {
                      // get keys
                      Set<String> keyList = list.getKeyList();
                      HashMap<String, HashSet<String>> itemsPerShardSet;
                      HashSet<String> itemSet;
                      HashSet<String> tmpItemSet = new HashSet<>();
                      if (itemsPerShardSets.containsKey(termvectorKey)) {
                        itemsPerShardSet = itemsPerShardSets.get(termvectorKey);
                        itemSet = itemSets.get(termvectorKey);
                      } else {
                        itemsPerShardSet = new HashMap<>();
                        itemSet = new HashSet<>();
                        itemsPerShardSets.put(termvectorKey, itemsPerShardSet);
                        itemSets.put(termvectorKey, itemSet);
                      }
                      itemsPerShardSet.put(shardResponse.getShardAddress(),
                          tmpItemSet);
                      tmpItemSet.addAll(keyList);
                      itemSet.addAll(keyList);
                    }
                  } catch (ClassCastException e) {
                    log.debug(e);
                  }
                }
              }
            } catch (ClassCastException e) {
              log.debug(e);
            }
          }
        }
      }
  
      // construct result
      for (Entry<String, HashSet<String>> entry : itemSets.entrySet()) {
        String termvectorKey = entry.getKey();
        HashSet<String> termvectorKeyList = entry.getValue();
        if (itemsPerShardSets.containsKey(termvectorKey)) {
          HashMap<String, HashSet<String>> itemsPerShardSet = itemsPerShardSets
              .get(termvectorKey);
          for (Entry<String, HashSet<String>> subEntry : itemsPerShardSet
              .entrySet()) {
            String shardName = subEntry.getKey();
            HashMap<String, HashSet<String>> tmpShardKeySet;
            if (result.containsKey(shardName)) {
              tmpShardKeySet = result.get(shardName);
            } else {
              tmpShardKeySet = new HashMap<>();
              result.put(shardName, tmpShardKeySet);
            }
            HashSet<String> tmpResult = new HashSet<>();
            HashSet<String> shardItemsSet = subEntry.getValue();
            for (String termvectorKeyListItem : termvectorKeyList) {
              if (!shardItemsSet.contains(termvectorKeyListItem)) {
                tmpResult.add(termvectorKeyListItem);
              }
            }
            tmpShardKeySet.put(termvectorKey, tmpResult);
          }
        }
      }
      return result;
    }