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;
}
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);
}
Aggregations