Package org.elasticsearch.action.admin.indices.exists

Examples of org.elasticsearch.action.admin.indices.exists.IndicesExistsRequest


     * @param indices The indices to check if they exists or not.
     * @return The indices exists request
     * @see org.elasticsearch.client.IndicesAdminClient#exists(org.elasticsearch.action.admin.indices.exists.IndicesExistsRequest)
     */
    public static IndicesExistsRequest indicesExistsRequest(String... indices) {
        return new IndicesExistsRequest(indices);
    }
View Full Code Here


        this.settingsFilter = settingsFilter;
    }

    @Override public void handleRequest(final RestRequest request, final RestChannel channel) {
        IndicesExistsRequest indicesExistsRequest = new IndicesExistsRequest(splitIndices(request.param("index")));
        // we just send back a response, no need to fork a listener
        indicesExistsRequest.listenerThreaded(false);
        client.admin().indices().exists(indicesExistsRequest, new ActionListener<IndicesExistsResponse>() {
            @Override public void onResponse(IndicesExistsResponse response) {
                try {
                    if (response.exists()) {
                        channel.sendResponse(new StringRestResponse(OK));
View Full Code Here

* @author kimchy (shay.banon)
*/
public class IndicesExistsRequestBuilder extends BaseIndicesRequestBuilder<IndicesExistsRequest, IndicesExistsResponse> {

    public IndicesExistsRequestBuilder(IndicesAdminClient indicesClient, String... indices) {
        super(indicesClient, new IndicesExistsRequest(indices));
    }
View Full Code Here

import org.elasticsearch.client.IndicesAdminClient;

public class IndexExistsUtils {

  public static boolean exists(IndicesAdminClient client, String indexName) {
    return client.exists(new IndicesExistsRequest(indexName)).actionGet().isExists();
  }
View Full Code Here

TOP

Related Classes of org.elasticsearch.action.admin.indices.exists.IndicesExistsRequest

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.