Examples of prepareExists()


Examples of org.elasticsearch.client.IndicesAdminClient.prepareExists()

    public static boolean existsIndex(String indexName) {

        Client client = IndexClient.client;
        AdminClient admin = client.admin();
        IndicesAdminClient indices = admin.indices();
        IndicesExistsRequestBuilder indicesExistsRequestBuilder = indices.prepareExists(indexName);
        IndicesExistsResponse response = indicesExistsRequestBuilder.execute().actionGet();

        return response.isExists();
    }
View Full Code Here

Examples of org.elasticsearch.client.IndicesAdminClient.prepareExists()

    public static boolean existsIndex(String indexName) {

        Client client = IndexClient.client;
        AdminClient admin = client.admin();
        IndicesAdminClient indices = admin.indices();
        IndicesExistsRequestBuilder indicesExistsRequestBuilder = indices.prepareExists(indexName);
        IndicesExistsResponse response = indicesExistsRequestBuilder.execute().actionGet();

        return response.isExists();
    }
View Full Code Here

Examples of org.sonar.server.search.SearchClient.prepareExists()

  public void with_profiling_basic() {
    Profiling profiling = new Profiling(new Settings().setProperty(Profiling.CONFIG_PROFILING_LEVEL, Profiling.Level.BASIC.name()));
    SearchClient searchClient = new SearchClient(new Settings(), profiling);

    try {
      searchClient.prepareExists(IndexDefinition.RULE.getIndexName()).get();

      // expected to fail because elasticsearch is not correctly configured, but that does not matter
      fail();
    } catch (IllegalStateException e) {
      assertThat(e.getMessage()).isEqualTo("Fail to execute ES indices exists request on indices 'rules'");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.