Search in sources :

Example 1 with UpdateByQueryRequestBuilder

use of org.elasticsearch.index.reindex.UpdateByQueryRequestBuilder in project elasticsearch-indexing-proxy by codelibs.

the class RequestUtils method createUpdateByQueryRequest.

public static UpdateByQueryRequestBuilder createUpdateByQueryRequest(final Client client, final StreamInput streamInput, final String index) throws IOException {
    final UpdateByQueryRequestBuilder builder = client.prepareExecute(UpdateByQueryAction.INSTANCE);
    final UpdateByQueryRequest request = builder.request();
    request.readFrom(streamInput);
    if (index != null) {
        request.indices(index);
    }
    return builder;
}
Also used : UpdateByQueryRequestBuilder(org.elasticsearch.index.reindex.UpdateByQueryRequestBuilder) UpdateByQueryRequest(org.elasticsearch.index.reindex.UpdateByQueryRequest)

Example 2 with UpdateByQueryRequestBuilder

use of org.elasticsearch.index.reindex.UpdateByQueryRequestBuilder in project elasticsearch-indexing-proxy by codelibs.

the class RequestSender method processUpdateByQueryRequest.

private void processUpdateByQueryRequest(final StreamInput streamInput) throws IOException {
    final UpdateByQueryRequestBuilder builder = RequestUtils.createUpdateByQueryRequest(client, streamInput, index);
    executeUpdateByQueryRequest(streamInput, builder);
}
Also used : UpdateByQueryRequestBuilder(org.elasticsearch.index.reindex.UpdateByQueryRequestBuilder)

Aggregations

UpdateByQueryRequestBuilder (org.elasticsearch.index.reindex.UpdateByQueryRequestBuilder)2 UpdateByQueryRequest (org.elasticsearch.index.reindex.UpdateByQueryRequest)1