Add segment cat api

This commit is contained in:
Mathieu Geli
2014-04-28 19:18:03 +02:00
committed by Honza Král
parent d1b5acba93
commit dd408cff67
+19
View File
@@ -192,6 +192,25 @@ class CatClient(NamespacedClient):
_, 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):