Find all types within an index in default classpath dir
@param index index name
@return The list of types
@throws IOException if the connection with elasticsearch is failing
@throws URISyntaxException this should not happen
508027
public static List<String> findTypes(String index) throws IOException, URISyntaxException {
        return findTypes(Defaults.ConfigDir, index);
    }
720622
public void createIndex(String index, boolean ignoreErrors, String indexSettings) throws IOException {
        logger.debug("create index [{}]", index);
        logger.trace("index settings: [{}]", indexSettings);
        CreateIndexRequest cir = new CreateIndexRequest(index);
        if (!isNullOrEmpty(indexSettings)) {
            cir.source(indexSettings, XContentType.JSON);
        }
        try {
            client.indices().create(cir, RequestOptions.DEFAULT);
        } catch (ElasticsearchStatusException e) {
            if (e.getMessage().contains("resource_already_exists_exception") && !ignoreErrors) {
                throw new RuntimeException("index already exists");
            }
            if (!e.getMessage().contains("resource_already_exists_exception")) {
                throw e;
            }
        }
        waitForHealthyIndex(index);
    }
1224743
public SearchResponse searchAll(String[] indices, String[] types) {
        return searchAll(indices, types, null, null);
    }
124549
public void setType (int index, String type)
    {
    if (index >= 0 && index < length) {
        data[index*5+3] = type;
    } else {
        badIndex(index);
    }
    }
1210126
public static List<String> findIndexNames(final String root) throws IOException, URISyntaxException {
        if (root == null) {
            return findIndexNames();
        }

        logger.debug("Looking for indices in classpath under [{}].", root);

        final List<String> indexNames = new ArrayList<>();
        final Set<String> keys = new HashSet<>();
        String[] resources = ResourceList.getResources(root + "/"); // "es/" or "a/b/c/"
        for (String resource : resources) {
            if (!resource.isEmpty()) {
                logger.trace(" - resource [{}].", resource);
                String key;
                if (resource.contains("/")) {
                    key = resource.substring(0, resource.indexOf("/"));
                } else {
                    key = resource;
                }
                if (!key.equals(Defaults.TemplateDir) && !keys.contains(key)) {
                    logger.trace(" - found [{}].", key);
                    keys.add(key);
                    indexNames.add(key);
                }
            }
        }

        return indexNames;
    }
838769
public SearchResponse searchAll(String[] indices, String[] types,
            QueryBuilder filterQueryBuilder,
            AggregationBuilder[] aggregationBuilders) {
        return searchAll(false, indices, types, filterQueryBuilder,
                aggregationBuilders);
    }
1162329
public static Type getParamType(Method method, int index) {
		Type[] types = getParamTypes(method);
		if (null != types && types.length > index) {
			return types[index];
		}
		return null;
	}
255092
public static Type getTypeArgument(Type type, int index) {
		final Type[] typeArguments = getTypeArguments(type);
		if (null != typeArguments && typeArguments.length > index) {
			return typeArguments[index];
		}
		return null;
	}
1169094
public JsonObject getJsonObject(int index) throws JsonException {
        JsonElement el = get(index);
        if (!el.isJsonObject()) {
            throw Util.typeMismatch(index, el, "JsonObject");
        }
        return el.asJsonObject();
    }
925842
public Class<?> getClass(int index)
  {
    Object value = _values[index - 1];

    if (value == null) {
      return null;
    }
    else {
      return value.getClass();
    }
  }
1131527
private ClassDescriptor getClassDescriptor(int index) throws InvalidClassFileFormatException {
        @SlashedClassName
        String className = getClassName(index);
        return className != null ? DescriptorFactory.instance().getClassDescriptor(className) : null;
    }
1082475
public JSONObject getJSONObject(int index) throws JSONException {
		Object object = get(index);
		if (object instanceof JSONObject) {
			return (JSONObject) object;
		}
		else {
			throw JSON.typeMismatch(index, object, "JSONObject");
		}
	}
749421
public static Class getGeneric(final Class cls, final int index) {
		Type[] generics = getGenerics(cls);
		if ($.notEmpty(generics)) {
			return (Class) generics[index];
		}
		return null;
	}
847854
public SearchResponse searchAll(String index, String type) {
        return searchAll(JMArrays.buildArray(index), type);
    }
811287
public List<String> getAllIdList(String index, String type) {
        return extractIdList(searchAll(index, type));
    }
1353363
public static final void indexAllClasses(final Indexer indexer, final List<File> classFiles) {
        classFiles.forEach(file -> {
            try {
                final InputStream in = new FileInputStream(file);
                try {
                    indexer.index(in);
                } finally {
                    in.close();
                }
            } catch (final IOException ex) {
                throw new RuntimeException(ex);
            }
        });
    }
115432
public <T> ESDatas<T> searchAll(String index,  Class<T> type) throws ElasticSearchException{

		return searchAll(  index,    DEFAULT_FETCHSIZE , type) ;

	}