Package org.elasticsearch.action.percolate

Examples of org.elasticsearch.action.percolate.PercolateRequest.source()


        controller.registerHandler(POST, "/{index}/{type}/_percolate", this);
    }

    @Override public void handleRequest(final RestRequest request, final RestChannel channel) {
        PercolateRequest percolateRequest = new PercolateRequest(request.param("index"), request.param("type"));
        percolateRequest.source(request.contentByteArray(), request.contentByteArrayOffset(), request.contentLength(), request.contentUnsafe());

        // we just send a response, no need to fork
        percolateRequest.listenerThreaded(false);
        // we don't spawn, then fork if local
        percolateRequest.operationThreaded(true);
View Full Code Here


        PercolateRequest percolateRequest = new PercolateRequest().indices(randomIndicesOrAliases()).documentType("type");
        if (randomBoolean()) {
            percolateRequest.getRequest(new GetRequest("test-get", "type", "1"));
        } else {
            percolateRequest.source("\"field\":\"value\"");
        }
        internalCluster().clientNodeClient().percolate(percolateRequest).actionGet();

        clearInterceptedActions();
        assertSameIndices(percolateRequest, percolateShardAction);
View Full Code Here

            Collections.addAll(indices, indicesOrAliases);
            PercolateRequest percolateRequest = new PercolateRequest().indices(indicesOrAliases).documentType("type");
            if (randomBoolean()) {
                percolateRequest.getRequest(new GetRequest("test-get", "type", "1"));
            } else {
                percolateRequest.source("\"field\":\"value\"");
            }
            multiPercolateRequest.add(percolateRequest);
        }

        internalCluster().clientNodeClient().multiPercolate(multiPercolateRequest).actionGet();
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.