Class TrackHits
java.lang.Object
co.elastic.clients.elasticsearch.core.search.TrackHits
- All Implemented Interfaces:
JsonpSerializable,TaggedUnion<TrackHits.Kind,Object>
@JsonpDeserializable
public class TrackHits
extends Object
implements TaggedUnion<TrackHits.Kind,Object>, JsonpSerializable
Number of hits matching the query to count accurately. If true, the exact
number of hits is returned at the cost of some performance. If false, the
response does not include the total number of hits matching the query.
Defaults to 10,000 hits.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionfinal Object_get()final TrackHits.Kind_kind()Get the of the kind of variant held by this object.count()Get thecountvariant value.enabled()Get theenabledvariant value.booleanisCount()Is this variant instance of kindcount?booleanIs this variant instance of kindenabled?static TrackHitsvoidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) toString()
-
Field Details
-
_DESERIALIZER
-
-
Method Details
-
_kind
Description copied from interface:TaggedUnionGet the of the kind of variant held by this object.- Specified by:
_kindin interfaceTaggedUnion<TrackHits.Kind,Object> - Returns:
- the variant kind
-
_get
- Specified by:
_getin interfaceTaggedUnion<TrackHits.Kind,Object>
-
_toJsonString
-
of
-
isCount
public boolean isCount()Is this variant instance of kindcount? -
count
Get thecountvariant value.- Throws:
IllegalStateException- if the current variant is not of thecountkind.
-
isEnabled
public boolean isEnabled()Is this variant instance of kindenabled? -
enabled
Get theenabledvariant value.- Throws:
IllegalStateException- if the current variant is not of theenabledkind.
-
serialize
- Specified by:
serializein interfaceJsonpSerializable
-
toString
-