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

(-)a/admin/searchengine/elasticsearch/mappings.yaml (-10 / +10 lines)
Lines 986-992 biblios: Link Here
986
    type: ''
986
    type: ''
987
  author:
987
  author:
988
    facet_order: 1
988
    facet_order: 1
989
    label: author
989
    label: Authors
990
    mandatory: ~
990
    mandatory: ~
991
    mappings:
991
    mappings:
992
    - facet: 1
992
    - facet: 1
Lines 1281-1287 biblios: Link Here
1281
    type: ''
1281
    type: ''
1282
  ccode:
1282
  ccode:
1283
    facet_order: 7
1283
    facet_order: 7
1284
    label: collection-code
1284
    label: Collections
1285
    mandatory: ~
1285
    mandatory: ~
1286
    mappings:
1286
    mappings:
1287
    - facet: 1
1287
    - facet: 1
Lines 1875-1881 biblios: Link Here
1875
    type: geo_point
1875
    type: geo_point
1876
  holdingbranch:
1876
  holdingbranch:
1877
    facet_order: 8
1877
    facet_order: 8
1878
    label: holdinglibrary
1878
    label: Holding libraries
1879
    mandatory: ~
1879
    mandatory: ~
1880
    mappings:
1880
    mappings:
1881
    - facet: 1
1881
    - facet: 1
Lines 1893-1899 biblios: Link Here
1893
    type: string
1893
    type: string
1894
  homebranch:
1894
  homebranch:
1895
    facet_order: 9
1895
    facet_order: 9
1896
    label: homelibrary
1896
    label: Home libraries
1897
    mandatory: ~
1897
    mandatory: ~
1898
    mappings:
1898
    mappings:
1899
    - facet: 1
1899
    - facet: 1
Lines 2151-2157 biblios: Link Here
2151
    type: ''
2151
    type: ''
2152
  itype:
2152
  itype:
2153
    facet_order: 2
2153
    facet_order: 2
2154
    label: itype
2154
    label: Item types
2155
    mandatory: ~
2155
    mandatory: ~
2156
    mappings:
2156
    mappings:
2157
    - facet: 1
2157
    - facet: 1
Lines 2503-2509 biblios: Link Here
2503
    type: ''
2503
    type: ''
2504
  ln:
2504
  ln:
2505
    facet_order: 10
2505
    facet_order: 10
2506
    label: ln
2506
    label: Languages
2507
    mandatory: ~
2507
    mandatory: ~
2508
    mappings:
2508
    mappings:
2509
    - facet: 1
2509
    - facet: 1
Lines 2584-2590 biblios: Link Here
2584
    type: number
2584
    type: number
2585
  location:
2585
  location:
2586
    facet_order: 3
2586
    facet_order: 3
2587
    label: location
2587
    label: Location
2588
    mandatory: ~
2588
    mandatory: ~
2589
    mappings:
2589
    mappings:
2590
    - facet: 1
2590
    - facet: 1
Lines 3380-3386 biblios: Link Here
3380
    type: ''
3380
    type: ''
3381
  su-geo:
3381
  su-geo:
3382
    facet_order: 4
3382
    facet_order: 4
3383
    label: su-geo
3383
    label: Places
3384
    mandatory: ~
3384
    mandatory: ~
3385
    mappings:
3385
    mappings:
3386
    - facet: 1
3386
    - facet: 1
Lines 3398-3404 biblios: Link Here
3398
    type: string
3398
    type: string
3399
  subject:
3399
  subject:
3400
    facet_order: 6
3400
    facet_order: 6
3401
    label: subject
3401
    label: Topics
3402
    mandatory: ~
3402
    mandatory: ~
3403
    mappings:
3403
    mappings:
3404
    - facet: 1
3404
    - facet: 1
Lines 4160-4166 biblios: Link Here
4160
    type: ''
4160
    type: ''
4161
  title-series:
4161
  title-series:
4162
    facet_order: 5
4162
    facet_order: 5
4163
    label: title-series
4163
    label: Series
4164
    mandatory: ~
4164
    mandatory: ~
4165
    mappings:
4165
    mappings:
4166
    - facet: 1
4166
    - facet: 1
(-)a/installer/data/mysql/atomicupdate/bug_35138.pl (-1 / +33 lines)
Line 0 Link Here
0
- 
1
use Modern::Perl;
2
3
return {
4
    bug_number  => "35138",
5
    description => "Make the elastic facets editable",
6
    up          => sub {
7
        my ($args) = @_;
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
9
10
        my $facets = {
11
            author         => 'Authors',
12
            itype          => 'Item types',
13
            location       => 'Location',
14
            'su-geo'       => 'Places',
15
            'title-series' => 'Series',
16
            subject        => 'Topics',
17
            ln             => 'Languages',
18
        };
19
        # Do not update the label if different from the original one
20
        my $sth = $dbh->prepare(q{
21
            UPDATE search_field
22
            SET label = ?
23
            WHERE name = ? AND label = ?
24
        });
25
        while ( my ( $name, $label ) = each %$facets ) {
26
            $sth->execute( $label, $name, $name );
27
        }
28
29
        $sth->execute( 'Collections', 'ccode', 'collection-code');
30
        $sth->execute( 'Holding libraries', 'holdingbranch', 'holdinglibrary');
31
        $sth->execute( 'Home libraries', 'homebranch', 'homelibrary');
32
    },
33
};

Return to bug 35138