UpdateByQuery can not batch execute

Hello, guys!
currently i have an index, like it have three fields: id, otherIds(split by ","), score.
now i have such requirement:
i want to update the score by query at otherIds,
the udpateByQuery api can meet my needs like blow:

UpdateByQueryRequestBuilder ubqrb = UpdateByQueryAction.INSTANCE.newRequestBuilder(
               String inlineScript="if(ctx._source.grade == null) ctx._source.grade=newGrade; else if(ctx._source.grade<newGrade) ctx._source.grade=newGrade";
                  Map<String,Object> params=Maps.newHashMap();
                            Script script = new Script(inlineScript, org.elasticsearch.script.ScriptService.ScriptType.INLINE, org.elasticsearch.script.ScriptService.DEFAULT_LANG, params);
                   BulkIndexByScrollResponse response= ubqrb.get();

but i can not batch execute them.

anyone know why batch execute UpdateByQueryRequest is not supported? or i miss something?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.