View | Details | Raw Unified | Return to bug 18235
Collapse All | Expand All

(-)a/Koha/SearchEngine/Elasticsearch.pm (-1 / +1 lines)
Lines 986-992 sub get_facetable_fields { Link Here
986
986
987
    # These should correspond to the ES field names, as opposed to the CCL
987
    # These should correspond to the ES field names, as opposed to the CCL
988
    # things that zebra uses.
988
    # things that zebra uses.
989
    my @search_field_names = qw( author itype location su-geo se subject ccode holdingbranch homebranch );
989
    my @search_field_names = qw( author itype location su-geo title-series subject ccode holdingbranch homebranch );
990
    my @faceted_fields = Koha::SearchFields->search(
990
    my @faceted_fields = Koha::SearchFields->search(
991
        { name => { -in => \@search_field_names }, facet_order => { '!=' => undef } }, { order_by => ['facet_order'] }
991
        { name => { -in => \@search_field_names }, facet_order => { '!=' => undef } }, { order_by => ['facet_order'] }
992
    );
992
    );
(-)a/installer/data/mysql/atomicupdate/bug_18235-add-search_field-facet_order.perl (-1 / +1 lines)
Lines 8-14 if( CheckVersion( $DBversion ) ) { Link Here
8
    $dbh->do("UPDATE search_field SET facet_order=2 WHERE name='itype'");
8
    $dbh->do("UPDATE search_field SET facet_order=2 WHERE name='itype'");
9
    $dbh->do("UPDATE search_field SET facet_order=3 WHERE name='location'");
9
    $dbh->do("UPDATE search_field SET facet_order=3 WHERE name='location'");
10
    $dbh->do("UPDATE search_field SET facet_order=4 WHERE name='su-geo'");
10
    $dbh->do("UPDATE search_field SET facet_order=4 WHERE name='su-geo'");
11
    $dbh->do("UPDATE search_field SET facet_order=5 WHERE name='se'");
11
    $dbh->do("UPDATE search_field SET facet_order=5 WHERE name='title-series'");
12
    $dbh->do("UPDATE search_field SET facet_order=6 WHERE name='subject'");
12
    $dbh->do("UPDATE search_field SET facet_order=6 WHERE name='subject'");
13
    $dbh->do("UPDATE search_field SET facet_order=7 WHERE name='ccode'");
13
    $dbh->do("UPDATE search_field SET facet_order=7 WHERE name='ccode'");
14
    $dbh->do("UPDATE search_field SET facet_order=8 WHERE name='holdingbranch'");
14
    $dbh->do("UPDATE search_field SET facet_order=8 WHERE name='holdingbranch'");
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt (-1 / +1 lines)
Lines 364-370 a.add, a.delete { Link Here
364
                                                [% CASE 'itype' %]Item Types
364
                                                [% CASE 'itype' %]Item Types
365
                                                [% CASE 'location' %]Locations
365
                                                [% CASE 'location' %]Locations
366
                                                [% CASE 'su-geo' %]Places
366
                                                [% CASE 'su-geo' %]Places
367
                                                [% CASE 'se' %]Series
367
                                                [% CASE 'title-series' %]Series
368
                                                [% CASE 'subject' %]Topics
368
                                                [% CASE 'subject' %]Topics
369
                                                [% CASE 'ccode' %]Collections
369
                                                [% CASE 'ccode' %]Collections
370
                                                [% CASE 'holdingbranch' %]Holding libraries
370
                                                [% CASE 'holdingbranch' %]Holding libraries
(-)a/t/db_dependent/Koha_Elasticsearch.t (-4 / +3 lines)
Lines 75-82 subtest 'get_facetable_fields() tests' => sub { Link Here
75
    $builder->build({
75
    $builder->build({
76
        source => 'SearchField',
76
        source => 'SearchField',
77
        value => {
77
        value => {
78
            name => 'se',
78
            name => 'title-series',
79
            label => 'se',
79
            label => 'titles-series',
80
            type => 'string',
80
            type => 'string',
81
            facet_order => 4
81
            facet_order => 4
82
        }
82
        }
Lines 118-124 subtest 'get_facetable_fields() tests' => sub { Link Here
118
    is($faceted_fields[1]->facet_order, 2);
118
    is($faceted_fields[1]->facet_order, 2);
119
    is($faceted_fields[2]->name, 'itype');
119
    is($faceted_fields[2]->name, 'itype');
120
    is($faceted_fields[2]->facet_order, 3);
120
    is($faceted_fields[2]->facet_order, 3);
121
    is($faceted_fields[3]->name, 'se');
121
    is($faceted_fields[3]->name, 'title-series');
122
    is($faceted_fields[3]->facet_order, 4);
122
    is($faceted_fields[3]->facet_order, 4);
123
    is($faceted_fields[4]->name, 'su-geo');
123
    is($faceted_fields[4]->name, 'su-geo');
124
    is($faceted_fields[4]->facet_order, 5);
124
    is($faceted_fields[4]->facet_order, 5);
125
- 

Return to bug 18235