Class QueryRequest

java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch.sql.QueryRequest
All Implemented Interfaces:
JsonpSerializable

@JsonpDeserializable public class QueryRequest extends RequestBase implements JsonpSerializable
Executes a SQL request
See Also:
  • Field Details

  • Method Details

    • of

    • catalog

      @Nullable public final String catalog()
      Default catalog (cluster) for queries. If unspecified, the queries execute on the data in the local cluster only.

      API name: catalog

    • columnar

      @Nullable public final Boolean columnar()
      If true, the results in a columnar fashion: one row represents all the values of a certain column from the current page of results.

      API name: columnar

    • cursor

      @Nullable public final String cursor()
      Cursor used to retrieve a set of paginated results. If you specify a cursor, the API only uses the columnar and time_zone request body parameters. It ignores other request body parameters.

      API name: cursor

    • fetchSize

      @Nullable public final Integer fetchSize()
      The maximum number of rows (or entries) to return in one response

      API name: fetch_size

    • fieldMultiValueLeniency

      @Nullable public final Boolean fieldMultiValueLeniency()
      Throw an exception when encountering multiple values for a field (default) or be lenient and return the first value from the list (without any guarantees of what that will be - typically the first in natural ascending order).

      API name: field_multi_value_leniency

    • filter

      @Nullable public final Query filter()
      Elasticsearch query DSL for additional filtering.

      API name: filter

    • format

      @Nullable public final String format()
      Format for the response.

      API name: format

    • indexUsingFrozen

      @Nullable public final Boolean indexUsingFrozen()
      If true, the search can run on frozen indices. Defaults to false.

      API name: index_using_frozen

    • keepAlive

      @Nullable public final Time keepAlive()
      Retention period for an async or saved synchronous search.

      API name: keep_alive

    • keepOnCompletion

      @Nullable public final Boolean keepOnCompletion()
      If true, Elasticsearch stores synchronous searches if you also specify the wait_for_completion_timeout parameter. If false, Elasticsearch only stores async searches that don’t finish before the wait_for_completion_timeout.

      API name: keep_on_completion

    • pageTimeout

      @Nullable public final Time pageTimeout()
      The timeout before a pagination request fails.

      API name: page_timeout

    • params

      public final Map<String,JsonData> params()
      Values for parameters in the query.

      API name: params

    • query

      @Nullable public final String query()
      SQL query to run.

      API name: query

    • requestTimeout

      @Nullable public final Time requestTimeout()
      The timeout before the request fails.

      API name: request_timeout

    • runtimeMappings

      public final Map<String,RuntimeField> runtimeMappings()
      Defines one or more runtime fields in the search request. These fields take precedence over mapped fields with the same name.

      API name: runtime_mappings

    • timeZone

      @Nullable public final String timeZone()
      ISO-8601 time zone ID for the search.

      API name: time_zone

    • waitForCompletionTimeout

      @Nullable public final Time waitForCompletionTimeout()
      Period to wait for complete results. Defaults to no timeout, meaning the request waits for complete search results. If the search doesn’t finish within this period, the search becomes async.

      API name: wait_for_completion_timeout

    • 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)
    • setupQueryRequestDeserializer

      protected static void setupQueryRequestDeserializer(ObjectDeserializer<QueryRequest.Builder> op)