Skip to content

Add support for stored fields #2004

Closed
@vdiskg

Description

@vdiskg

The stored fields excluded on the _source cannot be queried at present. For example, to query the following field exampleValue need to add the "stored_fields": [ "excludeValue" ] to the query which is not support now.

the index

{
    "mappings": {
        "_source": {
            "excludes": [
                "exampleValue"
            ]
        },
        "properties": {
            "name": {
                "type": "text"
            },
            "status": {
                "type": "keyword"
            },
            "createTime": {
                "format": "yyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis",
                "type": "date"
            },
            "exampleValue": {
                "index": false,
                "store": true,
                "type": "text"
            }
        }
    }
}

the query needed

{
    "_source": [
        "name",
        "status",
        "createTime"
    ],
    "query": {
        some condition ...
    },
    "stored_fields": [
        "excludeValue"
    ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions