public static String highlight(TermPositionVector tvec,
                                   Set<Term> queryTerms,
                                   String text,
                                   int maxFragments,
                                   int surround)
            throws IOException {
        return highlight(tvec, queryTerms, text, START_EXCERPT, END_EXCERPT,
                START_FRAGMENT_SEPARATOR, END_FRAGMENT_SEPARATOR,
                START_HIGHLIGHT, END_HIGHLIGHT, maxFragments, surround);
    }
public static String highlight ( TermPositionVector tvec , Set < Term > queryTerms , String text , int maxFragments , int surround ) throws IOException { return highlight ( tvec , queryTerms , text , START_EXCERPT , END_EXCERPT , START_FRAGMENT_SEPARATOR , END_FRAGMENT_SEPARATOR , START_HIGHLIGHT , END_HIGHLIGHT , maxFragments , surround ) ; }
@param tvec         the term position vector for this hit
@param queryTerms   the query terms.
@param text         the original text that was used to create the tokens.
@param maxFragments the maximum number of fragments
@param surround     the maximum number of chars surrounding a highlighted
token
@return a String with text fragments where tokens from the query are
highlighted