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 1857-1863 biblios: Link Here
1857
    type: ''
1857
    type: ''
1858
  holdingbranch:
1858
  holdingbranch:
1859
    facet_order: 8
1859
    facet_order: 8
1860
    label: holdinglibrary
1860
    label: Holding libraries
1861
    mandatory: ~
1861
    mandatory: ~
1862
    mappings:
1862
    mappings:
1863
    - facet: 1
1863
    - facet: 1
Lines 1875-1881 biblios: Link Here
1875
    type: string
1875
    type: string
1876
  homebranch:
1876
  homebranch:
1877
    facet_order: 9
1877
    facet_order: 9
1878
    label: homelibrary
1878
    label: Home libraries
1879
    mandatory: ~
1879
    mandatory: ~
1880
    mappings:
1880
    mappings:
1881
    - facet: 1
1881
    - facet: 1
Lines 2133-2139 biblios: Link Here
2133
    type: ''
2133
    type: ''
2134
  itype:
2134
  itype:
2135
    facet_order: 2
2135
    facet_order: 2
2136
    label: itype
2136
    label: Item types
2137
    mandatory: ~
2137
    mandatory: ~
2138
    mappings:
2138
    mappings:
2139
    - facet: 1
2139
    - facet: 1
Lines 2485-2491 biblios: Link Here
2485
    type: ''
2485
    type: ''
2486
  ln:
2486
  ln:
2487
    facet_order: 10
2487
    facet_order: 10
2488
    label: ln
2488
    label: Languages
2489
    mandatory: ~
2489
    mandatory: ~
2490
    mappings:
2490
    mappings:
2491
    - facet: 1
2491
    - facet: 1
Lines 2566-2572 biblios: Link Here
2566
    type: number
2566
    type: number
2567
  location:
2567
  location:
2568
    facet_order: 3
2568
    facet_order: 3
2569
    label: location
2569
    label: Location
2570
    mandatory: ~
2570
    mandatory: ~
2571
    mappings:
2571
    mappings:
2572
    - facet: 1
2572
    - facet: 1
Lines 3362-3368 biblios: Link Here
3362
    type: ''
3362
    type: ''
3363
  su-geo:
3363
  su-geo:
3364
    facet_order: 4
3364
    facet_order: 4
3365
    label: su-geo
3365
    label: Places
3366
    mandatory: ~
3366
    mandatory: ~
3367
    mappings:
3367
    mappings:
3368
    - facet: 1
3368
    - facet: 1
Lines 3380-3386 biblios: Link Here
3380
    type: string
3380
    type: string
3381
  subject:
3381
  subject:
3382
    facet_order: 6
3382
    facet_order: 6
3383
    label: subject
3383
    label: Topics
3384
    mandatory: ~
3384
    mandatory: ~
3385
    mappings:
3385
    mappings:
3386
    - facet: 1
3386
    - facet: 1
Lines 4142-4148 biblios: Link Here
4142
    type: ''
4142
    type: ''
4143
  title-series:
4143
  title-series:
4144
    facet_order: 5
4144
    facet_order: 5
4145
    label: title-series
4145
    label: Series
4146
    mandatory: ~
4146
    mandatory: ~
4147
    mappings:
4147
    mappings:
4148
    - facet: 1
4148
    - 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