#[non_exhaustive]pub struct RequestBody {Show 18 fields
pub allow_partial_search_results: Option<bool>,
pub catalog: Option<String>,
pub columnar: Option<bool>,
pub cursor: Option<String>,
pub fetch_size: Option<i32>,
pub field_multi_value_leniency: Option<bool>,
pub filter: Option<QueryContainer>,
pub index_using_frozen: Option<bool>,
pub keep_alive: Option<Duration>,
pub keep_on_completion: Option<bool>,
pub page_timeout: Option<Duration>,
pub params: Option<Vec<Value>>,
pub query: Option<String>,
pub project_routing: Option<ProjectRouting>,
pub request_timeout: Option<Duration>,
pub runtime_mappings: Option<RuntimeFields>,
pub time_zone: Option<TimeZone>,
pub wait_for_completion_timeout: Option<Duration>,
}Expand description
The request’s body.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.allow_partial_search_results: Option<bool>If true, the response has partial results when there are shard request timeouts or shard failures.
If false, the API returns an error with no partial results.
catalog: Option<String>The default catalog (cluster) for queries. If unspecified, the queries execute on the data in the local cluster only.
columnar: Option<bool>If true, 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.
cursor: Option<String>The cursor used to retrieve a set of paginated results.
If you specify a cursor, the API only uses the columnar and time_zone request body parameters.
It ignores other request body parameters.
fetch_size: Option<i32>The maximum number of rows (or entries) to return in one response.
field_multi_value_leniency: Option<bool>If false, the API returns an exception when encountering multiple values for a field.
If true, the API is lenient and returns the first value from the array with no guarantee of consistent results.
filter: Option<QueryContainer>The Elasticsearch query DSL for additional filtering.
index_using_frozen: Option<bool>If true, the search can run on frozen indices.
keep_alive: Option<Duration>The retention period for an async or saved synchronous search.
keep_on_completion: Option<bool>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.
page_timeout: Option<Duration>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 of page_timeout in the scroll request.
params: Option<Vec<Value>>The values for parameters in the query.
query: Option<String>The SQL query to run.
project_routing: Option<ProjectRouting>Specifies a subset of projects to target 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.
request_timeout: Option<Duration>The timeout before the request fails.
runtime_mappings: Option<RuntimeFields>One or more runtime fields for the search request. These fields take precedence over mapped fields with the same name.
time_zone: Option<TimeZone>The ISO-8601 time zone ID for the search.
wait_for_completion_timeout: Option<Duration>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.
Implementations§
Source§impl RequestBody
impl RequestBody
Source§impl RequestBody
impl RequestBody
Sourcepub fn allow_partial_search_results(self, value: bool) -> Self
pub fn allow_partial_search_results(self, value: bool) -> Self
Sets allow_partial_search_results.
Sourcepub fn fetch_size(self, value: i32) -> Self
pub fn fetch_size(self, value: i32) -> Self
Sets fetch_size.
Sourcepub fn field_multi_value_leniency(self, value: bool) -> Self
pub fn field_multi_value_leniency(self, value: bool) -> Self
Sets field_multi_value_leniency.
Sourcepub fn filter(self, value: impl Into<QueryContainer>) -> Self
pub fn filter(self, value: impl Into<QueryContainer>) -> Self
Sets filter.
Sourcepub fn index_using_frozen(self, value: bool) -> Self
pub fn index_using_frozen(self, value: bool) -> Self
Sets index_using_frozen.
Sourcepub fn keep_alive(self, value: impl Into<Duration>) -> Self
pub fn keep_alive(self, value: impl Into<Duration>) -> Self
Sets keep_alive.
Sourcepub fn keep_on_completion(self, value: bool) -> Self
pub fn keep_on_completion(self, value: bool) -> Self
Sets keep_on_completion.
Sourcepub fn page_timeout(self, value: impl Into<Duration>) -> Self
pub fn page_timeout(self, value: impl Into<Duration>) -> Self
Sets page_timeout.
Sourcepub fn project_routing(self, value: impl Into<ProjectRouting>) -> Self
pub fn project_routing(self, value: impl Into<ProjectRouting>) -> Self
Sets project_routing.
Sourcepub fn request_timeout(self, value: impl Into<Duration>) -> Self
pub fn request_timeout(self, value: impl Into<Duration>) -> Self
Sets request_timeout.
Sourcepub fn runtime_mappings(self, value: impl Into<RuntimeFields>) -> Self
pub fn runtime_mappings(self, value: impl Into<RuntimeFields>) -> Self
Sets runtime_mappings.
Sourcepub fn wait_for_completion_timeout(self, value: impl Into<Duration>) -> Self
pub fn wait_for_completion_timeout(self, value: impl Into<Duration>) -> Self
Sets wait_for_completion_timeout.