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

Changes to the indices stats API #4054

Closed
clintongormley opened this issue Nov 2, 2013 · 2 comments · Fixed by #4382
Closed

Changes to the indices stats API #4054

clintongormley opened this issue Nov 2, 2013 · 2 comments · Fixed by #4382

Comments

@clintongormley
Copy link

Recommendations:

Remove the all and clear flags. Default to return all by default, unless specific metrics specified.

Change the path format to:

/{index}/_stats/{metric}

where:

  • {index}: comma-delimited list of indices, _all, or blank
  • {metric} is blank or comma-delimited list of metrics

Metrics can be any of:

  • completion
  • docs
  • fielddata
  • filter_cache
  • flush
  • get
  • id_cache
  • indexing
  • merge
  • refresh
  • search
  • store
  • warmer

Four metrics take optional parameters, which can be specified in the query string. These are:

  • completion: fields or completion_fields
  • fielddata: fields or fielddata_fields
  • indexing: types
  • search: groups

Change level to accept cluster, indices and shards, as per the cluster health API. Default to indices. If set to cluster, only return the _all stats.

Add the translog info from the index status API into the shard-level info of the indices stats API.

@spinscale
Copy link
Contributor

Started working on this.

It seems, that the level parameter is only mentioned in the documentation, but actually nowhere in the REST action. Maybe I am missing something?

@spinscale
Copy link
Contributor

Forget my previous comment, it is hidden in the stats response in the toXContent serialization, not in the request...

brusic pushed a commit to brusic/elasticsearch that referenced this issue Jan 19, 2014
Note: This breaks backward compatibility

* Removed clear/all parameters, now all stats are returned by default
* Made the metrics part of the URL
* Removed a lot of handlers
* Added shards/indices/cluster level paremeter to change response serialization
* Returning translog statistics in IndicesStats
* Added TranslogStats class
* Added IndexShard.translogStats() method to get the stats from concrete implementation
* Updated documentation

Closes elastic#4054
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants