Skip to content

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

@russcam

Description

@russcam

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions