Class HighlightBase.AbstractBuilder<BuilderT extends HighlightBase.AbstractBuilder<BuilderT>>
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch.core.search.HighlightBase.AbstractBuilder<BuilderT>
- All Implemented Interfaces:
WithJson<BuilderT>
- Direct Known Subclasses:
Highlight.Builder,HighlightField.Builder
- Enclosing class:
- HighlightBase
public abstract static class HighlightBase.AbstractBuilder<BuilderT extends HighlightBase.AbstractBuilder<BuilderT>>
extends WithJsonObjectBuilderBase<BuilderT>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal BuilderTboundaryChars(String value) A string that contains each boundary character.final BuilderTboundaryMaxScan(Integer value) How far to scan for boundary characters.final BuilderTboundaryScanner(BoundaryScanner value) Specifies how to break the highlighted fragments: chars, sentence, or word.final BuilderTboundaryScannerLocale(String value) Controls which locale is used to search for sentence and word boundaries.final BuilderTforceSource(Boolean value) Deprecated.8.8.0final BuilderTfragmenter(HighlighterFragmenter value) Specifies how text should be broken up in highlight snippets:simpleorspan.final BuilderTfragmentSize(Integer value) The size of the highlighted fragment in characters.final BuilderThighlightFilter(Boolean value) API name:highlight_filterfinal BuilderThighlightQuery(Query value) Highlight matches for a query other than the search query.final BuilderThighlightQuery(QueryVariant value) Highlight matches for a query other than the search query.final BuilderTHighlight matches for a query other than the search query.final BuilderTmaxAnalyzedOffset(Integer value) If set to a non-negative value, highlighting stops at this defined maximum limit.final BuilderTmaxFragmentLength(Integer value) API name:max_fragment_lengthfinal BuilderTnoMatchSize(Integer value) The amount of text you want to return from the beginning of the field if there are no matching fragments to highlight.final BuilderTnumberOfFragments(Integer value) The maximum number of fragments to return.final BuilderTAPI name:optionsfinal BuilderTAPI name:optionsfinal BuilderTorder(HighlighterOrder value) Sorts highlighted fragments by score when set toscore.final BuilderTphraseLimit(Integer value) Controls the number of matching phrases in a document that are considered.final BuilderTUse in conjunction withpre_tagsto define the HTML tags to use for the highlighted text.final BuilderTUse in conjunction withpre_tagsto define the HTML tags to use for the highlighted text.final BuilderTUse in conjunction withpost_tagsto define the HTML tags to use for the highlighted text.final BuilderTUse in conjunction withpost_tagsto define the HTML tags to use for the highlighted text.final BuilderTrequireFieldMatch(Boolean value) By default, only fields that contains a query match are highlighted.protected abstract BuilderTself()final BuilderTtagsSchema(HighlighterTagsSchema value) Set tostyledto use the built-in tag schema.final BuilderTtype(HighlighterType value) API name:typefinal BuilderTAPI name:typeMethods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJsonMethods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
AbstractBuilder
public AbstractBuilder()
-
-
Method Details
-
type
API name:type -
type
API name:type -
boundaryChars
A string that contains each boundary character.API name:
boundary_chars -
boundaryMaxScan
How far to scan for boundary characters.API name:
boundary_max_scan -
boundaryScanner
Specifies how to break the highlighted fragments: chars, sentence, or word. Only valid for the unified and fvh highlighters. Defaults tosentencefor theunifiedhighlighter. Defaults tocharsfor thefvhhighlighter.API name:
boundary_scanner -
boundaryScannerLocale
Controls which locale is used to search for sentence and word boundaries. This parameter takes a form of a language tag, for example:"en-US","fr-FR","ja-JP".API name:
boundary_scanner_locale -
forceSource
Deprecated.8.8.0API name:force_source -
fragmenter
Specifies how text should be broken up in highlight snippets:simpleorspan. Only valid for theplainhighlighter.API name:
fragmenter -
fragmentSize
The size of the highlighted fragment in characters.API name:
fragment_size -
highlightFilter
API name:highlight_filter -
highlightQuery
Highlight matches for a query other than the search query. This is especially useful if you use a rescore query because those are not taken into account by highlighting by default.API name:
highlight_query -
highlightQuery
Highlight matches for a query other than the search query. This is especially useful if you use a rescore query because those are not taken into account by highlighting by default.API name:
highlight_query -
highlightQuery
Highlight matches for a query other than the search query. This is especially useful if you use a rescore query because those are not taken into account by highlighting by default.API name:
highlight_query -
maxFragmentLength
API name:max_fragment_length -
maxAnalyzedOffset
If set to a non-negative value, highlighting stops at this defined maximum limit. The rest of the text is not processed, thus not highlighted and no error is returned Themax_analyzed_offsetquery setting does not override theindex.highlight.max_analyzed_offsetsetting, which prevails when it’s set to lower value than the query setting.API name:
max_analyzed_offset -
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
The maximum number of fragments to return. If the number of fragments is set to0, no fragments are returned. Instead, the entire field contents are highlighted and returned. This can be handy when you need to highlight short texts such as a title or address, but fragmentation is not required. Ifnumber_of_fragmentsis0,fragment_sizeis ignored.API name:
number_of_fragments -
options
API name:optionsAdds all entries of
maptooptions. -
options
API name:optionsAdds an entry to
options. -
order
Sorts highlighted fragments by score when set toscore. By default, fragments will be output in the order they appear in the field (order:none). Setting this option toscorewill output the most relevant fragments first. Each highlighter applies its own logic to compute relevancy scores.API name:
order -
phraseLimit
Controls the number of matching phrases in a document that are considered. Prevents thefvhhighlighter from analyzing too many phrases and consuming too much memory. When usingmatched_fields,phrase_limitphrases per matched field are considered. Raising the limit increases query time and consumes more memory. Only supported by thefvhhighlighter.API name:
phrase_limit -
postTags
Use in conjunction withpre_tagsto define the HTML tags to use for the highlighted text. By default, highlighted text is wrapped in<em>and</em>tags.API name:
post_tagsAdds all elements of
listtopostTags. -
postTags
Use in conjunction withpre_tagsto define the HTML tags to use for the highlighted text. By default, highlighted text is wrapped in<em>and</em>tags.API name:
post_tagsAdds one or more values to
postTags. -
preTags
Use in conjunction withpost_tagsto define the HTML tags to use for the highlighted text. By default, highlighted text is wrapped in<em>and</em>tags.API name:
pre_tagsAdds all elements of
listtopreTags. -
preTags
Use in conjunction withpost_tagsto define the HTML tags to use for the highlighted text. By default, highlighted text is wrapped in<em>and</em>tags.API name:
pre_tagsAdds one or more values to
preTags. -
requireFieldMatch
By default, only fields that contains a query match are highlighted. Set tofalseto highlight all fields.API name:
require_field_match -
tagsSchema
Set tostyledto use the built-in tag schema.API name:
tags_schema -
self
- Specified by:
selfin classWithJsonObjectBuilderBase<BuilderT extends HighlightBase.AbstractBuilder<BuilderT>>
-