Class TrackHits
- java.lang.Object
-
- org.opensearch.client.opensearch.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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTrackHits.Builderstatic classTrackHits.Kind
-
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<TrackHits>_DESERIALIZER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods 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.Integercount()Get thecountvariant value.java.lang.Booleanenabled()Get theenabledvariant value.booleanisCount()Is this variant instance of kindcount?booleanisEnabled()Is this variant instance of kindenabled?static TrackHitsof(java.util.function.Function<TrackHits.Builder,ObjectBuilder<TrackHits>> fn)voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
-
-
-
Field Detail
-
_DESERIALIZER
public static final JsonpDeserializer<TrackHits> _DESERIALIZER
-
-
Method Detail
-
_kind
public final TrackHits.Kind _kind()
Description copied from interface:TaggedUnionGet the of the kind of variant held by this object.- Specified by:
_kindin interfaceTaggedUnion<TrackHits.Kind,java.lang.Object>- Returns:
- the variant kind
-
_get
public final java.lang.Object _get()
- Specified by:
_getin 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 thecountvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thecountkind.
-
isEnabled
public boolean isEnabled()
Is this variant instance of kindenabled?
-
enabled
public java.lang.Boolean enabled()
Get theenabledvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of theenabledkind.
-
serialize
public void serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)- Specified by:
serializein interfaceJsonpSerializable
-
-