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

Add segment cat api #78

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions elasticsearch/client/cat.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,25 @@ def shards(self, index=None, params=None):
_, data = self.transport.perform_request('GET', _make_path('_cat',
'shards', index), params=params)
return data

@query_params('h', 'help', 'local', 'master_timeout', 'v')
def segments(self, index=None, params=None):
"""
The segments command is the detailed view of Lucene segments per index.

:arg index: A comma-separated list of index names to limit the returned
information
:arg h: Comma-separated list of column names to display
:arg help: Return help information, default False
:arg local: Return local information, do not retrieve the state from
master node (default: false)
:arg master_timeout: Explicit operation timeout for connection to master
node
:arg v: Verbose mode. Display column headers, default False
"""
_, data = self.transport.perform_request('GET', _make_path('_cat',
'segments', index), params=params)
return data

@query_params('h', 'help', 'local', 'master_timeout', 'v')
def pending_tasks(self, params=None):
Expand Down