diff --git a/lib/App/ElasticSearch/Utilities/Query.pm b/lib/App/ElasticSearch/Utilities/Query.pm index bb90728..0ba99b7 100644 --- a/lib/App/ElasticSearch/Utilities/Query.pm +++ b/lib/App/ElasticSearch/Utilities/Query.pm @@ -629,7 +629,7 @@ sub add_bool { ## no critic no strict 'refs'; my $set = $self->$section; - push @{ $set }, $bools{$section}; + push @{ $set }, is_arrayref($bools{$section}) ? @{ $bools{$section} } : $bools{$section}; my $setter = "set_$section"; $self->$setter($set); ## use critic diff --git a/scripts/es-search.pl b/scripts/es-search.pl index fad56f7..9a18eac 100755 --- a/scripts/es-search.pl +++ b/scripts/es-search.pl @@ -209,7 +209,7 @@ } } -my %SUPPORTED_AGGREGATIONS = map {$_=>'simple_value'} qw(cardinality sum min max avg); +my %SUPPORTED_AGGREGATIONS = map {$_=>'simple_value'} qw(cardinality sum min max avg value_count); my $agg_header = ''; if( exists $OPT{top} ) { my @top = split /:/, $OPT{top};