code: public boolean aliasExists(String alias) {
          try {
              final JestResult result = jestClient.execute(new GetSettings.Builder().addIndex(alias).build());
              return result.isSucceeded() && !Iterators.contains(result.getJsonObject().fieldNames(), alias);
          } catch (IOException e) {
              throw new ElasticsearchException("Couldn't check existence of alias " + alias, e);
          }
      }
docs: Check if a given name is an existing alias.
  
  @param alias Name of the alias to check presence for.
  @return {@code true} if alias is an existing alias, {@code false} if it is non-existing or an index.