Skip to content

Mappings should fall back to _source when doc values are disabled #80504

@jpountz

Description

@jpountz

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions