Class TrackHits
java.lang.Object
co.elastic.clients.elasticsearch.core.search.TrackHits
- All Implemented Interfaces:
JsonpSerializable
,TaggedUnion<TrackHits.Kind,java.lang.Object>
@JsonpDeserializable public class TrackHits extends java.lang.Object implements TaggedUnion<TrackHits.Kind,java.lang.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:
- API specification
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TrackHits.Builder
static class
TrackHits.Kind
-
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<TrackHits>
_DESERIALIZER
-
Method Summary
Modifier and Type Method Description java.lang.Object
_get()
TrackHits.Kind
_kind()
Get the of the kind of variant held by this object.java.lang.String
_toJsonString()
java.lang.Integer
count()
Get thecount
variant value.java.lang.Boolean
enabled()
Get theenabled
variant value.boolean
isCount()
Is this variant instance of kindcount
?boolean
isEnabled()
Is this variant instance of kindenabled
?static TrackHits
of(java.util.function.Function<TrackHits.Builder,ObjectBuilder<TrackHits>> fn)
void
serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
java.lang.String
toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
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,java.lang.Object>
- Returns:
- the variant kind
-
_get
public final java.lang.Object _get()- Specified by:
_get
in interfaceTaggedUnion<TrackHits.Kind,java.lang.Object>
-
_toJsonString
public java.lang.String _toJsonString() -
of
public static TrackHits of(java.util.function.Function<TrackHits.Builder,ObjectBuilder<TrackHits>> fn) -
isCount
public boolean isCount()Is this variant instance of kindcount
? -
count
public java.lang.Integer count()Get thecount
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thecount
kind.
-
isEnabled
public boolean isEnabled()Is this variant instance of kindenabled
? -
enabled
public java.lang.Boolean enabled()Get theenabled
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of theenabled
kind.
-
serialize
- Specified by:
serialize
in interfaceJsonpSerializable
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-