[−][src]Struct meilisearch_sdk::settings::Settings
Struct reprensenting a set of settings. You can build this struct using the builder syntax.
Example
let stop_words = vec![String::from("a"), String::from("the"), String::from("of")]; let settings = Settings::new() .with_stop_words(stop_words.clone()); // OR let mut settings = Settings::new(); settings.stop_words = Some(stop_words.clone()); // OR let settings = Settings { stop_words: Some(stop_words.clone()), ..Settings::new() };
Fields
synonyms: Option<HashMap<String, Vec<String>>>
List of associated words treated similarly
stop_words: Option<Vec<String>>
List of words ignored by MeiliSearch when present in search queries
ranking_rules: Option<Vec<String>>
List of ranking rules sorted by order of importance
attributes_for_faceting: Option<Vec<String>>
Attributes to use as facets
distinct_attribute: Option<String>
Search returns documents with distinct (different) values of the given field
searchable_attributes: Option<Vec<String>>
Fields in which to search for matching query words sorted by order of importance
displayed_attributes: Option<Vec<String>>
Fields displayed in the returned documents
Implementations
impl Settings
[src]
pub fn new() -> Settings
[src]
Create undefined settings
pub fn with_synonyms(self, synonyms: HashMap<String, Vec<String>>) -> Settings
[src]
pub fn with_stop_words(self, stop_words: Vec<String>) -> Settings
[src]
pub fn with_ranking_rules(self, ranking_rules: Vec<String>) -> Settings
[src]
pub fn with_attributes_for_faceting(
self,
attributes_for_faceting: Vec<String>
) -> Settings
[src]
self,
attributes_for_faceting: Vec<String>
) -> Settings
pub fn with_distinct_attribute(self, distinct_attribute: String) -> Settings
[src]
pub fn with_searchable_attributes(
self,
searchable_attributes: Vec<String>
) -> Settings
[src]
self,
searchable_attributes: Vec<String>
) -> Settings
pub fn with_displayed_attributes(
self,
displayed_attributes: Vec<String>
) -> Settings
[src]
self,
displayed_attributes: Vec<String>
) -> Settings
Trait Implementations
impl Debug for Settings
[src]
impl Default for Settings
[src]
impl<'de> Deserialize<'de> for Settings
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for Settings
[src]
Auto Trait Implementations
impl RefUnwindSafe for Settings
impl Send for Settings
impl Sync for Settings
impl Unpin for Settings
impl UnwindSafe for Settings
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,