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

Remove "suggest" from Indices Stats and Node Stats REST API specs #43407

Closed
russcam opened this issue Jun 20, 2019 · 1 comment · Fixed by #66180
Closed

Remove "suggest" from Indices Stats and Node Stats REST API specs #43407

russcam opened this issue Jun 20, 2019 · 1 comment · Fixed by #66180
Assignees
Labels
:Core/Infra/REST API REST infrastructure and utilities Team:Core/Infra Meta label for core/infra team

Comments

@russcam
Copy link
Contributor

russcam commented Jun 20, 2019

Whilst going through #29635, I've noticed that the REST API spec for node stats contains "suggest" as an index_metric value

"options" : ["_all", "completion", "docs", "fielddata", "query_cache", "flush", "get", "indexing", "merge", "request_cache", "refresh", "search", "segments", "store", "warmer", "suggest"],

and indices stats contains "suggest" for a metric value

"options" : ["_all", "completion", "docs", "fielddata", "query_cache", "flush", "get", "indexing", "merge", "request_cache", "refresh", "search", "segments", "store", "warmer", "suggest"],

I believe both should no longer be there. I don't think that it'll be possible to delete these in 7.x however, because @elastic/es-clients use the specs to generate code, so removing may be a backwards breaking change.

Based on

metrics.put("docs", r -> r.docs(true));
metrics.put("store", r -> r.store(true));
metrics.put("indexing", r -> r.indexing(true));
metrics.put("search", r -> r.search(true));
metrics.put("get", r -> r.get(true));
metrics.put("merge", r -> r.merge(true));
metrics.put("refresh", r -> r.refresh(true));
metrics.put("flush", r -> r.flush(true));
metrics.put("warmer", r -> r.warmer(true));
metrics.put("query_cache", r -> r.queryCache(true));
metrics.put("segments", r -> r.segments(true));
metrics.put("fielddata", r -> r.fieldData(true));
metrics.put("completion", r -> r.completion(true));
metrics.put("request_cache", r -> r.requestCache(true));
metrics.put("recovery", r -> r.recovery(true));
metrics.put("translog", r -> r.translog(true));

and

public enum Flag {
Store("store", 0),
Indexing("indexing", 1),
Get("get", 2),
Search("search", 3),
Merge("merge", 4),
Flush("flush", 5),
Refresh("refresh", 6),
QueryCache("query_cache", 7),
FieldData("fielddata", 8),
Docs("docs", 9),
Warmer("warmer", 10),
Completion("completion", 11),
Segments("segments", 12),
Translog("translog", 13),
// 14 was previously used for Suggest
RequestCache("request_cache", 15),
Recovery("recovery", 16);

It also looks like the REST specs are missing "recovery" and "translog", which can be safely added to the specs.

@javanna javanna added the :Core/Infra/REST API REST infrastructure and utilities label Jun 20, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

@rjernst rjernst added the Team:Core/Infra Meta label for core/infra team label May 4, 2020
@rjernst rjernst added the needs:triage Requires assignment of a team area label label Dec 3, 2020
jaymode added a commit to jaymode/elasticsearch that referenced this issue Dec 10, 2020
This commit removes the reference to the suggest index metric in the
nodes stats and indices stats rest api spec files. Suggest has been
removed so it is no longer correct to have it in these files.

Closes elastic#43407
@jaymode jaymode removed the needs:triage Requires assignment of a team area label label Dec 10, 2020
@jaymode jaymode self-assigned this Dec 10, 2020
jaymode added a commit that referenced this issue Dec 14, 2020
This commit removes the reference to the suggest index metric in the
nodes stats and indices stats rest api spec files. Suggest has been
removed so it is no longer correct to have it in these files.

Closes #43407
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Core/Infra/REST API REST infrastructure and utilities Team:Core/Infra Meta label for core/infra team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants