I'm trying to reindex a timebased index to apply a new template but after reindexing the doc count of the new indexes are much less than original, I'm using the task api so I might miss some errors, not sure, can't find info on how to get errors after task i complete.
here is what I do:
"source": "ctx._index = 'someindex-' + (ctx._index.substring('someindex-'.length(), ctx._index.length())) + '-2'"
after task is finished:
GET someindex-2018.05.25-1/_count -> 171026
GET someindex-2018.05.25/_count -> 930835
trying a second time...
GET someindex-2018.05.25-2/_count . -> 79994
and a third time, same doc count as the second one. No errors in the logs.
What am I doing wrong here?