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 the count variant value.
    java.lang.Boolean enabled()
    Get the enabled variant value.
    boolean isCount()
    Is this variant instance of kind count?
    boolean isEnabled()
    Is this variant instance of kind enabled?
    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

  • Method Details

    • _kind

      public final TrackHits.Kind _kind()
      Description copied from interface: TaggedUnion
      Get the of the kind of variant held by this object.
      Specified by:
      _kind in interface TaggedUnion<TrackHits.Kind,​java.lang.Object>
      Returns:
      the variant kind
    • _get

      public final java.lang.Object _get()
      Specified by:
      _get in interface TaggedUnion<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 kind count?
    • count

      public java.lang.Integer count()
      Get the count variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the count kind.
    • isEnabled

      public boolean isEnabled()
      Is this variant instance of kind enabled?
    • enabled

      public java.lang.Boolean enabled()
      Get the enabled variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the enabled kind.
    • serialize

      public void serialize​(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
      Specified by:
      serialize in interface JsonpSerializable
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object