Interface HighlighterBoundaryScannerFastVectorHighlighterOptionsStep<T extends HighlighterOptionsStep<?>>

    • Method Detail

      • boundaryMaxScan

        HighlighterBoundaryScannerFastVectorHighlighterOptionsStep<T> boundaryMaxScan​(int max)
        Specify how far to scan for boundary characters when a characters boundary scanner is used.

        Specifying this value allows to include more text in the resulting fragment. After the highlighter highlighted a match and centered it based on the fragment size, it can additionally move the start/end positions of that fragment by looking for max characters to the left and to the right to find any boundary character. As soon as such character is found, it will become a new start/end position of the fragment. Otherwise, if boundary character is not found after moving for the max characters to the left/right - the original position determined after centering the match will be used.

        Parameters:
        max - The number of characters.
        Returns:
        The next step in a highlighter definition.