def analyze(self, text, index=None, analyzer=None, tokenizer=None, filters=None, field=None):
if filters is None:<EOL><INDENT>filters = []<EOL><DEDENT>argsets = <NUM_LIT:0><EOL>args = {}<EOL>if analyzer:<EOL><INDENT>args['<STR_LIT>'] = analyzer<EOL>argsets += <NUM_LIT:1><EOL><DEDENT>if tokenizer or filters:<EOL><INDENT>if tokenizer:<EOL><INDENT>args['<STR_LIT>'] = tokenizer<EOL><DEDENT>if filters:<EOL><INDENT>args['<STR_LIT>'] = '<STR_LIT:U+002C>'.join(filters)<EOL><DEDENT>argsets += <NUM_LIT:1><EOL><DEDENT>if field:<EOL><INDENT>args['<STR_LIT>'] = field<EOL>argsets += <NUM_LIT:1><EOL><DEDENT>if argsets > <NUM_LIT:1>:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>if field and index is None:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>path = make_path(index, '<STR_LIT>')<EOL>return self.conn._send_request('<STR_LIT:POST>', path, text, args)<EOL>
Performs the analysis process on a text and return the tokens breakdown of the text

(See :ref:`es-guide-reference-api-admin-indices-optimize`)