Your link didn't work for me. The response I saw was this: What are the limitations of array size in elastic search? - #2 by jpountz
If so it seemed a perfectly reasonable answer to me. i.e. don't create a single JSON document with an array of a million ID strings which have to be rewritten entirely each time there's any change to that set.
The workaround would be to break this doc up into smaller ones.