-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Description
People working on scripting have been looking into making scripts fall back automatically to _source when doc values are not enabled, in order to make scripts easier to use. @jdconrad and I discussed it recently, and it would be better to do it at the mapping level. This way, whether doc values or _source is used for scripts would be completely transparent to script engines, and we could also support sorting or aggregations on fields that have doc values disabled. We need to have the ability to read from _source directly for runtime fields anyway, so hopefully we could reuse code?
One question is whether this could be a performance trap at times. Maybe we should look into ways to tell users that their queries could run faster with better mappings?