Skip to content

nodes().stats() doesn't return node version #707

Closed
@mightycoco

Description

@mightycoco

Java API client version

8.10.3

Java version

20.0.2

Elasticsearch Version

8.9.0

Problem description

Using the rest endpoint _nodes/process I was accessing the
node[].name
node[].version
node[].roles
The endpoint nodes().stats().nodes() only returns name and roles but not the node version.

co.elastic.clients.elasticsearch.nodes.Stats resp. co.elastic.clients.elasticsearch.nodes.Stats.Builder used in co.elastic.clients.elasticsearch.nodes.NodesStatsResponse doesn't contain a version field.

Additionally I couldn't find a way to reduce the amount of information to be transferred over the wire. Whilst the rest endpoints _nodes/process returns only basic information + process, _nodes/_all returns everything.

However, the java API doesn't allow to request only the basic information + process but always transfers everything to be deserialized.
Expected in .nodes().stats(s->s.fields("process")) only the process field is being requested and all other fields (except basic information) is null, butt all data is requested and requested and returned.

reducing the responded fields must be done using metrics:

client.nodes().stats(s->s.metric("process"))

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: SpecificationRelated to the API spec used to generate client code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions