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:
- API specification
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classQueryRequest.BuilderBuilder forQueryRequest.Nested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>> -
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<QueryRequest>_DESERIALIZERJson deserializer forQueryRequeststatic Endpoint<QueryRequest,QueryResponse,ErrorResponse>_ENDPOINTEndpoint "sql.query". -
Method Summary
Modifier and Type Method Description java.lang.Stringcatalog()Default catalog (cluster) for queries.java.lang.Booleancolumnar()API name:columnarjava.lang.Stringcursor()API name:cursorjava.lang.IntegerfetchSize()The maximum number of rows (or entries) to return in one responsejava.lang.BooleanfieldMultiValueLeniency()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).Queryfilter()Optional Elasticsearch query DSL for additional filtering.java.lang.Stringformat()a short version of the Accept header, e.g.java.lang.BooleanindexUsingFrozen()If true, the search can run on frozen indices.TimekeepAlive()Retention period for an async or saved synchronous search.java.lang.BooleankeepOnCompletion()If true, Elasticsearch stores synchronous searches if you also specify the wait_for_completion_timeout parameter.static QueryRequestof(java.util.function.Function<QueryRequest.Builder,ObjectBuilder<QueryRequest>> fn)TimepageTimeout()The timeout before a pagination request fails.java.util.Map<java.lang.String,JsonData>params()Values for parameters in the query.java.lang.Stringquery()SQL query to executeTimerequestTimeout()The timeout before the request fails.java.util.Map<java.lang.String,RuntimeField>runtimeMappings()Defines one or more runtime fields in 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 voidsetupQueryRequestDeserializer(ObjectDeserializer<QueryRequest.Builder> op)java.lang.StringtimeZone()Time-zone in ISO 8601 used for executing the query on the server.TimewaitForCompletionTimeout()Period to wait for complete results.Methods inherited from class co.elastic.clients.elasticsearch._types.RequestBase
toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
_DESERIALIZER
Json deserializer forQueryRequest -
_ENDPOINT
Endpoint "sql.query".
-
-
Method Details
-
of
public static QueryRequest of(java.util.function.Function<QueryRequest.Builder,ObjectBuilder<QueryRequest>> fn) -
catalog
@Nullable public final java.lang.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 java.lang.Boolean columnar()API name:columnar -
cursor
@Nullable public final java.lang.String cursor()API name:cursor -
fetchSize
@Nullable public final java.lang.Integer fetchSize()The maximum number of rows (or entries) to return in one responseAPI name:
fetch_size -
fieldMultiValueLeniency
@Nullable public final java.lang.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
Optional Elasticsearch query DSL for additional filtering.API name:
filter -
format
@Nullable public final java.lang.String format()a short version of the Accept header, e.g. json, yamlAPI name:
format -
indexUsingFrozen
@Nullable public final java.lang.Boolean indexUsingFrozen()If true, the search can run on frozen indices. Defaults to false.API name:
index_using_frozen -
keepAlive
Retention period for an async or saved synchronous search.API name:
keep_alive -
keepOnCompletion
@Nullable public final java.lang.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
The timeout before a pagination request fails.API name:
page_timeout -
params
Values for parameters in the query.API name:
params -
query
@Nullable public final java.lang.String query()SQL query to executeAPI name:
query -
requestTimeout
The timeout before the request fails.API name:
request_timeout -
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 java.lang.String timeZone()Time-zone in ISO 8601 used for executing the query on the server. More information available here.API name:
time_zone -
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
Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
-
setupQueryRequestDeserializer
-