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 3352-3358 biblios: Link Here
3352
    type: ''
3352
    type: ''
3353
  su-geo:
3353
  su-geo:
3354
    facet_order: 4
3354
    facet_order: 4
3355
    label: su-geo
3355
    label: Places
3356
    mandatory: ~
3356
    mandatory: ~
3357
    mappings:
3357
    mappings:
3358
    - facet: 1
3358
    - facet: 1
Lines 3370-3376 biblios: Link Here
3370
    type: string
3370
    type: string
3371
  subject:
3371
  subject:
3372
    facet_order: 6
3372
    facet_order: 6
3373
    label: subject
3373
    label: Topics
3374
    mandatory: ~
3374
    mandatory: ~
3375
    mappings:
3375
    mappings:
3376
    - facet: 1
3376
    - facet: 1
Lines 4132-4138 biblios: Link Here
4132
    type: ''
4132
    type: ''
4133
  title-series:
4133
  title-series:
4134
    facet_order: 5
4134
    facet_order: 5
4135
    label: title-series
4135
    label: Series
4136
    mandatory: ~
4136
    mandatory: ~
4137
    mappings:
4137
    mappings:
4138
    - facet: 1
4138
    - 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