Exemplo n.º 1
0
    def highlight(self, query, field, content, count=1):
        """Return highlighted content.

        :param query: lucene Query
        :param field: field name
        :param content: text
        :param count: optional maximum number of passages
        """
        return uhighlight.UnifiedHighlighter(None, self).highlightWithoutSearcher(field, query, content, count).toString()
Exemplo n.º 2
0
 def highlighter(self):
     """lucene UnifiedHighlighter"""
     return uhighlight.UnifiedHighlighter(self, self.analyzer)