Class TopHitsAggregation
java.lang.Object
co.elastic.clients.elasticsearch._types.aggregations.MetricAggregationBase
co.elastic.clients.elasticsearch._types.aggregations.TopHitsAggregation
- All Implemented Interfaces:
AggregationVariant
,JsonpSerializable
@JsonpDeserializable
public class TopHitsAggregation
extends MetricAggregationBase
implements AggregationVariant
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.aggregations.MetricAggregationBase
MetricAggregationBase.AbstractBuilder<BuilderT extends MetricAggregationBase.AbstractBuilder<BuilderT>>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final JsonpDeserializer<TopHitsAggregation>
Json deserializer forTopHitsAggregation
-
Method Summary
Modifier and TypeMethodDescriptionAggregation variant kind.Fields for which to return doc values.final Boolean
explain()
Iftrue
, returns detailed information about score computation as part of a hit.final Integer
from()
Starting document offset.final Highlight
Specifies the highlighter to use for retrieving highlighted snippets from one or more fields in the search results.static TopHitsAggregation
final Map<String,
ScriptField> Returns the result of one or more script evaluations for each hit.final Boolean
Iftrue
, returns sequence number and primary term of the last modification of each hit.protected void
serializeInternal
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static void
final Integer
size()
The maximum number of top matching hits to return per bucket.final List<SortOptions>
sort()
Sort order of the top matching hits.final SourceConfig
source()
Selects the fields of the source that are returned.Returns values for the specified stored fields (fields that use thestore
mapping option).final Boolean
Iftrue
, calculates and returns document scores, even if the scores are not used for sorting.final Boolean
version()
Iftrue
, returns document version as part of a hit.Methods inherited from class co.elastic.clients.elasticsearch._types.aggregations.MetricAggregationBase
field, missing, script, serialize, setupMetricAggregationBaseDeserializer, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface co.elastic.clients.elasticsearch._types.aggregations.AggregationVariant
_toAggregation
-
Field Details
-
_DESERIALIZER
Json deserializer forTopHitsAggregation
-
-
Method Details
-
of
public static TopHitsAggregation of(Function<TopHitsAggregation.Builder, ObjectBuilder<TopHitsAggregation>> fn) -
_aggregationKind
Aggregation variant kind.- Specified by:
_aggregationKind
in interfaceAggregationVariant
-
docvalueFields
Fields for which to return doc values.API name:
docvalue_fields
-
explain
Iftrue
, returns detailed information about score computation as part of a hit.API name:
explain
-
from
Starting document offset.API name:
from
-
highlight
Specifies the highlighter to use for retrieving highlighted snippets from one or more fields in the search results.API name:
highlight
-
scriptFields
Returns the result of one or more script evaluations for each hit.API name:
script_fields
-
size
The maximum number of top matching hits to return per bucket.API name:
size
-
sort
Sort order of the top matching hits. By default, the hits are sorted by the score of the main query.API name:
sort
-
source
Selects the fields of the source that are returned.API name:
_source
-
storedFields
Returns values for the specified stored fields (fields that use thestore
mapping option).API name:
stored_fields
-
trackScores
Iftrue
, calculates and returns document scores, even if the scores are not used for sorting.API name:
track_scores
-
version
Iftrue
, returns document version as part of a hit.API name:
version
-
seqNoPrimaryTerm
Iftrue
, returns sequence number and primary term of the last modification of each hit.API name:
seq_no_primary_term
-
serializeInternal
- Overrides:
serializeInternal
in classMetricAggregationBase
-
setupTopHitsAggregationDeserializer
protected static void setupTopHitsAggregationDeserializer(ObjectDeserializer<TopHitsAggregation.Builder> op)
-