I want to run an update-by-query call on Elasticsearch. I wrote the code to execute as follows and it works,
UpdateByQueryRequestBuilder builder = buildUpdateByQueryRequestBuilder();
builder.get();
However, during the code review someone told me to, instead of calling get() on the builder to use UpdateByQueryRequest class by invoking builder.request() which sorta makes sense.
But the issue is, I don't know how to execute a UpdateByQueryRequest. I looked at the online documentation but there doesn't seem to be any documentation on it.
So is UpdateByQueryRequestBuilder#get() the way to go or could an UpdateByQueryRequest be actually be invoked?
Thanks in advance.