ES 7.x fixes + bonus
* Fix `::Query->add_bool()` for stricter parser in ES 7.x * Add `value_count` as a valid aggregation for sorting
This commit is contained in:
parent
963498bd7d
commit
ff914b2e69
|
@ -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
|
||||
|
|
|
@ -209,7 +209,7 @@ foreach my $presence ( qw( exists missing ) ) {
|
|||
}
|
||||
}
|
||||
|
||||
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};
|
||||
|
|
Loading…
Reference in New Issue