Disable script access to _source by default (original) (raw)

Accessing the _source field within a script is very slow and can hurt a cluster's performance. That said, it can be a useful way of accessing some not-indexed value for one-off uses without having to reindex.

As a safeguard, let's disable script access to _source by default (other than update/reindex scripts, obviously) and allow the user to re-enable access with a dynamic index setting.