Move the sortFacetValuesBy in the faceting settings

This commit is contained in:
Kerollmops 2023-06-22 17:13:40 +02:00 committed by Clément Renault
parent d9fea0143f
commit 9917bf046a
No known key found for this signature in database
GPG key ID: 92ADA4E935E71FA4
11 changed files with 213 additions and 70 deletions

View file

@ -407,6 +407,7 @@ make_setting_route!(
json!({
"faceting": {
"max_values_per_facet": setting.as_ref().and_then(|s| s.max_values_per_facet.set()),
"sort_facet_values_by": setting.as_ref().and_then(|s| s.sort_facet_values_by.clone().set()),
},
}),
Some(req),
@ -545,6 +546,10 @@ pub async fn update_all(
.as_ref()
.set()
.and_then(|s| s.max_values_per_facet.as_ref().set()),
"sort_facet_values_by": new_settings.faceting
.as_ref()
.set()
.and_then(|s| s.sort_facet_values_by.as_ref().set()),
},
"pagination": {
"max_total_hits": new_settings.pagination