Bug 29561: (follow-up) Don't remove facet '0'

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c4161b703e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Nick Clemens 2022-09-22 19:54:07 +00:00 committed by Lucas Gass
parent 3fb3a8c7d6
commit 6aa1ea5e0c

View file

@ -492,7 +492,7 @@ sub _convert_facets {
$limit = @{ $data->{buckets} } if ( $limit > @{ $data->{buckets} } );
foreach my $term ( @{ $data->{buckets} }[ 0 .. $limit - 1 ] ) {
my $t = $term->{key};
next unless $t; # FIXME Currently we cannot search for an empty faceted field i.e. ln:"" to find records missing languages, though ES does count them correctly
next unless length($t); # FIXME Currently we cannot search for an empty faceted field i.e. ln:"" to find records missing languages, though ES does count them correctly
my $c = $term->{doc_count};
my $label;
if ( exists( $special{$type} ) ) {