Class CustomPassageFormatter



  • public class CustomPassageFormatter
    extends org.apache.lucene.search.postingshighlight.PassageFormatter
    Custom passage formatter that allows us to: 1) extract different snippets (instead of a single big string) together with their scores ( Snippet) 2) use the Encoder implementations that are already used with the other highlighters
    • Constructor Detail

      • CustomPassageFormatter

        public CustomPassageFormatter(String preTag,
                                      String postTag,
                                      org.apache.lucene.search.highlight.Encoder encoder)
    • Method Detail

      • format

        public Snippet[] format(org.apache.lucene.search.postingshighlight.Passage[] passages,
                                String content)