Class SimpleHTMLFormatter

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

    public class SimpleHTMLFormatter
    extends Object
    implements org.apache.lucene.search.highlight.Formatter
    A safer substitute for SimpleHTMLFormatter that escape existing HTML tags and use lowercase <b> tags.
    Author:
    poirigui
    • Constructor Detail

      • SimpleHTMLFormatter

        public SimpleHTMLFormatter()
    • 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