Class HighlightBase.AbstractBuilder<BuilderT extends HighlightBase.AbstractBuilder<BuilderT>>

java.lang.Object
org.opensearch.client.util.ObjectBuilderBase
org.opensearch.client.opensearch.core.search.HighlightBase.AbstractBuilder<BuilderT>
Direct Known Subclasses:
Highlight.Builder, HighlightField.Builder
Enclosing class:
HighlightBase

public abstract static class HighlightBase.AbstractBuilder<BuilderT extends HighlightBase.AbstractBuilder<BuilderT>> extends ObjectBuilderBase
  • Constructor Details

  • Method Details

    • self

      @Nonnull protected abstract BuilderT self()
    • boundaryChars

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

      API name: boundary_chars

    • boundaryMaxScan

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

      API name: boundary_max_scan

    • boundaryScanner

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

      @Nonnull public final BuilderT boundaryScannerLocale(@Nullable String value)
      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

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

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

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

      API name: fragment_size

    • fragmenter

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

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

      @Nonnull public final BuilderT highlightQuery(@Nullable Query value)
      API name: highlight_query
    • highlightQuery

      @Nonnull public final BuilderT highlightQuery(Function<Query.Builder,ObjectBuilder<Query>> fn)
      API name: highlight_query
    • maxAnalyzerOffset

      @Nonnull public final BuilderT maxAnalyzerOffset(@Nullable Integer value)
      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

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

      @Nonnull public final BuilderT noMatchSize(@Nullable Integer value)
      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

      @Nonnull public final BuilderT numberOfFragments(@Nullable Integer value)
      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 BuilderT options(Map<String,Map<String,JsonData>> map)
      API name: options

      Adds all elements of map to options.

    • options

      @Nonnull public final BuilderT options(String key, Map<String,JsonData> value)
      API name: options

      Adds an entry to options.

    • order

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

      @Nonnull public final BuilderT phraseLimit(@Nullable Integer value)
      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 BuilderT postTags(List<String> list)
      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

      Adds all elements of list to postTags.

    • postTags

      @Nonnull public final BuilderT postTags(String value, String... values)
      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

      Adds one or more values to postTags.

    • preTags

      @Nonnull public final BuilderT preTags(List<String> list)
      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

      Adds all elements of list to preTags.

    • preTags

      @Nonnull public final BuilderT preTags(String value, String... values)
      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

      Adds one or more values to preTags.

    • requireFieldMatch

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

      API name: require_field_match

    • tagsSchema

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

      @Nonnull public final BuilderT type(@Nullable HighlighterType value)
      API name: type
    • type

      API name: type