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 forQueryRequeststatic final Endpoint<QueryRequest,QueryResponse, ErrorResponse> Endpoint "sql.query". -
Method Summary
Modifier and TypeMethodDescriptionfinal BooleanIftrue, the response has partial results when there are shard request timeouts or shard failures.final Stringcatalog()The default catalog (cluster) for queries.final Booleancolumnar()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 Stringcursor()The cursor used to retrieve a set of paginated results.final IntegerThe maximum number of rows (or entries) to return in one response.final BooleanIffalse, the API returns an exception when encountering multiple values for a field.final Queryfilter()The Elasticsearch query DSL for additional filtering.final SqlFormatformat()The format for the response.final BooleanIftrue, the search can run on frozen indices.final TimeThe retention period for an async or saved synchronous search.final BooleanIftrue, Elasticsearch stores synchronous searches if you also specify thewait_for_completion_timeoutparameter.static QueryRequestfinal TimeThe minimum retention period for the scroll cursor.params()The values for parameters in the query.final StringSpecifies a subset of projects to target for the search using project metadata tags in a subset of Lucene query syntax.final Stringquery()The SQL query to run.final TimeThe timeout before the request fails.final Map<String,RuntimeField> One or more runtime fields for the search request.voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidfinal StringtimeZone()The ISO-8601 time zone ID for the search.final TimeThe 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 thecolumnarandtime_zonerequest 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 theAcceptHTTP header. If you specify both this parameter and theAcceptHTTP 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_timeoutparameter. 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_timeoutin the scroll request.API name:
page_timeout -
params
The values for parameters in the query.API name:
params -
projectRouting
Specifies a subset of projects to target for the search using project metadata tags in a subset of Lucene query syntax. Allowed Lucene queries: the _alias tag and a single value (possibly wildcarded). Examples: _alias:my-project _alias:_origin _alias:pr Supported in serverless only.API name:
project_routing -
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_completionparameter.API name:
wait_for_completion_timeout -
serialize
Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
-
setupQueryRequestDeserializer
-