Struct meilisearch_sdk::settings::Settings[][src]

pub struct Settings {
    pub synonyms: Option<HashMap<String, Vec<String>>>,
    pub stop_words: Option<Vec<String>>,
    pub ranking_rules: Option<Vec<String>>,
    pub attributes_for_faceting: Option<Vec<String>>,
    pub distinct_attribute: Option<String>,
    pub searchable_attributes: Option<Vec<String>>,
    pub displayed_attributes: Option<Vec<String>>,
}
Expand description

Struct reprensenting a set of settings. You can build this struct using the builder syntax.

Example

let settings = Settings::new()
    .with_stop_words(["a", "the", "of"]);

// OR

let stop_words: Vec<String> = vec!["a".to_string(), "the".to_string(), "of".to_string()];
let mut settings = Settings::new();
settings.stop_words = Some(stop_words);

// OR

let stop_words: Vec<String> = vec!["a".to_string(), "the".to_string(), "of".to_string()];
let settings = Settings {
    stop_words: Some(stop_words),
    ..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

Create undefined settings

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more