def add(self, text, name, field, type='<STR_LIT>', size=None, params=None):
func = None<EOL>if type == '<STR_LIT>':<EOL><INDENT>func = self.add_completion<EOL><DEDENT>elif type == '<STR_LIT>':<EOL><INDENT>func = self.add_phrase<EOL><DEDENT>elif type == '<STR_LIT>':<EOL><INDENT>func = self.add_term<EOL><DEDENT>else:<EOL><INDENT>raise InvalidQuery('<STR_LIT>')<EOL><DEDENT>func(text=text, name=name, field=field, size=size, params=params)<EOL>
Set the suggester of given type.

:param text: text
:param name: name of suggest
:param field: field to be used
:param type: type of suggester to add, available types are: completion,
             phrase, term
:param size: number of phrases
:param params: dict of additional parameters to pass to the suggester
:return: None