Skip to content

Stored Scripts are not serialized when requesting cluster state Metadata #3746

@cscorley

Description

@cscorley

NEST/Elasticsearch.Net version:

6.5.0

Elasticsearch version:

6.2.4

Describe the feature:

Currently requesting the cluster state metadata (client.ClusterState(s => s.Metric(ClusterStateMetric.Metadata))) does not serialize the stored_scripts portion of the response.

If I were to take a swing at implementing this, the sub field on the state response would provide something like a Dictionary<Id, IStoredScript>. The (simplified) response json from the above request:

{
    "metadata": {
        "stored_scripts": {
            "my-script-id": {
                "lang":"painless",
                "source":"return 1;",
                "options":{}
            },
            "my-other-script-id": {
                "lang":"painless",
                "source":"return 0;",
                "options":{}
            },
        }
    }
}

I also notice the response includes an options that isn't currently being serialized. I'm not sure what this is useful for since we don't utilize it, but it is missing (maybe intentionally?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions