Class TopHitsAggregation.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.aggregations.MetricAggregationBase.AbstractBuilder<TopHitsAggregation.Builder>
co.elastic.clients.elasticsearch._types.aggregations.TopHitsAggregation.Builder
- All Implemented Interfaces:
WithJson<TopHitsAggregation.Builder>,ObjectBuilder<TopHitsAggregation>
- Enclosing class:
- TopHitsAggregation
public static class TopHitsAggregation.Builder
extends MetricAggregationBase.AbstractBuilder<TopHitsAggregation.Builder>
implements ObjectBuilder<TopHitsAggregation>
Builder for
TopHitsAggregation.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aTopHitsAggregation.docvalueFields(String value, String... values) API name:docvalue_fieldsdocvalueFields(List<String> list) API name:docvalue_fieldsAPI name:explainAPI name:fromAPI name:highlightAPI name:highlightscriptFields(String key, ScriptField value) API name:script_fieldsAPI name:script_fieldsscriptFields(Map<String, ScriptField> map) API name:script_fieldsprotected TopHitsAggregation.Builderself()seqNoPrimaryTerm(Boolean value) API name:seq_no_primary_termAPI name:sizesort(SortOptions value, SortOptions... values) API name:sortAPI name:sortsort(List<SortOptions> list) API name:sortsource(SourceConfig value) API name:_sourceAPI name:_sourcestoredFields(String value, String... values) API name:stored_fieldsstoredFields(List<String> list) API name:stored_fieldstrackScores(Boolean value) API name:track_scoresAPI name:versionMethods inherited from class co.elastic.clients.elasticsearch._types.aggregations.MetricAggregationBase.AbstractBuilder
field, missing, missing, missing, missing, missing, missing, script, scriptMethods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJsonMethods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
docvalueFields
API name:docvalue_fieldsAdds all elements of
listtodocvalueFields. -
docvalueFields
API name:docvalue_fieldsAdds one or more values to
docvalueFields. -
explain
API name:explain -
from
API name:from -
highlight
API name:highlight -
highlight
public final TopHitsAggregation.Builder highlight(Function<Highlight.Builder, ObjectBuilder<Highlight>> fn) API name:highlight -
scriptFields
API name:script_fieldsAdds all entries of
maptoscriptFields. -
scriptFields
API name:script_fieldsAdds an entry to
scriptFields. -
scriptFields
public final TopHitsAggregation.Builder scriptFields(String key, Function<ScriptField.Builder, ObjectBuilder<ScriptField>> fn) API name:script_fieldsAdds an entry to
scriptFieldsusing a builder lambda. -
size
API name:size -
sort
API name:sortAdds all elements of
listtosort. -
sort
API name:sortAdds one or more values to
sort. -
sort
public final TopHitsAggregation.Builder sort(Function<SortOptions.Builder, ObjectBuilder<SortOptions>> fn) API name:sortAdds a value to
sortusing a builder lambda. -
source
API name:_source -
source
public final TopHitsAggregation.Builder source(Function<SourceConfig.Builder, ObjectBuilder<SourceConfig>> fn) API name:_source -
storedFields
API name:stored_fieldsAdds all elements of
listtostoredFields. -
storedFields
API name:stored_fieldsAdds one or more values to
storedFields. -
trackScores
API name:track_scores -
version
API name:version -
seqNoPrimaryTerm
API name:seq_no_primary_term -
self
- Specified by:
selfin classMetricAggregationBase.AbstractBuilder<TopHitsAggregation.Builder>
-
build
Builds aTopHitsAggregation.- Specified by:
buildin interfaceObjectBuilder<TopHitsAggregation>- Throws:
NullPointerException- if some of the required fields are null.
-