code: public Map<String, Long> getIndices() {
      if (indicesVersions != null) {
        return indicesVersions;
      }
      Map<String, Long> indicesVersions = Maps.newHashMap();
  
      Set<String> indices = Sets.newHashSet();
      for (ShardIndexVersion shard : shards) {
        indices.add(shard.getShardRouting().getIndex());
      }
  
      for (String index : indices) {
        List<ShardIndexVersion> shards = new ArrayList<>();
        for (ShardIndexVersion shard : this.shards) {
          if (shard.getShardRouting().index().equals(index)) {
            shards.add(shard);
          }
        }
        indicesVersions.put(index, this.getIndexVersion(shards));
      }
      this.indicesVersions = indicesVersions;
      return indicesVersions;
    }
docs: Returns a map with the version of each index.