Struct SearchQueryOperation

Source
pub struct SearchQueryOperation<'a, 'b> { /* private fields */ }

Implementations§

Source§

impl<'a, 'b> SearchQueryOperation<'a, 'b>

Source

pub fn new(client: &'a mut Client) -> Self

Source

pub fn with_indexes(&mut self, indexes: &'b [&'b str]) -> &mut Self

Source

pub fn with_types(&mut self, doc_types: &'b [&'b str]) -> &mut Self

Source

pub fn with_query(&mut self, query: &'b Query) -> &mut Self

Source

pub fn with_timeout(&mut self, timeout: &'b str) -> &mut Self

Source

pub fn with_from(&mut self, from: u64) -> &mut Self

Source

pub fn with_size(&mut self, size: u64) -> &mut Self

Source

pub fn with_version(&mut self, version: bool) -> &mut Self

Source

pub fn with_terminate_after(&mut self, terminate_after: u64) -> &mut Self

Source

pub fn with_stats<S>(&mut self, stats: &[S]) -> &mut Self
where S: ToString,

Source

pub fn with_min_score(&mut self, min_score: f64) -> &mut Self

Source

pub fn with_sort(&mut self, sort: &'b Sort) -> &mut Self

Source

pub fn with_track_scores(&mut self, track_scores: bool) -> &mut Self

Source

pub fn with_source(&mut self, source: Source<'b>) -> &mut Self

Specify source filtering, by default full source will be returned in a hit

To switch-off source document in each hit: with_source(Source::Off). To include fields: with_source(Source::include(&["field_name"])), To exclude fields: with_source(Source::exclude(&["field_name"])), To include and exclude: with_source(Source::filter(&["include"], &["exclude"]))

Source

pub fn with_aggs(&mut self, aggs: &'b Aggregations<'_>) -> &mut Self

Specify any aggregations

Source

pub fn with_highlight(&mut self, highlight: &'b Highlight) -> &mut Self

Specify fields to highlight

Source

pub fn with_routing<T: Into<OptionVal>>(&'a mut self, val: T) -> &'a mut Self

Source

pub fn with_search_type<T: Into<OptionVal>>( &'a mut self, val: T, ) -> &'a mut Self

Source

pub fn with_query_cache<T: Into<OptionVal>>( &'a mut self, val: T, ) -> &'a mut Self

Source

pub fn with_ignore_unavailable<T: Into<OptionVal>>( &'a mut self, val: T, ) -> &'a mut Self

Source

pub fn with_allow_no_indices<T: Into<OptionVal>>( &'a mut self, val: T, ) -> &'a mut Self

Source

pub fn with_expand_wildcards<T: Into<OptionVal>>( &'a mut self, val: T, ) -> &'a mut Self

Source

pub fn with_explain<T: Into<OptionVal>>(&'a mut self, val: T) -> &'a mut Self

Source

pub fn send<T>(&'b mut self) -> Result<SearchResult<T>, EsError>

Performs the search with the specified query and options

Source

pub fn scan<T>( &'b mut self, scroll: &'b Duration, ) -> Result<ScanResult<T>, EsError>

Begins a scan with the specified query and options

Trait Implementations§

Source§

impl<'a, 'b> Debug for SearchQueryOperation<'a, 'b>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a, 'b> Freeze for SearchQueryOperation<'a, 'b>

§

impl<'a, 'b> !RefUnwindSafe for SearchQueryOperation<'a, 'b>

§

impl<'a, 'b> Send for SearchQueryOperation<'a, 'b>

§

impl<'a, 'b> Sync for SearchQueryOperation<'a, 'b>

§

impl<'a, 'b> Unpin for SearchQueryOperation<'a, 'b>

§

impl<'a, 'b> !UnwindSafe for SearchQueryOperation<'a, 'b>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Err>

Source§

impl<T> ErasedDestructor for T
where T: 'static,