mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-07-27 16:51:01 +00:00
@ -1779,8 +1779,8 @@ async fn update_documents_with_facet_distribution() {
|
||||
server.create_index(body).await;
|
||||
let settings = json!({
|
||||
"attributesForFaceting": ["genre"],
|
||||
"displayedAttributes": ["genre"],
|
||||
"searchableAttributes": ["genre"]
|
||||
"displayedAttributes": ["genre", "type"],
|
||||
"searchableAttributes": ["genre", "type"]
|
||||
});
|
||||
server.update_all_settings(settings).await;
|
||||
let update1 = json!([
|
||||
@ -1809,6 +1809,7 @@ async fn update_documents_with_facet_distribution() {
|
||||
"facetsDistribution": ["genre"]
|
||||
});
|
||||
let (response1, _) = server.search_post(search.clone()).await;
|
||||
println!("response1: {}", response1);
|
||||
let expected_facet_distribution = json!({
|
||||
"genre": {
|
||||
"grunge": 1,
|
||||
@ -1827,5 +1828,6 @@ async fn update_documents_with_facet_distribution() {
|
||||
]);
|
||||
server.add_or_update_multiple_documents(update2).await;
|
||||
let (response2, _) = server.search_post(search).await;
|
||||
println!("response2: {}", response2);
|
||||
assert_json_eq!(expected_facet_distribution, response2["facetsDistribution"].clone());
|
||||
}
|
||||
|
Reference in New Issue
Block a user