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 ClassesNested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.aggregations.MetricAggregationBase
MetricAggregationBase.AbstractBuilder<BuilderT extends MetricAggregationBase.AbstractBuilder<BuilderT>> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<TopHitsAggregation>Json deserializer forTopHitsAggregation -
Method Summary
Modifier and TypeMethodDescriptionAggregation variant kind.final List<FieldAndFormat>Fields for which to return doc values.final Booleanexplain()Iftrue, returns detailed information about score computation as part of a hit.final List<FieldAndFormat>fields()Array of wildcard (*) patterns.final Integerfrom()Starting document offset.final HighlightSpecifies the highlighter to use for retrieving highlighted snippets from one or more fields in the search results.static TopHitsAggregationfinal Map<String,ScriptField> Returns the result of one or more script evaluations for each hit.final BooleanIftrue, returns sequence number and primary term of the last modification of each hit.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidfinal Integersize()The maximum number of top matching hits to return per bucket.final List<SortOptions>sort()Sort order of the top matching hits.final SourceConfigsource()Selects the fields of the source that are returned.Returns values for the specified stored fields (fields that use thestoremapping option).final BooleanIftrue, calculates and returns document scores, even if the scores are not used for sorting.final Booleanversion()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, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:
_aggregationKindin 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 -
fields
Array of wildcard (*) patterns. The request returns values for field names matching these patterns in the hits.fields property of the response.API name:
fields -
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 thestoremapping 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:
serializeInternalin classMetricAggregationBase
-
setupTopHitsAggregationDeserializer
protected static void setupTopHitsAggregationDeserializer(ObjectDeserializer<TopHitsAggregation.Builder> op)
-