Lines 454-463
sub _convert_facets {
Link Here
|
454 |
holdingbranch => 'HoldingLibrary', |
454 |
holdingbranch => 'HoldingLibrary', |
455 |
homebranch => 'HomeLibrary', |
455 |
homebranch => 'HomeLibrary', |
456 |
ln => 'Language', |
456 |
ln => 'Language', |
|
|
457 |
'has-eresource' => 'HasEresource', |
458 |
'only-print' => 'OnlyPrint' |
457 |
); |
459 |
); |
458 |
my @facetable_fields = |
460 |
my @facetable_fields = |
459 |
Koha::SearchEngine::Elasticsearch->get_facetable_fields; |
461 |
Koha::SearchEngine::Elasticsearch->get_facetable_fields; |
460 |
for my $f (@facetable_fields) { |
462 |
|
|
|
463 |
for my $f (@facetable_fields) { |
461 |
next unless defined $f->facet_order; |
464 |
next unless defined $f->facet_order; |
462 |
$type_to_label{ $f->name } = |
465 |
$type_to_label{ $f->name } = |
463 |
{ order => $f->facet_order, label => $label{ $f->name } }; |
466 |
{ order => $f->facet_order, label => $label{ $f->name } }; |
Lines 495-501
sub _convert_facets {
Link Here
|
495 |
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 |
498 |
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 |
496 |
my $c = $term->{doc_count}; |
499 |
my $c = $term->{doc_count}; |
497 |
my $label; |
500 |
my $label; |
498 |
if ( exists( $special{$type} ) ) { |
501 |
if ($type eq 'has-eresource') { |
|
|
502 |
$t = $t && $t ne 'false' ? 'true' : 'false'; |
503 |
} elsif ( exists( $special{$type} ) ) { |
499 |
$label = $special{$type}->{$t} // $t; |
504 |
$label = $special{$type}->{$t} // $t; |
500 |
} |
505 |
} |
501 |
else { |
506 |
else { |