return templates;
}
private void validate(Request request, ClusterState state) throws ElasticSearchException {
if (state.routingTable().hasIndex(request.index)) {
throw new IndexAlreadyExistsException(new Index(request.index));
}
if (state.metaData().hasIndex(request.index)) {
throw new IndexAlreadyExistsException(new Index(request.index));
}
if (request.index.contains(" ")) {
throw new InvalidIndexNameException(new Index(request.index), request.index, "must not contain whitespace");
}
if (request.index.contains(",")) {