code: public static List<String> findTypes(String root, String index) throws IOException, URISyntaxException {
          if (root == null) {
              return findTypes(index);
          }
  
          logger.debug("Looking for types in classpath under [{}/{}].", root, index);
  
          final List<String> typeNames = new ArrayList<>();
          String[] resources = ResourceList.getResources(root + "/" + index + "/"); // "es/index/"
          for (String resource : resources) {
              if (!resource.isEmpty() && !root.equals(resource)) {
                  String withoutIndex = resource.substring(resource.indexOf("/") + 1);
                  if (withoutIndex.equals(Defaults.IndexSettingsFileName) ||
                          withoutIndex.equals(Defaults.UpdateIndexSettingsFileName)) {
                      logger.trace(" - ignoring: [{}]", withoutIndex);
                  } else {
                      String type = withoutIndex.substring(0, withoutIndex.indexOf(Defaults.JsonFileExtension));
                      logger.trace(" - found [{}].", type);
                      typeNames.add(type);
                  }
              }
          }
  
          return typeNames;
      }
docs: Find all types within an index
  @param root dir within the classpath
  @param index index name
  @return The list of types
  @throws IOException if the connection with elasticsearch is failing
  @throws URISyntaxException this should not happen