From 7d1c2d97bf29efe7503287cb18173fd8e6d349eb Mon Sep 17 00:00:00 2001 From: Kerollmops Date: Tue, 26 Apr 2022 17:59:53 +0200 Subject: [PATCH] Return facets even when there is no values associated to it --- milli/src/search/facet/facet_distribution.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/milli/src/search/facet/facet_distribution.rs b/milli/src/search/facet/facet_distribution.rs index 2208ee636..ddbcb2b68 100644 --- a/milli/src/search/facet/facet_distribution.rs +++ b/milli/src/search/facet/facet_distribution.rs @@ -243,9 +243,7 @@ impl<'a> FacetDistribution<'a> { for (fid, name) in fields_ids_map.iter() { if crate::is_faceted(name, &fields) { let values = self.facet_values(fid)?; - if !values.is_empty() { - distribution.insert(name.to_string(), values); - } + distribution.insert(name.to_string(), values); } }