mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 20:07:09 +02:00
facet settings
This commit is contained in:
parent
59c67f6bc8
commit
270c7b0288
4 changed files with 54 additions and 1 deletions
|
@ -8,7 +8,6 @@ mod common;
|
|||
async fn write_all_and_delete() {
|
||||
let mut server = common::Server::with_uid("movies");
|
||||
server.populate_movies().await;
|
||||
|
||||
// 2 - Send the settings
|
||||
|
||||
let body = json!({
|
||||
|
@ -48,9 +47,11 @@ async fn write_all_and_delete() {
|
|||
"wolverine": ["xmen", "logan"],
|
||||
"logan": ["wolverine"],
|
||||
},
|
||||
"attributesForFaceting": ["title"],
|
||||
"acceptNewFields": false,
|
||||
});
|
||||
|
||||
|
||||
server.update_all_settings(body.clone()).await;
|
||||
|
||||
// 3 - Get all settings and compare to the previous one
|
||||
|
@ -119,6 +120,7 @@ async fn write_all_and_delete() {
|
|||
],
|
||||
"stopWords": [],
|
||||
"synonyms": {},
|
||||
"attributesForFaceting": null,
|
||||
"acceptNewFields": true,
|
||||
});
|
||||
|
||||
|
@ -169,6 +171,7 @@ async fn write_all_and_update() {
|
|||
"wolverine": ["xmen", "logan"],
|
||||
"logan": ["wolverine"],
|
||||
},
|
||||
"attributesForFaceting": ["title"],
|
||||
"acceptNewFields": false,
|
||||
});
|
||||
|
||||
|
@ -210,6 +213,7 @@ async fn write_all_and_update() {
|
|||
"wolverine": ["xmen", "logan"],
|
||||
"logan": ["wolverine", "xmen"],
|
||||
},
|
||||
"attributesForFaceting": ["title"],
|
||||
"acceptNewFields": false,
|
||||
});
|
||||
|
||||
|
@ -247,6 +251,7 @@ async fn write_all_and_update() {
|
|||
"wolverine": ["xmen", "logan"],
|
||||
"logan": ["wolverine", "xmen"],
|
||||
},
|
||||
"attributesForFaceting": ["title"],
|
||||
"acceptNewFields": false
|
||||
});
|
||||
|
||||
|
@ -277,6 +282,7 @@ async fn test_default_settings() {
|
|||
"displayedAttributes": [],
|
||||
"stopWords": [],
|
||||
"synonyms": {},
|
||||
"attributesForFaceting": null,
|
||||
"acceptNewFields": true,
|
||||
});
|
||||
|
||||
|
@ -314,6 +320,7 @@ async fn test_default_settings_2() {
|
|||
],
|
||||
"stopWords": [],
|
||||
"synonyms": {},
|
||||
"attributesForFaceting": null,
|
||||
"acceptNewFields": true,
|
||||
});
|
||||
|
||||
|
@ -421,6 +428,7 @@ async fn write_setting_and_update_partial() {
|
|||
"wolverine": ["xmen", "logan"],
|
||||
"logan": ["wolverine"],
|
||||
},
|
||||
"attributesForFaceting": null,
|
||||
"acceptNewFields": false,
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue