mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-30 08:44:27 +01:00
test setting attributes before adding documents
This commit is contained in:
parent
c06dd35af1
commit
36b763b84e
@ -1195,15 +1195,21 @@ async fn search_with_differents_attributes_8() {
|
||||
|
||||
#[actix_rt::test]
|
||||
async fn test_faceted_search_valid() {
|
||||
let mut server = common::Server::test_server().await;
|
||||
// set facetting attributes before adding documents
|
||||
let mut server = common::Server::with_uid("test");
|
||||
server.create_index(json!({ "uid": "test" })).await;
|
||||
|
||||
// simple tests on attributes with string value
|
||||
let body = json!({
|
||||
"attributesForFaceting": ["color"]
|
||||
});
|
||||
|
||||
server.update_all_settings(body).await;
|
||||
|
||||
let dataset = include_bytes!("assets/test_set.json");
|
||||
let body: Value = serde_json::from_slice(dataset).unwrap();
|
||||
server.add_or_update_multiple_documents(body).await;
|
||||
|
||||
// simple tests on attributes with string value
|
||||
|
||||
let query = json!({
|
||||
"q": "a",
|
||||
"facetFilters": ["color:green"]
|
||||
|
Loading…
Reference in New Issue
Block a user