Skip to content

Inconsistent behavior when requesting stats for the 'suggest' metric #29589

@jtibshirani

Description

@jtibshirani

Elasticsearch version (bin/elasticsearch --version): 6.2.3

Description of the problem including expected versus actual behavior:
With the indices stats endpoint, requesting the ’suggest’ metric returns search stats (which include suggest stats). It looks like we explicitly map ‘suggest’ to the search stats flag when executing the action: https://github.com/elastic/elasticsearch/blob/6.2/server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestIndicesStatsAction.java#L71

On the other hand, requesting the ‘suggest’ metric through the nodes stats endpoint returns no stats at all, despite the documentation showing that ‘suggest’ is accepted: https://www.elastic.co/guide/en/elasticsearch/reference/6.2/cluster-nodes-stats.html

I don't have a lot of context, but since suggest has been rolled into search, it may make sense for the 'suggest' metric to never be accepted. This would mean that (1) both indices + nodes stats fail when 'suggest' is requested, and (2) the nodes stats documentation should be updated to remove the reference to 'suggest'.

Steps to reproduce:

PUT test
GET /_stats/suggest
GET /_nodes/stats/indices/suggest

See the following gist for the response output: https://gist.github.com/jtibshirani/16fc07384a90b0016d4fd07cedd7c512

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions