feat(all): introduce disable typos

This commit is contained in:
ad hoc 2022-03-17 11:59:35 +01:00
parent 09734f0732
commit 981fba5b44
No known key found for this signature in database
GPG key ID: 4F00A782990CC643
5 changed files with 395 additions and 221 deletions

View file

@ -161,6 +161,13 @@ make_setting_route!(
"displayedAttributes"
);
make_setting_route!(
"/typo",
meilisearch_lib::index::updates::TypoSettings,
typo,
"typo"
);
make_setting_route!(
"/searchable-attributes",
Vec<String>,
@ -246,7 +253,8 @@ generate_configure!(
distinct_attribute,
stop_words,
synonyms,
ranking_rules
ranking_rules,
typo
);
pub async fn update_all(

View file

@ -43,7 +43,7 @@ async fn get_settings() {
let (response, code) = index.settings().await;
assert_eq!(code, 200);
let settings = response.as_object().unwrap();
assert_eq!(settings.keys().len(), 8);
assert_eq!(settings.keys().len(), 9);
assert_eq!(settings["displayedAttributes"], json!(["*"]));
assert_eq!(settings["searchableAttributes"], json!(["*"]));
assert_eq!(settings["filterableAttributes"], json!([]));