diff --git a/meilisearch/src/routes/indexes/settings.rs b/meilisearch/src/routes/indexes/settings.rs index 7035093eb..fb5d8ff7a 100644 --- a/meilisearch/src/routes/indexes/settings.rs +++ b/meilisearch/src/routes/indexes/settings.rs @@ -401,13 +401,17 @@ make_setting_route!( analytics, |setting: &Option, req: &HttpRequest| { use serde_json::json; + use meilisearch_types::facet_values_sort::FacetValuesSort; analytics.publish( "Faceting Updated".to_string(), 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()), + "sort_facet_values_by_star_count": setting.as_ref().and_then(|s| { + s.sort_facet_values_by.as_ref().set().map(|s| s.iter().any(|(k, v)| k == "*" && v == &FacetValuesSort::Count)) + }), + "sort_facet_values_by_total": setting.as_ref().and_then(|s| s.sort_facet_values_by.as_ref().set().map(|s| s.len())), }, }), Some(req),