def state(self, filter_nodes=None, filter_routing_table=None,<EOL>filter_metadata=None, filter_blocks=None,<EOL>filter_indices=None):
path = make_path("<STR_LIT>", "<STR_LIT:state>")<EOL>parameters = {}<EOL>if filter_nodes is not None:<EOL><INDENT>parameters['<STR_LIT>'] = filter_nodes<EOL><DEDENT>if filter_routing_table is not None:<EOL><INDENT>parameters['<STR_LIT>'] = filter_routing_table<EOL><DEDENT>if filter_metadata is not None:<EOL><INDENT>parameters['<STR_LIT>'] = filter_metadata<EOL><DEDENT>if filter_blocks is not None:<EOL><INDENT>parameters['<STR_LIT>'] = filter_blocks<EOL><DEDENT>if filter_blocks is not None:<EOL><INDENT>if isinstance(filter_indices, six.string_types):<EOL><INDENT>parameters['<STR_LIT>'] = filter_indices<EOL><DEDENT>else:<EOL><INDENT>parameters['<STR_LIT>'] = "<STR_LIT:U+002C>".join(filter_indices)<EOL><DEDENT><DEDENT>return self.conn._send_request('<STR_LIT:GET>', path, params=parameters)<EOL>
Retrieve the :ref:`cluster state <es-guide-reference-api-admin-cluster-state>`.

:param filter_nodes: set to **true** to filter out the **nodes** part
                     of the response.
:param filter_routing_table: set to **true** to filter out the
                             **routing_table** part of the response.
:param filter_metadata: set to **true** to filter out the **metadata**
                        part of the response.
:param filter_blocks: set to **true** to filter out the **blocks**
                      part of the response.
:param filter_indices: when not filtering metadata, a comma separated
                       list of indices to include in the response.