Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for stored fields #2004

Closed
vdiskg opened this issue Nov 21, 2021 · 0 comments · Fixed by #2005
Closed

Add support for stored fields #2004

vdiskg opened this issue Nov 21, 2021 · 0 comments · Fixed by #2005
Labels
type: enhancement A general enhancement

Comments

@vdiskg
Copy link
Contributor

vdiskg commented Nov 21, 2021

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"
    ]
}

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Nov 21, 2021
@sothawo sothawo added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Nov 21, 2021
sothawo pushed a commit that referenced this issue Nov 21, 2021
Original Pull Request #2005 
Closes #2004
@sothawo sothawo added this to the 4.4 M1 (2022.0.0) milestone Nov 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants