mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 11:57:07 +02:00
feat(all): introduce disable typos
This commit is contained in:
parent
09734f0732
commit
981fba5b44
5 changed files with 395 additions and 221 deletions
|
@ -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(
|
||||
|
|
|
@ -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!([]));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue