Lines 406-412
sub _convert_facets {
Link Here
|
406 |
|
406 |
|
407 |
# We restrict to the most popular $limit results |
407 |
# We restrict to the most popular $limit results |
408 |
my $limit = ( $type eq $exp_facet ) ? 10 : 5; |
408 |
my $limit = ( $type eq $exp_facet ) ? 10 : 5; |
409 |
$limit = $#{ $data->{terms} } if ( $limit > @{ $data->{terms} } ); |
|
|
410 |
my $facet = { |
409 |
my $facet = { |
411 |
type_id => $type . '_id', |
410 |
type_id => $type . '_id', |
412 |
expand => $type, |
411 |
expand => $type, |
Lines 415-420
sub _convert_facets {
Link Here
|
415 |
"type_label_$type_to_label{$type}" => 1, |
414 |
"type_label_$type_to_label{$type}" => 1, |
416 |
type_link_value => $type, |
415 |
type_link_value => $type, |
417 |
}; |
416 |
}; |
|
|
417 |
$limit = $#{ $data->{terms} } if ( $limit > @{ $data->{terms} } ); |
418 |
foreach my $term ( @{ $data->{terms} }[ 0 .. $limit - 1 ] ) { |
418 |
foreach my $term ( @{ $data->{terms} }[ 0 .. $limit - 1 ] ) { |
419 |
my $t = $term->{term}; |
419 |
my $t = $term->{term}; |
420 |
my $c = $term->{count}; |
420 |
my $c = $term->{count}; |
421 |
- |
|
|