Skip to content

[Feature Request] Relax meta block on field level #19884

@urmichm

Description

@urmichm

Is your feature request related to a problem? Please describe

I'm always frustrated when I cannot add comments and explanation to my code :)
The index structure allows us to have _meta block in mappings.
Why not on (each) field level in properties?

Describe the solution you'd like

Allow to add a _meta or a description block to the fields

{
    "settings": {  ... },
    "mappings": {
        "properties": {
            "address_coordinates": {
                "type": "geo_point",
                "_meta": {
                       "description": "Geo Point in form lat,lan"
                }
            }, ........
        },
        "_meta": {
            "application": "My Beautiful Index",
            ...
        }
    }
}

Update

Many fields (not all) already support the meta block. However, this block is under heavy restrictions, which prohibit users from adding descriptive information.
Based on discussions, it was decided to relax the restrictions. However, since not all the fields support the meta block, AND refactoring from meta to _meta will result in Breaking Changes - the field will keep its name meta (without underscore)

Metadata

Metadata

Assignees

No one assigned

    Labels

    IndexingIndexing, Bulk Indexing and anything related to indexingenhancementEnhancement or improvement to existing feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions