def summarize(self, fields=None, context_len=None, num_frags=None, sep=None):
args = ['<STR_LIT>']<EOL>fields = self._mk_field_list(fields)<EOL>if fields:<EOL><INDENT>args += ['<STR_LIT>', str(len(fields))] + fields<EOL><DEDENT>if context_len is not None:<EOL><INDENT>args += ['<STR_LIT>', str(context_len)]<EOL><DEDENT>if num_frags is not None:<EOL><INDENT>args += ['<STR_LIT>', str(num_frags)]<EOL><DEDENT>if sep is not None:<EOL><INDENT>args += ['<STR_LIT>', sep]<EOL><DEDENT>self._summarize_fields = args<EOL>return self<EOL>
Return an abridged format of the field, containing only the segments of
the field which contain the matching term(s).

If `fields` is specified, then only the mentioned fields are
summarized; otherwise all results are summarized.

Server side defaults are used for each option (except `fields`) if not specified

- **fields** List of fields to summarize. All fields are summarized if not specified
- **context_len** Amount of context to include with each fragment
- **num_frags** Number of fragments per document
- **sep** Separator string to separate fragments