Package org.elasticsearch.client

Examples of org.elasticsearch.client.AdminClient


     * @return true if exists
     */
    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


     * @return true if exists
     */
    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

TOP

Related Classes of org.elasticsearch.client.AdminClient

Copyright © 2018 www.massapicom. 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.