|
Lines 39-45
Koha::SearchEngine::ElasticSearch::Search - search functions for Elasticsearch
Link Here
|
| 39 |
=cut |
39 |
=cut |
| 40 |
|
40 |
|
| 41 |
use base qw(Koha::ElasticSearch); |
41 |
use base qw(Koha::ElasticSearch); |
|
|
42 |
use C4::Context; |
| 42 |
use Koha::ItemTypes; |
43 |
use Koha::ItemTypes; |
|
|
44 |
use Koha::AuthorisedValues; |
| 43 |
use Koha::SearchEngine::QueryBuilder; |
45 |
use Koha::SearchEngine::QueryBuilder; |
| 44 |
|
46 |
|
| 45 |
use Catmandu::Store::ElasticSearch; |
47 |
use Catmandu::Store::ElasticSearch; |
|
Lines 400-407
sub _convert_facets {
Link Here
|
| 400 |
# We also have some special cases, e.g. itypes that need to show the |
402 |
# We also have some special cases, e.g. itypes that need to show the |
| 401 |
# value rather than the code. |
403 |
# value rather than the code. |
| 402 |
my @itypes = Koha::ItemTypes->search; |
404 |
my @itypes = Koha::ItemTypes->search; |
|
|
405 |
my @locations = Koha::AuthorisedValues->search( { category => 'LOC' } ); |
| 406 |
my $opac = C4::Context->interface eq 'opac' ; |
| 403 |
my %special = ( |
407 |
my %special = ( |
| 404 |
itype => { map { $_->itemtype => $_->description } @itypes }, |
408 |
itype => { map { $_->itemtype => $_->description } @itypes }, |
|
|
409 |
location => { map { $_->authorised_value => ( $opac ? ( $_->lib_opac || $_->lib ) : $_->lib ) } @locations }, |
| 405 |
); |
410 |
); |
| 406 |
my @res; |
411 |
my @res; |
| 407 |
$exp_facet //= ''; |
412 |
$exp_facet //= ''; |
| 408 |
- |
|
|