pub struct DocumentSuggesterOptions {
pub fuzzy_matching: Option<String>,
pub sort_expression: Option<String>,
pub source_field: String,
}
Expand description
Options for a search suggester.
Fields
fuzzy_matching: Option<String>
The level of fuzziness allowed when suggesting matches for a string: none
, low
, or high
. With none, the specified string is treated as an exact prefix. With low, suggestions must differ from the specified string by no more than one character. With high, suggestions can differ by up to two characters. The default is none.
sort_expression: Option<String>
An expression that computes a score for each suggestion to control how they are sorted. The scores are rounded to the nearest integer, with a floor of 0 and a ceiling of 2^31-1. A document's relevance score is not computed for suggestions, so sort expressions cannot reference the _score
value. To sort suggestions using a numeric field or existing expression, simply specify the name of the field or expression. If no expression is configured for the suggester, the suggestions are sorted with the closest matches listed first.
source_field: String
The name of the index field you want to use for suggestions.
Trait Implementations
sourceimpl Clone for DocumentSuggesterOptions
impl Clone for DocumentSuggesterOptions
sourcefn clone(&self) -> DocumentSuggesterOptions
fn clone(&self) -> DocumentSuggesterOptions
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
sourceimpl Debug for DocumentSuggesterOptions
impl Debug for DocumentSuggesterOptions
sourceimpl Default for DocumentSuggesterOptions
impl Default for DocumentSuggesterOptions
sourcefn default() -> DocumentSuggesterOptions
fn default() -> DocumentSuggesterOptions
Returns the “default value” for a type. Read more
sourceimpl PartialEq<DocumentSuggesterOptions> for DocumentSuggesterOptions
impl PartialEq<DocumentSuggesterOptions> for DocumentSuggesterOptions
sourcefn eq(&self, other: &DocumentSuggesterOptions) -> bool
fn eq(&self, other: &DocumentSuggesterOptions) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &DocumentSuggesterOptions) -> bool
fn ne(&self, other: &DocumentSuggesterOptions) -> bool
This method tests for !=
.
impl StructuralPartialEq for DocumentSuggesterOptions
Auto Trait Implementations
impl RefUnwindSafe for DocumentSuggesterOptions
impl Send for DocumentSuggesterOptions
impl Sync for DocumentSuggesterOptions
impl Unpin for DocumentSuggesterOptions
impl UnwindSafe for DocumentSuggesterOptions
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> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
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