Skip to content

Commit

Permalink
Add bytes param to cat.shards and cat.segments (#654)
Browse files Browse the repository at this point in the history
  • Loading branch information
GlenRSmith authored and honzakral committed Oct 11, 2017
1 parent a3a52af commit cfec19a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions elasticsearch/client/cat.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,14 +201,16 @@ def recovery(self, index=None, params=None):
return self.transport.perform_request('GET', _make_path('_cat',
'recovery', index), params=params)

@query_params('format', 'h', 'help', 'local', 'master_timeout', 's', 'v')
@query_params('bytes', 'format', 'h', 'help', 'local', 'master_timeout', 's', 'v')
def shards(self, index=None, params=None):
"""
The shards command is the detailed view of what nodes contain which shards.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-shards.html>`_
:arg index: A comma-separated list of index names to limit the returned
information
:arg bytes: The unit in which to display byte values, valid choices are:
'b', 'k', 'kb', 'm', 'mb', 'g', 'gb', 't', 'tb', 'p', 'pb'
:arg format: a short version of the Accept header, e.g. json, yaml
:arg h: Comma-separated list of column names to display
:arg help: Return help information, default False
Expand All @@ -223,14 +225,16 @@ def shards(self, index=None, params=None):
return self.transport.perform_request('GET', _make_path('_cat',
'shards', index), params=params)

@query_params('format', 'h', 'help', 's', 'v')
@query_params('bytes', 'format', 'h', 'help', 's', 'v')
def segments(self, index=None, params=None):
"""
The segments command is the detailed view of Lucene segments per index.
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-segments.html>`_
:arg index: A comma-separated list of index names to limit the returned
information
:arg bytes: The unit in which to display byte values, valid choices are:
'b', 'k', 'kb', 'm', 'mb', 'g', 'gb', 't', 'tb', 'p', 'pb'
:arg format: a short version of the Accept header, e.g. json, yaml
:arg h: Comma-separated list of column names to display
:arg help: Return help information, default False
Expand Down

0 comments on commit cfec19a

Please sign in to comment.