Struct elasticsearch::async_search::AsyncSearchSubmit
source · [−]pub struct AsyncSearchSubmit<'a, 'b, B> { /* private fields */ }
Expand description
Builder for the Async Search Submit API
Executes a search request asynchronously.
Implementations
sourceimpl<'a, 'b, B> AsyncSearchSubmit<'a, 'b, B> where
B: Body,
impl<'a, 'b, B> AsyncSearchSubmit<'a, 'b, B> where
B: Body,
sourcepub fn new(transport: &'a Transport, parts: AsyncSearchSubmitParts<'b>) -> Self
pub fn new(transport: &'a Transport, parts: AsyncSearchSubmitParts<'b>) -> Self
Creates a new instance of AsyncSearchSubmit with the specified API parts
sourcepub fn _source(self, _source: &'b [&'b str]) -> Self
pub fn _source(self, _source: &'b [&'b str]) -> Self
True or false to return the _source field or not, or a list of fields to return
sourcepub fn _source_excludes(self, _source_excludes: &'b [&'b str]) -> Self
pub fn _source_excludes(self, _source_excludes: &'b [&'b str]) -> Self
A list of fields to exclude from the returned _source field
sourcepub fn _source_includes(self, _source_includes: &'b [&'b str]) -> Self
pub fn _source_includes(self, _source_includes: &'b [&'b str]) -> Self
A list of fields to extract and return from the _source field
sourcepub fn allow_no_indices(self, allow_no_indices: bool) -> Self
pub fn allow_no_indices(self, allow_no_indices: bool) -> Self
Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all
string or when no indices have been specified)
sourcepub fn allow_partial_search_results(
self,
allow_partial_search_results: bool
) -> Self
pub fn allow_partial_search_results(
self,
allow_partial_search_results: bool
) -> Self
Indicate if an error should be returned if there is a partial search failure or timeout
sourcepub fn analyze_wildcard(self, analyze_wildcard: bool) -> Self
pub fn analyze_wildcard(self, analyze_wildcard: bool) -> Self
Specify whether wildcard and prefix queries should be analyzed (default: false)
sourcepub fn batched_reduce_size(self, batched_reduce_size: i64) -> Self
pub fn batched_reduce_size(self, batched_reduce_size: i64) -> Self
The number of shard results that should be reduced at once on the coordinating node. This value should be used as the granularity at which progress results will be made available.
sourcepub fn body<T>(self, body: T) -> AsyncSearchSubmit<'a, 'b, JsonBody<T>> where
T: Serialize,
pub fn body<T>(self, body: T) -> AsyncSearchSubmit<'a, 'b, JsonBody<T>> where
T: Serialize,
The body for the API call
sourcepub fn default_operator(self, default_operator: DefaultOperator) -> Self
pub fn default_operator(self, default_operator: DefaultOperator) -> Self
The default operator for query string query (AND or OR)
sourcepub fn df(self, df: &'b str) -> Self
pub fn df(self, df: &'b str) -> Self
The field to use as default where no field prefix is given in the query string
sourcepub fn docvalue_fields(self, docvalue_fields: &'b [&'b str]) -> Self
pub fn docvalue_fields(self, docvalue_fields: &'b [&'b str]) -> Self
A comma-separated list of fields to return as the docvalue representation of a field for each hit
sourcepub fn error_trace(self, error_trace: bool) -> Self
pub fn error_trace(self, error_trace: bool) -> Self
Include the stack trace of returned errors.
sourcepub fn expand_wildcards(self, expand_wildcards: &'b [ExpandWildcards]) -> Self
pub fn expand_wildcards(self, expand_wildcards: &'b [ExpandWildcards]) -> Self
Whether to expand wildcard expression to concrete indices that are open, closed or both.
sourcepub fn explain(self, explain: bool) -> Self
pub fn explain(self, explain: bool) -> Self
Specify whether to return detailed information about score computation as part of a hit
sourcepub fn filter_path(self, filter_path: &'b [&'b str]) -> Self
pub fn filter_path(self, filter_path: &'b [&'b str]) -> Self
A comma-separated list of filters used to reduce the response.
sourcepub fn header(self, key: HeaderName, value: HeaderValue) -> Self
pub fn header(self, key: HeaderName, value: HeaderValue) -> Self
Adds a HTTP header
sourcepub fn ignore_throttled(self, ignore_throttled: bool) -> Self
pub fn ignore_throttled(self, ignore_throttled: bool) -> Self
Whether specified concrete, expanded or aliased indices should be ignored when throttled
Whether specified concrete indices should be ignored when unavailable (missing or closed)
sourcepub fn keep_alive(self, keep_alive: &'b str) -> Self
pub fn keep_alive(self, keep_alive: &'b str) -> Self
Update the time interval in which the results (partial or final) for this search will be available
sourcepub fn keep_on_completion(self, keep_on_completion: bool) -> Self
pub fn keep_on_completion(self, keep_on_completion: bool) -> Self
Control whether the response should be stored in the cluster if it completed within the provided [wait_for_completion] time (default: false)
sourcepub fn lenient(self, lenient: bool) -> Self
pub fn lenient(self, lenient: bool) -> Self
Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
sourcepub fn max_concurrent_shard_requests(
self,
max_concurrent_shard_requests: i64
) -> Self
pub fn max_concurrent_shard_requests(
self,
max_concurrent_shard_requests: i64
) -> Self
The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests
sourcepub fn preference(self, preference: &'b str) -> Self
pub fn preference(self, preference: &'b str) -> Self
Specify the node or shard the operation should be performed on (default: random)
sourcepub fn request_cache(self, request_cache: bool) -> Self
pub fn request_cache(self, request_cache: bool) -> Self
Specify if request cache should be used for this request or not, defaults to true
sourcepub fn request_timeout(self, timeout: Duration) -> Self
pub fn request_timeout(self, timeout: Duration) -> Self
Sets a request timeout for this API call.
The timeout is applied from when the request starts connecting until the response body has finished.
sourcepub fn routing(self, routing: &'b [&'b str]) -> Self
pub fn routing(self, routing: &'b [&'b str]) -> Self
A comma-separated list of specific routing values
sourcepub fn search_type(self, search_type: SearchType) -> Self
pub fn search_type(self, search_type: SearchType) -> Self
Search operation type
sourcepub fn seq_no_primary_term(self, seq_no_primary_term: bool) -> Self
pub fn seq_no_primary_term(self, seq_no_primary_term: bool) -> Self
Specify whether to return sequence number and primary term of the last modification of each hit
sourcepub fn source(self, source: &'b str) -> Self
pub fn source(self, source: &'b str) -> Self
The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
sourcepub fn stats(self, stats: &'b [&'b str]) -> Self
pub fn stats(self, stats: &'b [&'b str]) -> Self
Specific ‘tag’ of the request for logging and statistical purposes
sourcepub fn stored_fields(self, stored_fields: &'b [&'b str]) -> Self
pub fn stored_fields(self, stored_fields: &'b [&'b str]) -> Self
A comma-separated list of stored fields to return as part of a hit
sourcepub fn suggest_field(self, suggest_field: &'b str) -> Self
pub fn suggest_field(self, suggest_field: &'b str) -> Self
Specify which field to use for suggestions
sourcepub fn suggest_mode(self, suggest_mode: SuggestMode) -> Self
pub fn suggest_mode(self, suggest_mode: SuggestMode) -> Self
Specify suggest mode
sourcepub fn suggest_size(self, suggest_size: i64) -> Self
pub fn suggest_size(self, suggest_size: i64) -> Self
How many suggestions to return in response
sourcepub fn suggest_text(self, suggest_text: &'b str) -> Self
pub fn suggest_text(self, suggest_text: &'b str) -> Self
The source text for which the suggestions should be returned
sourcepub fn terminate_after(self, terminate_after: i64) -> Self
pub fn terminate_after(self, terminate_after: i64) -> Self
The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
sourcepub fn track_scores(self, track_scores: bool) -> Self
pub fn track_scores(self, track_scores: bool) -> Self
Whether to calculate and return scores even if they are not used for sorting
sourcepub fn track_total_hits<T: Into<TrackTotalHits>>(
self,
track_total_hits: T
) -> Self
pub fn track_total_hits<T: Into<TrackTotalHits>>(
self,
track_total_hits: T
) -> Self
Indicate if the number of documents that match the query should be tracked
sourcepub fn typed_keys(self, typed_keys: bool) -> Self
pub fn typed_keys(self, typed_keys: bool) -> Self
Specify whether aggregation and suggester names should be prefixed by their respective types in the response
sourcepub fn version(self, version: bool) -> Self
pub fn version(self, version: bool) -> Self
Specify whether to return document version as part of a hit
sourcepub fn wait_for_completion_timeout(
self,
wait_for_completion_timeout: &'b str
) -> Self
pub fn wait_for_completion_timeout(
self,
wait_for_completion_timeout: &'b str
) -> Self
Specify the time that the request should block waiting for the final response
Trait Implementations
sourceimpl<'a, 'b, B: Clone> Clone for AsyncSearchSubmit<'a, 'b, B>
impl<'a, 'b, B: Clone> Clone for AsyncSearchSubmit<'a, 'b, B>
sourcefn clone(&self) -> AsyncSearchSubmit<'a, 'b, B>
fn clone(&self) -> AsyncSearchSubmit<'a, 'b, B>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl<'a, 'b, B> !RefUnwindSafe for AsyncSearchSubmit<'a, 'b, B>
impl<'a, 'b, B> Send for AsyncSearchSubmit<'a, 'b, B> where
B: Send,
impl<'a, 'b, B> Sync for AsyncSearchSubmit<'a, 'b, B> where
B: Sync,
impl<'a, 'b, B> Unpin for AsyncSearchSubmit<'a, 'b, B> where
B: Unpin,
impl<'a, 'b, B> !UnwindSafe for AsyncSearchSubmit<'a, 'b, B>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more