Class WrappingFormatter

  • All Implemented Interfaces:
    org.apache.lucene.search.highlight.Formatter

    public class WrappingFormatter
    extends Object
    implements org.apache.lucene.search.highlight.Formatter
    A highlight formatter that wraps the term with two strings, before and after.
    • Constructor Detail

      • WrappingFormatter

        public WrappingFormatter​(String pre,
                                 String post)
    • Method Detail

      • highlightTerm

        public String highlightTerm​(String originalText,
                                    org.apache.lucene.search.highlight.TokenGroup tokenGroup)
        Specified by:
        highlightTerm in interface org.apache.lucene.search.highlight.Formatter