Class QueryRequest.Builder
- All Implemented Interfaces:
WithJson<QueryRequest.Builder>,ObjectBuilder<QueryRequest>
- Enclosing class:
- QueryRequest
QueryRequest.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aQueryRequest.final QueryRequest.BuilderDefault catalog (cluster) for queries.final QueryRequest.BuilderAPI name:columnarfinal QueryRequest.BuilderAPI name:cursorfinal QueryRequest.BuilderThe maximum number of rows (or entries) to return in one responsefinal QueryRequest.BuilderfieldMultiValueLeniency(Boolean value) 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).final QueryRequest.BuilderOptional Elasticsearch query DSL for additional filtering.final QueryRequest.BuilderOptional Elasticsearch query DSL for additional filtering.final QueryRequest.Buildera short version of the Accept header, e.g.final QueryRequest.BuilderindexUsingFrozen(Boolean value) If true, the search can run on frozen indices.final QueryRequest.BuilderRetention period for an async or saved synchronous search.final QueryRequest.BuilderRetention period for an async or saved synchronous search.final QueryRequest.BuilderkeepOnCompletion(Boolean value) If true, Elasticsearch stores synchronous searches if you also specify the wait_for_completion_timeout parameter.final QueryRequest.BuilderpageTimeout(Time value) The timeout before a pagination request fails.final QueryRequest.BuilderThe timeout before a pagination request fails.final QueryRequest.BuilderValues for parameters in the query.final QueryRequest.BuilderValues for parameters in the query.final QueryRequest.BuilderSQL query to executefinal QueryRequest.BuilderrequestTimeout(Time value) The timeout before the request fails.final QueryRequest.BuilderThe timeout before the request fails.final QueryRequest.BuilderruntimeMappings(String key, RuntimeField value) Defines one or more runtime fields in the search request.final QueryRequest.BuilderDefines one or more runtime fields in the search request.final QueryRequest.BuilderruntimeMappings(Map<String, RuntimeField> map) Defines one or more runtime fields in the search request.protected QueryRequest.Builderself()final QueryRequest.BuilderTime-zone in ISO 8601 used for executing the query on the server.final QueryRequest.BuilderwaitForCompletionTimeout(Time value) Period to wait for complete results.final QueryRequest.BuilderPeriod to wait for complete results.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJsonMethods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
catalog
Default catalog (cluster) for queries. If unspecified, the queries execute on the data in the local cluster only.API name:
catalog -
columnar
API name:columnar -
cursor
API name:cursor -
fetchSize
The maximum number of rows (or entries) to return in one responseAPI name:
fetch_size -
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 -
filter
Optional Elasticsearch query DSL for additional filtering.API name:
filter -
format
a short version of the Accept header, e.g. json, yamlAPI name:
format -
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 -
keepAlive
Retention period for an async or saved synchronous search.API name:
keep_alive -
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 -
pageTimeout
The timeout before a pagination request fails.API name:
page_timeout -
params
Values for parameters in the query.API name:
paramsAdds all entries of
maptoparams. -
params
Values for parameters in the query.API name:
paramsAdds an entry to
params. -
query
SQL query to executeAPI name:
query -
requestTimeout
The timeout before the request fails.API name:
request_timeout -
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_mappingsAdds all entries of
maptoruntimeMappings. -
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_mappingsAdds an entry to
runtimeMappings. -
runtimeMappings
public final QueryRequest.Builder runtimeMappings(String key, Function<RuntimeField.Builder, ObjectBuilder<RuntimeField>> fn) Defines one or more runtime fields in the search request. These fields take precedence over mapped fields with the same name.API name:
runtime_mappingsAdds an entry to
runtimeMappingsusing a builder lambda. -
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 -
waitForCompletionTimeout
public final QueryRequest.Builder waitForCompletionTimeout(Function<Time.Builder, ObjectBuilder<Time>> fn) 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 -
self
- Specified by:
selfin classRequestBase.AbstractBuilder<QueryRequest.Builder>
-
build
Builds aQueryRequest.- Specified by:
buildin interfaceObjectBuilder<QueryRequest>- Throws:
NullPointerException- if some of the required fields are null.
-