Class GetAsyncSearchRequest.Builder

All Implemented Interfaces:
WithJson<GetAsyncSearchRequest.Builder>, ObjectBuilder<GetAsyncSearchRequest>
Enclosing class:
GetAsyncSearchRequest

public static class GetAsyncSearchRequest.Builder extends RequestBase.AbstractBuilder<GetAsyncSearchRequest.Builder> implements ObjectBuilder<GetAsyncSearchRequest>
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • id

      public final GetAsyncSearchRequest.Builder id(String value)
      Required - A unique identifier for the async search.

      API name: id

    • keepAlive

      public final GetAsyncSearchRequest.Builder keepAlive(@Nullable Time value)
      The length of time that the async search should be available in the cluster. When not specified, the keep_alive set with the corresponding submit async request will be used. Otherwise, it is possible to override the value and extend the validity of the request. When this period expires, the search, if still running, is cancelled. If the search is completed, its saved results are deleted.

      API name: keep_alive

    • keepAlive

      The length of time that the async search should be available in the cluster. When not specified, the keep_alive set with the corresponding submit async request will be used. Otherwise, it is possible to override the value and extend the validity of the request. When this period expires, the search, if still running, is cancelled. If the search is completed, its saved results are deleted.

      API name: keep_alive

    • returnIntermediateResults

      public final GetAsyncSearchRequest.Builder returnIntermediateResults(@Nullable Boolean value)
      Specifies whether the response should contain intermediate results if the query is still running when the wait_for_completion_timeout expires or if no wait_for_completion_timeout is specified. If true and the search is still running, the search response will include any hits and partial aggregations that are available. If false and the search is still running, the search response will not include any hits (but possibly include total hits) nor will include any partial aggregations. When not specified, the intermediate results are returned for running queries.

      API name: return_intermediate_results

    • waitForCompletionTimeout

      public final GetAsyncSearchRequest.Builder waitForCompletionTimeout(@Nullable Time value)
      Specifies to wait for the search to be completed up until the provided timeout. Final results will be returned if available before the timeout expires, otherwise the currently available results will be returned once the timeout expires. By default no timeout is set meaning that the currently available results will be returned without any additional wait.

      API name: wait_for_completion_timeout

    • waitForCompletionTimeout

      public final GetAsyncSearchRequest.Builder waitForCompletionTimeout(Function<Time.Builder,ObjectBuilder<Time>> fn)
      Specifies to wait for the search to be completed up until the provided timeout. Final results will be returned if available before the timeout expires, otherwise the currently available results will be returned once the timeout expires. By default no timeout is set meaning that the currently available results will be returned without any additional wait.

      API name: wait_for_completion_timeout

    • self

      Specified by:
      self in class RequestBase.AbstractBuilder<GetAsyncSearchRequest.Builder>
    • build

      public GetAsyncSearchRequest build()
      Specified by:
      build in interface ObjectBuilder<GetAsyncSearchRequest>
      Throws:
      NullPointerException - if some of the required fields are null.