Class TrackHits
java.lang.Object
org.opensearch.client.opensearch.core.search.TrackHits
- All Implemented Interfaces:
JsonpSerializable,PlainJsonSerializable,TaggedUnion<TrackHits.Kind,Object>
@JsonpDeserializable
@Generated("org.opensearch.client.codegen.CodeGenerator")
public class TrackHits
extends Object
implements TaggedUnion<TrackHits.Kind,Object>, PlainJsonSerializable
The number of hits matching the query. When
true, the exact number of hits is returned at the cost of some performance. When
false, the response does not include the total number of hits matching the query. Default is 10,000 hits.-
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.static TrackHits.Builderbuilder()count()Get thecountvariant value.enabled()Get theenabledvariant value.booleaninthashCode()booleanisCount()Is this variant instance of kindcount?booleanIs this variant instance of kindenabled?static TrackHitsvoidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensearch.client.json.PlainJsonSerializable
toJsonString
-
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>
-
of
-
_toJsonString
-
isCount
public boolean isCount()Is this variant instance of kindcount? -
count
Get thecountvariant value.- Throws:
IllegalStateException- if the current variant is not thecountkind.
-
isEnabled
public boolean isEnabled()Is this variant instance of kindenabled? -
enabled
Get theenabledvariant value.- Throws:
IllegalStateException- if the current variant is not theenabledkind.
-
serialize
- Specified by:
serializein interfaceJsonpSerializable
-
toBuilder
-
builder
-
hashCode
public int hashCode() -
equals
-