mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 11:57:07 +02:00
Merge #518
518: Return facets even when there is no value associated to it r=Kerollmops a=Kerollmops This PR is related to https://github.com/meilisearch/meilisearch/issues/2352 and should fix the issue when Meilisearch is up-to-date with this PR. Co-authored-by: Kerollmops <clement@meilisearch.com>
This commit is contained in:
commit
9db86aac51
3 changed files with 79 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue