Class AsyncSearch<TDocument>

java.lang.Object
co.elastic.clients.elasticsearch.async_search.AsyncSearch<TDocument>
All Implemented Interfaces:
JsonpSerializable

@JsonpDeserializable public class AsyncSearch<TDocument> extends Object implements JsonpSerializable
See Also:
  • Field Details

  • Method Details

    • of

      public static <TDocument> AsyncSearch<TDocument> of(Function<AsyncSearch.Builder<TDocument>,ObjectBuilder<AsyncSearch<TDocument>>> fn)
    • aggregations

      public final Map<String,Aggregate> aggregations()
      Partial aggregations results, coming from the shards that have already completed the execution of the query.

      API name: aggregations

    • clusters

      @Nullable public final ClusterStatistics clusters()
      API name: _clusters
    • fields

      public final Map<String,JsonData> fields()
      API name: fields
    • hits

      public final HitsMetadata<TDocument> hits()
      Required - API name: hits
    • maxScore

      @Nullable public final Double maxScore()
      API name: max_score
    • numReducePhases

      @Nullable public final Long numReducePhases()
      Indicates how many reductions of the results have been performed. If this number increases compared to the last retrieved results for a get asynch search request, you can expect additional results included in the search response.

      API name: num_reduce_phases

    • profile

      @Nullable public final Profile profile()
      API name: profile
    • pitId

      @Nullable public final String pitId()
      API name: pit_id
    • scrollId

      @Nullable public final String scrollId()
      API name: _scroll_id
    • shards

      public final ShardStatistics shards()
      Required - Indicates how many shards have run the query. Note that in order for shard results to be included in the search response, they need to be reduced first.

      API name: _shards

    • suggest

      public final Map<String,List<Suggestion<TDocument>>> suggest()
      API name: suggest
    • terminatedEarly

      @Nullable public final Boolean terminatedEarly()
      API name: terminated_early
    • timedOut

      public final boolean timedOut()
      Required - API name: timed_out
    • took

      public final long took()
      Required - API name: took
    • serialize

      public void serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
      Serialize this object to JSON.
      Specified by:
      serialize in interface JsonpSerializable
    • serializeInternal

      protected void serializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • createAsyncSearchDeserializer

      public static <TDocument> JsonpDeserializer<AsyncSearch<TDocument>> createAsyncSearchDeserializer(JsonpDeserializer<TDocument> tDocumentDeserializer)
      Create a JSON deserializer for AsyncSearch
    • setupAsyncSearchDeserializer

      protected static <TDocument> void setupAsyncSearchDeserializer(ObjectDeserializer<AsyncSearch.Builder<TDocument>> op, JsonpDeserializer<TDocument> tDocumentDeserializer)