Class QueryRequest
java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch.sql.QueryRequest
- All Implemented Interfaces:
JsonpSerializable
Get SQL search results. Run an SQL request.
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<QueryRequest>
Json deserializer forQueryRequest
static final Endpoint<QueryRequest,
QueryResponse, ErrorResponse> Endpoint "sql.query
". -
Method Summary
Modifier and TypeMethodDescriptionfinal Boolean
Iftrue
, the response has partial results when there are shard request timeouts or shard failures.final String
catalog()
The default catalog (cluster) for queries.final Boolean
columnar()
Iftrue
, the results are in a columnar fashion: one row represents all the values of a certain column from the current page of results.final String
cursor()
The cursor used to retrieve a set of paginated results.final Integer
The maximum number of rows (or entries) to return in one response.final Boolean
Iffalse
, the API returns an exception when encountering multiple values for a field.final Query
filter()
The Elasticsearch query DSL for additional filtering.final SqlFormat
format()
The format for the response.final Boolean
Iftrue
, the search can run on frozen indices.final Time
The retention period for an async or saved synchronous search.final Boolean
Iftrue
, Elasticsearch stores synchronous searches if you also specify thewait_for_completion_timeout
parameter.static QueryRequest
final Time
The minimum retention period for the scroll cursor.params()
The values for parameters in the query.final String
query()
The SQL query to run.final Time
The timeout before the request fails.final Map<String,
RuntimeField> One or more runtime fields for the search request.void
serialize
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected void
serializeInternal
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static void
final String
timeZone()
The ISO-8601 time zone ID for the search.final Time
The period to wait for complete results.Methods inherited from class co.elastic.clients.elasticsearch._types.RequestBase
toString
-
Field Details
-
_DESERIALIZER
Json deserializer forQueryRequest
-
_ENDPOINT
Endpoint "sql.query
".
-
-
Method Details
-
of
-
allowPartialSearchResults
Iftrue
, the response has partial results when there are shard request timeouts or shard failures. Iffalse
, the API returns an error with no partial results.API name:
allow_partial_search_results
-
catalog
The default catalog (cluster) for queries. If unspecified, the queries execute on the data in the local cluster only.API name:
catalog
-
columnar
Iftrue
, the results are in a columnar fashion: one row represents all the values of a certain column from the current page of results. The API supports this parameter only for CBOR, JSON, SMILE, and YAML responses.API name:
columnar
-
cursor
The cursor used to retrieve a set of paginated results. If you specify a cursor, the API only uses thecolumnar
andtime_zone
request body parameters. It ignores other request body parameters.API name:
cursor
-
fetchSize
The maximum number of rows (or entries) to return in one response.API name:
fetch_size
-
fieldMultiValueLeniency
Iffalse
, the API returns an exception when encountering multiple values for a field. Iftrue
, the API is lenient and returns the first value from the array with no guarantee of consistent results.API name:
field_multi_value_leniency
-
filter
The Elasticsearch query DSL for additional filtering.API name:
filter
-
format
The format for the response. You can also specify a format using theAccept
HTTP header. If you specify both this parameter and theAccept
HTTP header, this parameter takes precedence.API name:
format
-
indexUsingFrozen
Iftrue
, the search can run on frozen indices.API name:
index_using_frozen
-
keepAlive
The retention period for an async or saved synchronous search.API name:
keep_alive
-
keepOnCompletion
Iftrue
, Elasticsearch stores synchronous searches if you also specify thewait_for_completion_timeout
parameter. Iffalse
, Elasticsearch only stores async searches that don't finish before thewait_for_completion_timeout
.API name:
keep_on_completion
-
pageTimeout
The minimum retention period for the scroll cursor. After this time period, a pagination request might fail because the scroll cursor is no longer available. Subsequent scroll requests prolong the lifetime of the scroll cursor by the duration ofpage_timeout
in the scroll request.API name:
page_timeout
-
params
The values for parameters in the query.API name:
params
-
query
The SQL query to run.API name:
query
-
requestTimeout
The timeout before the request fails.API name:
request_timeout
-
runtimeMappings
One or more runtime fields for the search request. These fields take precedence over mapped fields with the same name.API name:
runtime_mappings
-
timeZone
The ISO-8601 time zone ID for the search.API name:
time_zone
-
waitForCompletionTimeout
The period to wait for complete results. It 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.To save a synchronous search, you must specify this parameter and the
keep_on_completion
parameter.API name:
wait_for_completion_timeout
-
serialize
Serialize this object to JSON.- Specified by:
serialize
in interfaceJsonpSerializable
-
serializeInternal
-
setupQueryRequestDeserializer
-