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
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal Object
_get()
final TrackHits.Kind
_kind()
Get the of the kind of variant held by this object.count()
Get thecount
variant value.enabled()
Get theenabled
variant value.boolean
isCount()
Is this variant instance of kindcount
?boolean
Is this variant instance of kindenabled
?static TrackHits
void
serialize
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) toString()
-
Field Details
-
_DESERIALIZER
-
-
Method Details
-
_kind
Description copied from interface:TaggedUnion
Get the of the kind of variant held by this object.- Specified by:
_kind
in interfaceTaggedUnion<TrackHits.Kind,
Object> - Returns:
- the variant kind
-
_get
- Specified by:
_get
in interfaceTaggedUnion<TrackHits.Kind,
Object>
-
_toJsonString
-
of
-
isCount
public boolean isCount()Is this variant instance of kindcount
? -
count
Get thecount
variant value.- Throws:
IllegalStateException
- if the current variant is not of thecount
kind.
-
isEnabled
public boolean isEnabled()Is this variant instance of kindenabled
? -
enabled
Get theenabled
variant value.- Throws:
IllegalStateException
- if the current variant is not of theenabled
kind.
-
serialize
- Specified by:
serialize
in interfaceJsonpSerializable
-
toString
-