Struct elasticsearch::Msearch[][src]

pub struct Msearch<'a, 'b, B> { /* fields omitted */ }

Builder for the Msearch API

Allows to execute several search operations in one request.

Implementations

impl<'a, 'b, B> Msearch<'a, 'b, B> where
    B: Body
[src]

pub fn new(transport: &'a Transport, parts: MsearchParts<'b>) -> Self[src]

Creates a new instance of Msearch with the specified API parts

pub fn body<T>(self, body: Vec<T>) -> Msearch<'a, 'b, NdBody<T>> where
    T: Body
[src]

The body for the API call

pub fn ccs_minimize_roundtrips(self, ccs_minimize_roundtrips: bool) -> Self[src]

Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution

pub fn error_trace(self, error_trace: bool) -> Self[src]

Include the stack trace of returned errors.

pub fn filter_path(self, filter_path: &'b [&'b str]) -> Self[src]

A comma-separated list of filters used to reduce the response.

pub fn header(self, key: HeaderName, value: HeaderValue) -> Self[src]

Adds a HTTP header

pub fn human(self, human: bool) -> Self[src]

Return human readable values for statistics.

pub fn max_concurrent_searches(self, max_concurrent_searches: i64) -> Self[src]

Controls the maximum number of concurrent searches the multi search api will execute

pub fn max_concurrent_shard_requests(
    self,
    max_concurrent_shard_requests: i64
) -> Self
[src]

The number of concurrent shard requests each sub search executes concurrently per node. 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

pub fn pre_filter_shard_size(self, pre_filter_shard_size: i64) -> Self[src]

A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint.

pub fn pretty(self, pretty: bool) -> Self[src]

Pretty format the returned JSON response.

pub fn request_timeout(self, timeout: Duration) -> Self[src]

Sets a request timeout for this API call.

The timeout is applied from when the request starts connecting until the response body has finished.

pub fn rest_total_hits_as_int(self, rest_total_hits_as_int: bool) -> Self[src]

Indicates whether hits.total should be rendered as an integer or an object in the rest search response

pub fn search_type(self, search_type: SearchType) -> Self[src]

Search operation type

pub fn source(self, source: &'b str) -> Self[src]

The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.

pub fn typed_keys(self, typed_keys: bool) -> Self[src]

Specify whether aggregation and suggester names should be prefixed by their respective types in the response

pub async fn send(self) -> Result<Response, Error>[src]

Creates an asynchronous call to the Msearch API that can be awaited

Trait Implementations

impl<'a, 'b, B: Clone> Clone for Msearch<'a, 'b, B>[src]

impl<'a, 'b, B: Debug> Debug for Msearch<'a, 'b, B>[src]

Auto Trait Implementations

impl<'a, 'b, B> !RefUnwindSafe for Msearch<'a, 'b, B>

impl<'a, 'b, B> Send for Msearch<'a, 'b, B> where
    B: Send

impl<'a, 'b, B> Sync for Msearch<'a, 'b, B> where
    B: Sync

impl<'a, 'b, B> Unpin for Msearch<'a, 'b, B> where
    B: Unpin

impl<'a, 'b, B> !UnwindSafe for Msearch<'a, 'b, B>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DynClone for T where
    T: Clone
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.