Class HighlightBuilder

All Implemented Interfaces:
Writeable, Rewriteable<HighlightBuilder>, ToXContent, ToXContentObject

public class HighlightBuilder extends AbstractHighlighterBuilder<HighlightBuilder>
A builder for search highlighting. Settings can control how large fields are summarized to show only selected snippets ("fragments") containing search terms.
See Also:
  • Field Details

    • DEFAULT_FORCE_SOURCE

      public static final boolean DEFAULT_FORCE_SOURCE
      default for whether to highlight fields based on the source even if stored separately
      See Also:
    • DEFAULT_REQUIRE_FIELD_MATCH

      public static final boolean DEFAULT_REQUIRE_FIELD_MATCH
      default for whether a field should be highlighted only if a query matches that field
      See Also:
    • DEFAULT_MAX_ANALYZED_OFFSET

      public static final Integer DEFAULT_MAX_ANALYZED_OFFSET
      default for whether to stop highlighting at the defined max_analyzed_offset to avoid exceptions for longer texts
    • DEFAULT_HIGHLIGHT_FILTER

      public static final boolean DEFAULT_HIGHLIGHT_FILTER
      default for whether fvh should provide highlighting on filter clauses
      See Also:
    • DEFAULT_SCORE_ORDERED

      public static final boolean DEFAULT_SCORE_ORDERED
      default for highlight fragments being ordered by score
      See Also:
    • DEFAULT_ENCODER

      public static final String DEFAULT_ENCODER
      the default encoder setting
      See Also:
    • DEFAULT_PHRASE_LIMIT

      public static final int DEFAULT_PHRASE_LIMIT
      default for the maximum number of phrases the fvh will consider
      See Also:
    • DEFAULT_NO_MATCH_SIZE

      public static final int DEFAULT_NO_MATCH_SIZE
      default for fragment size when there are no matches
      See Also:
    • DEFAULT_NUMBER_OF_FRAGMENTS

      public static final int DEFAULT_NUMBER_OF_FRAGMENTS
      the default number of fragments for highlighting
      See Also:
    • DEFAULT_FRAGMENT_CHAR_SIZE

      public static final int DEFAULT_FRAGMENT_CHAR_SIZE
      the default number of fragments size in characters
      See Also:
    • DEFAULT_STYLED_PRE_TAG

      public static final String[] DEFAULT_STYLED_PRE_TAG
      the default opening tags when tag_schema = "styled"
    • DEFAULT_STYLED_POST_TAGS

      public static final String[] DEFAULT_STYLED_POST_TAGS
      the default closing tags when tag_schema = "styled"
  • Constructor Details

  • Method Details