Class PassageFormatter

    • Method Detail

      • format

        public abstract Object format(Passage[] passages,
                                      String content)
        Formats the top passages from content into a human-readable text snippet.
        passages - top-N passages for the field. Note these are sorted in the order that they appear in the document for convenience.
        content - content for the field.
        formatted highlight. Note that for the non-expert APIs in PostingsHighlighter that return String, the toString method on the Object returned by this method is used to compute the string.