_update_by_query updating just 1 batch (1000) docs

Warning: using ES 6.0.0-rc1

I've this index:

    GET  /dfp-base-2017-01-01/_count
   
    {"count": 35961,"_shards": {
    "total": 2,
    "successful": 2,
    "skipped": 0,
    "failed": 0}}

Then i run:

POST  /dfp-base-2017-01-01/_update_by_query
{
   "script":{
     "source":"if(ctx._source.LINE_ITEM_NAME =~/ADMELD/){ctx._source.LINE_ITEM_DEST='ADX';}else{if(ctx._source.LINE_ITEM_NAME =~/IO-SELE15030142-1000/){ctx._source.LINE_ITEM_DEST='REDIRECT';}else{ctx._source.LINE_ITEM_DEST='DFP'}}",
     "lang":"painless"
   },
    "query": {
        "match_all": {}
    }
}

The response is:

{
  "took": 473,
  "timed_out": false,
  "total": 1000,
  "updated": 1000,
  "deleted": 0,
  "batches": 1,
  "version_conflicts": 0,
  "noops": 0,
  "retries": {
    "bulk": 0,
    "search": 0
  },
  "throttled_millis": 0,
  "requests_per_second": -1,
  "throttled_until_millis": 0,
  "failures": []
}

Why it updated 1000 docs using just 1 batch, when i have 35k docs in the index?
I've tried setting a greater batch size, but doesnt help..
Maybe it is a 6.0.0 bug?

Thanks for any help!

hey,

indeed this is an issue. Fixed in https://github.com/elastic/elasticsearch/pull/26784

--Alex

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