Class HighlightBase

java.lang.Object
org.opensearch.client.opensearch.core.search.HighlightBase
All Implemented Interfaces:
JsonpSerializable, PlainJsonSerializable
Direct Known Subclasses:
Highlight, HighlightField

@Generated("org.opensearch.client.codegen.CodeGenerator") public abstract class HighlightBase extends Object implements PlainJsonSerializable
  • Constructor Details

  • Method Details

    • boundaryChars

      @Nullable public final String boundaryChars()
      A string that contains each boundary character.

      API name: boundary_chars

    • boundaryMaxScan

      @Nullable public final Integer boundaryMaxScan()
      How far to scan for boundary characters.

      API name: boundary_max_scan

    • boundaryScanner

      @Nullable public final BoundaryScanner boundaryScanner()
      API name: boundary_scanner
    • boundaryScannerLocale

      @Nullable public final String boundaryScannerLocale()
      Controls which locale is used to search for sentence and word boundaries. This parameter takes the form of a language tag, for example, "en-US", "fr-FR", or "ja-JP".

      API name: boundary_scanner_locale

    • forceSource

      @Nullable public final Boolean forceSource()
      API name: force_source
    • fragmentOffset

      @Nullable public final Integer fragmentOffset()
      API name: fragment_offset
    • fragmentSize

      @Nullable public final Integer fragmentSize()
      The size of the highlighted fragment in characters.

      API name: fragment_size

    • fragmenter

      @Nullable public final HighlighterFragmenter fragmenter()
      API name: fragmenter
    • highlightFilter

      @Nullable public final Boolean highlightFilter()
      API name: highlight_filter
    • highlightQuery

      @Nullable public final Query highlightQuery()
      API name: highlight_query
    • maxAnalyzerOffset

      @Nullable public final Integer maxAnalyzerOffset()
      If set to a non-negative value, highlighting stops at this defined maximum limit. The rest of the text is not processed or highlighted, and no error is returned. The max_analyzer_offset query setting does not override the index.highlight.max_analyzed_offset setting, which takes precedence when it is set to a lower value than the query setting.

      API name: max_analyzer_offset

    • maxFragmentLength

      @Nullable public final Integer maxFragmentLength()
      API name: max_fragment_length
    • noMatchSize

      @Nullable public final Integer noMatchSize()
      The amount of text you want to return from the beginning of the field if there are no matching fragments to highlight.

      API name: no_match_size

    • numberOfFragments

      @Nullable public final Integer numberOfFragments()
      The maximum number of fragments to return. When the number of fragments is set to 0, no fragments are returned. Instead, the entirety of a field's contents are highlighted and returned. This is useful when you need to highlight short texts, such as a title or address, in which fragmentation is not required. If number_of_fragments is set to 0, the fragment_size is ignored.

      API name: number_of_fragments

    • options

      @Nonnull public final Map<String,Map<String,JsonData>> options()
      API name: options
    • order

      @Nullable public final HighlighterOrder order()
      API name: order
    • phraseLimit

      @Nullable public final Integer phraseLimit()
      Controls the number of matching phrases in a document that are considered. This prevents the fvh highlighter from analyzing too many phrases and consuming too much memory. When using matched_fields, phrase-limited phrases per matched field are considered. Raising the limit increases the query time and consumes more memory. This setting is only supported by the fvh highlighter.

      API name: phrase_limit

    • postTags

      @Nonnull public final List<String> postTags()
      When used in conjunction with pre_tags, defines the HTML tags to use for the highlighted text. By default, highlighted text is wrapped in <em> and </em> tags.

      API name: post_tags

    • preTags

      @Nonnull public final List<String> preTags()
      When used in conjunction with post_tags, defines the HTML tags to use for the highlighted text. By default, highlighted text is wrapped in <em> and </em> tags.

      API name: pre_tags

    • requireFieldMatch

      @Nullable public final Boolean requireFieldMatch()
      By default, only fields that contains a query match are highlighted. Set to false to highlight all fields.

      API name: require_field_match

    • tagsSchema

      @Nullable public final HighlighterTagsSchema tagsSchema()
      API name: tags_schema
    • type

      @Nullable public final HighlighterType type()
      API name: type
    • serialize

      public void serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
      Serialize this object to JSON.
      Specified by:
      serialize in interface JsonpSerializable
    • serializeInternal

      protected void serializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
    • setupHighlightBaseDeserializer

      protected static <BuilderT extends HighlightBase.AbstractBuilder<BuilderT>> void setupHighlightBaseDeserializer(ObjectDeserializer<BuilderT> op)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object