From 2539214d55c17774b5ac0498bf02bae35f546b91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Honza=20Kr=C3=A1l?= Date: Fri, 9 May 2014 17:41:59 +0200 Subject: [PATCH] Add cat.fielddata API --- elasticsearch/client/cat.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/elasticsearch/client/cat.py b/elasticsearch/client/cat.py index a874bd3e..a4434c14 100644 --- a/elasticsearch/client/cat.py +++ b/elasticsearch/client/cat.py @@ -251,3 +251,28 @@ class CatClient(NamespacedClient): _, data = self.transport.perform_request('GET', '/_cat/thread_pool', params=params) return data + + @query_params('bytes', 'fields', 'h', 'help', 'local', 'master_timeout', + 'v') + def fielddata(self, fields=None, params=None): + """ + Shows information about currently loaded fielddata on a per-node basis. + ``_ + + :arg fields: A comma-separated list of fields to return the fielddata + size + :arg bytes: The unit in which to display byte values + :arg fields: A comma-separated list of fields to return the fielddata + size + :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', + 'fielddata', fields), params=params) + return data