Skip to content

Conversation

charlotte-hoblik
Copy link
Contributor

This PR fixes an error in the documentation: changes the vales of the Level string from cluster, indices or shards to node, indices or shards
Connected to: elastic/docs-content#1258

Copy link
Contributor

github-actions bot commented Sep 8, 2025

Following you can find the validation changes against the target branch for the APIs.

No changes detected.

You can validate these APIs yourself by using the make validate target.

Copy link
Member

@pquentin pquentin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem here is that Level is used in 3 different APIs. While it's the same enum in the specification, there are two different enums in Elasticsearch:

And they are different!

The proper fix would be to use two enums, but that would be a breaking change. Another option is to add node to Level without removing cluster, with a comment explaining in which API they are available.

It supports 'node' instead of 'cluster' like Level, which is really
ClusterStatsLevel.
@pquentin pquentin changed the title Fix Level string value Introduce NodeStatsLevel enum for nodes stats API Sep 11, 2025
@pquentin
Copy link
Member

We discussed this with @l-trotta and @Anaethelion, and we decided to introduce a NodeStatsLevel enum since using Level is wrong and breaks users.

@pquentin pquentin requested a review from l-trotta September 11, 2025 13:19
@pquentin pquentin added the skip-backport This pull request should not be backported label Sep 12, 2025
@pquentin pquentin merged commit f27d692 into main Sep 12, 2025
9 of 10 checks passed
@pquentin pquentin deleted the charlotte-level-string-1258 branch September 12, 2025 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation skip-backport This pull request should not be backported specification
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants