Class QueryRequest.Builder
- All Implemented Interfaces:
WithJson<QueryRequest.Builder>,ObjectBuilder<QueryRequest>
- Enclosing class:
- QueryRequest
QueryRequest.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal QueryRequest.BuilderallowPartialSearchResults(Boolean value) Iftrue, the response has partial results when there are shard request timeouts or shard failures.build()Builds aQueryRequest.final QueryRequest.BuilderThe default catalog (cluster) for queries.final QueryRequest.BuilderIftrue, the results are in a columnar fashion: one row represents all the values of a certain column from the current page of results.final QueryRequest.BuilderThe cursor used to retrieve a set of paginated results.final QueryRequest.BuilderThe maximum number of rows (or entries) to return in one response.final QueryRequest.BuilderfieldMultiValueLeniency(Boolean value) Iffalse, the API returns an exception when encountering multiple values for a field.final QueryRequest.BuilderThe Elasticsearch query DSL for additional filtering.final QueryRequest.Builderfilter(QueryVariant value) The Elasticsearch query DSL for additional filtering.final QueryRequest.BuilderThe Elasticsearch query DSL for additional filtering.final QueryRequest.BuilderThe format for the response.final QueryRequest.BuilderindexUsingFrozen(Boolean value) Iftrue, the search can run on frozen indices.final QueryRequest.BuilderThe retention period for an async or saved synchronous search.final QueryRequest.BuilderThe retention period for an async or saved synchronous search.final QueryRequest.BuilderkeepOnCompletion(Boolean value) Iftrue, Elasticsearch stores synchronous searches if you also specify thewait_for_completion_timeoutparameter.final QueryRequest.BuilderpageTimeout(Time value) The minimum retention period for the scroll cursor.final QueryRequest.BuilderThe minimum retention period for the scroll cursor.final QueryRequest.BuilderThe values for parameters in the query.final QueryRequest.BuilderThe values for parameters in the query.final QueryRequest.BuilderprojectRouting(String value) Specifies a subset of projects to target for the search using project metadata tags in a subset of Lucene query syntax.final QueryRequest.BuilderThe SQL query to run.final 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) One or more runtime fields for the search request.final QueryRequest.BuilderOne or more runtime fields for the search request.final QueryRequest.BuilderruntimeMappings(Map<String, RuntimeField> map) One or more runtime fields for the search request.protected QueryRequest.Builderself()final QueryRequest.BuilderThe ISO-8601 time zone ID for the search.final QueryRequest.BuilderwaitForCompletionTimeout(Time value) The period to wait for complete results.final QueryRequest.BuilderThe period 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
-
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 -
filter
The Elasticsearch query DSL for additional filtering.API name:
filter -
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 -
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 -
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:
paramsAdds all elements of
listtoparams. -
params
The values for parameters in the query.API name:
paramsAdds one or more values to
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 -
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_mappingsAdds all entries of
maptoruntimeMappings. -
runtimeMappings
One or more runtime fields for 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) One or more runtime fields for 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
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 -
waitForCompletionTimeout
public final QueryRequest.Builder waitForCompletionTimeout(Function<Time.Builder, ObjectBuilder<Time>> fn) 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 -
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.
-