Class TopHitsAggregation
java.lang.Object
org.opensearch.client.opensearch._types.aggregations.MetricAggregationBase
org.opensearch.client.opensearch._types.aggregations.TopHitsAggregation
- All Implemented Interfaces:
JsonpSerializable,PlainJsonSerializable,AggregationVariant,ToCopyableBuilder<TopHitsAggregation.Builder,TopHitsAggregation>
@JsonpDeserializable
@Generated("org.opensearch.client.codegen.CodeGenerator")
public class TopHitsAggregation
extends MetricAggregationBase
implements AggregationVariant, ToCopyableBuilder<TopHitsAggregation.Builder,TopHitsAggregation>
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.opensearch.client.opensearch._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 TypeMethodDescriptionAggregationvariant kind.static TopHitsAggregation.Builderbuilder()API name:docvalue_fieldsbooleanfinal Booleanexplain()Iftrue, returns detailed information about score computation as part of a hit.final Integerfrom()Starting document offset.inthashCode()final HighlightAPI name:highlightstatic 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()API name:sortfinal SourceConfigsource()API name:_sourceAPI name:stored_fieldsCreate a new builderToCopyableBuilderthat is initialised with the current state of this object.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 org.opensearch.client.opensearch._types.aggregations.MetricAggregationBase
field, missing, script, serialize, setupMetricAggregationBaseDeserializerMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensearch.client.opensearch._types.aggregations.AggregationVariant
toAggregationMethods inherited from interface org.opensearch.client.json.PlainJsonSerializable
toJsonStringMethods inherited from interface org.opensearch.client.util.ToCopyableBuilder
copy
-
Field Details
-
_DESERIALIZER
Json deserializer forTopHitsAggregation
-
-
Method Details
-
of
public static TopHitsAggregation of(Function<TopHitsAggregation.Builder, ObjectBuilder<TopHitsAggregation>> fn) -
_aggregationKind
Aggregationvariant kind.- Specified by:
_aggregationKindin interfaceAggregationVariant
-
docvalueFields
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
API name:highlight -
scriptFields
Returns the result of one or more script evaluations for each hit.API name:
script_fields -
seqNoPrimaryTerm
Iftrue, returns sequence number and primary term of the last modification of each hit.API name:
seq_no_primary_term -
size
The maximum number of top matching hits to return per bucket.API name:
size -
sort
API name:sort -
source
API name:_source -
storedFields
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 -
serializeInternal
- Overrides:
serializeInternalin classMetricAggregationBase
-
toBuilder
Description copied from interface:ToCopyableBuilderCreate a new builderToCopyableBuilderthat is initialised with the current state of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<TopHitsAggregation.Builder,TopHitsAggregation> - Returns:
- a new builder instance.
-
builder
-
setupTopHitsAggregationDeserializer
protected static void setupTopHitsAggregationDeserializer(ObjectDeserializer<TopHitsAggregation.Builder> op) -
hashCode
public int hashCode()- Overrides:
hashCodein classMetricAggregationBase
-
equals
- Overrides:
equalsin classMetricAggregationBase
-