Class HighlightField.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch.core.search.HighlightBase.AbstractBuilder<HighlightField.Builder>
co.elastic.clients.elasticsearch.core.search.HighlightField.Builder
- All Implemented Interfaces:
WithJson<HighlightField.Builder>
,ObjectBuilder<HighlightField>
- Enclosing class:
- HighlightField
public static class HighlightField.Builder extends HighlightBase.AbstractBuilder<HighlightField.Builder> implements ObjectBuilder<HighlightField>
Builder for
HighlightField
.-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description HighlightField
build()
Builds aHighlightField
.HighlightField.Builder
fragmentOffset(java.lang.Integer value)
API name:fragment_offset
HighlightField.Builder
matchedFields(java.lang.String value, java.lang.String... values)
API name:matched_fields
HighlightField.Builder
matchedFields(java.util.List<java.lang.String> list)
API name:matched_fields
protected HighlightField.Builder
self()
Methods inherited from class co.elastic.clients.elasticsearch.core.search.HighlightBase.AbstractBuilder
boundaryChars, boundaryMaxScan, boundaryScanner, boundaryScannerLocale, forceSource, fragmenter, fragmentSize, highlightFilter, highlightQuery, highlightQuery, maxAnalyzedOffset, maxFragmentLength, noMatchSize, numberOfFragments, options, options, order, phraseLimit, postTags, postTags, preTags, preTags, requireFieldMatch, tagsSchema, type, type
Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
fragmentOffset
API name:fragment_offset
-
matchedFields
API name:matched_fields
Adds all elements of
list
tomatchedFields
. -
matchedFields
public final HighlightField.Builder matchedFields(java.lang.String value, java.lang.String... values)API name:matched_fields
Adds one or more values to
matchedFields
. -
self
- Specified by:
self
in classHighlightBase.AbstractBuilder<HighlightField.Builder>
-
build
Builds aHighlightField
.- Specified by:
build
in interfaceObjectBuilder<HighlightField>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-