Class DiscoverHitHighlightingField


  • public class DiscoverHitHighlightingField
    extends Object
    Configuration for one field that is to be highlighted Giving 0 as max chars ensures that the entire field is returned !
    Author:
    Kevin Van de Velde (kevin at atmire dot com), Ben Bosman (ben at atmire dot com), Mark Diggory (markd at atmire dot com)
    • Field Detail

      • UNLIMITED_FRAGMENT_LENGTH

        public static final int UNLIMITED_FRAGMENT_LENGTH
        See Also:
        Constant Field Values
    • Constructor Detail

      • DiscoverHitHighlightingField

        public DiscoverHitHighlightingField​(String field,
                                            int maxChars,
                                            int maxSnippets)
    • Method Detail

      • getField

        public String getField()
      • getMaxChars

        public int getMaxChars()
        The max number of characters that should be shown for a field containing a matching hit. e.g. If maxChars = 200 and a hit is found in the full-text the 200 chars surrounding the hit will be shown
        Returns:
        max number of characters shown for a hit
      • getMaxSnippets

        public int getMaxSnippets()
        Returns:
        max number of result snippets