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

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

Closed
jtibshirani opened this issue Apr 18, 2018 · 4 comments
Closed
Labels
:Data Management/Stats Statistics tracking and retrieval APIs v6.3.0 v7.0.0-beta1

Comments

@jtibshirani
Copy link
Contributor

jtibshirani commented Apr 18, 2018

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

@talevy
Copy link
Contributor

talevy commented Apr 18, 2018

regarding the mention of suggest as supported metrics in node stats, I believe this may be more accurate as a bug in the documentation. I do not see this as a supported metric as back as 5.0. I may be mistaken

@jtibshirani jtibshirani added >bug :Data Management/Stats Statistics tracking and retrieval APIs labels Apr 18, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

@jasontedor
Copy link
Member

This is intentional. The suggest stats were merged with the search stats and the suggest flag was intentionally left behind (and internally remapped to search) for the indices stats endpoint and it does nothing for the nodes stats endpoint.

@jtibshirani
Copy link
Contributor Author

Catching up with @jasontedor, it sounds like this issue can be better described as follows:
we should deprecate the 'suggest' flag on both the indices and nodes stats endpoints, and eventually fail when the flag is passed in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Data Management/Stats Statistics tracking and retrieval APIs v6.3.0 v7.0.0-beta1
Projects
None yet
Development

No branches or pull requests

5 participants