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

(-)a/C4/AuthoritiesMarc.pm (-6 / +9 lines)
Lines 888-893 sub BuildSummary { Link Here
888
    my @seefrom;
888
    my @seefrom;
889
    my @seealso;
889
    my @seealso;
890
    my @otherscript;
890
    my @otherscript;
891
    my $authsubfield = Koha::Authorities->authority_linking_subfield;
891
    if (C4::Context->preference('marcflavour') eq 'UNIMARC') {
892
    if (C4::Context->preference('marcflavour') eq 'UNIMARC') {
892
# construct UNIMARC summary, that is quite different from MARC21 one
893
# construct UNIMARC summary, that is quite different from MARC21 one
893
# accepted form
894
# accepted form
Lines 922-928 sub BuildSummary { Link Here
922
                heading => $heading,
923
                heading => $heading,
923
                hemain  => ( $_->subfield('a') // undef ),
924
                hemain  => ( $_->subfield('a') // undef ),
924
                search  => $heading,
925
                search  => $heading,
925
                authid  => ( $_->subfield('9') // undef ),
926
                authid  => ( $_->subfield($authsubfield) // undef ),
926
            }
927
            }
927
        } $record->field('5..');
928
        } $record->field('5..');
928
929
Lines 1021-1027 sub BuildSummary { Link Here
1021
                    type    => $field->subfield('i'),
1022
                    type    => $field->subfield('i'),
1022
                    field   => $field->tag(),
1023
                    field   => $field->tag(),
1023
                    search  => $field->as_string($marc21subfields) || '',
1024
                    search  => $field->as_string($marc21subfields) || '',
1024
                    authid  => $field->subfield('9') || ''
1025
                    authid  => $field->subfield($authsubfield) || ''
1025
                };
1026
                };
1026
            } else {
1027
            } else {
1027
                push @seealso, {
1028
                push @seealso, {
Lines 1030-1036 sub BuildSummary { Link Here
1030
                    type    => $type,
1031
                    type    => $type,
1031
                    field   => $field->tag(),
1032
                    field   => $field->tag(),
1032
                    search  => $field->as_string($marc21subfields) || '',
1033
                    search  => $field->as_string($marc21subfields) || '',
1033
                    authid  => $field->subfield('9') || ''
1034
                    authid  => $field->subfield($authsubfield) || ''
1034
                };
1035
                };
1035
            }
1036
            }
1036
        }
1037
        }
Lines 1305-1311 sub GenerateHierarchy { Link Here
1305
1306
1306
sub _get_authid_subfield{
1307
sub _get_authid_subfield{
1307
    my ($field)=@_;
1308
    my ($field)=@_;
1308
    return $field->subfield('9')||$field->subfield('3');
1309
    my $authsubfield = Koha::Authorities->authority_linking_subfield;
1310
    return $field->subfield($authsubfield)||$field->subfield('3');
1309
}
1311
}
1310
1312
1311
=head2 GetHeaderAuthority
1313
=head2 GetHeaderAuthority
Lines 1408-1413 sub merge { Link Here
1408
    # Search authtypes and reporting tags
1410
    # Search authtypes and reporting tags
1409
    my $authfrom = Koha::Authorities->find($mergefrom);
1411
    my $authfrom = Koha::Authorities->find($mergefrom);
1410
    my $authto = Koha::Authorities->find($mergeto);
1412
    my $authto = Koha::Authorities->find($mergeto);
1413
    my $authsubfield = Koha::Authorities->authority_linking_subfield;
1411
    my $authtypefrom = $authfrom ? Koha::Authority::Types->find($authfrom->authtypecode) : undef;
1414
    my $authtypefrom = $authfrom ? Koha::Authority::Types->find($authfrom->authtypecode) : undef;
1412
    my $authtypeto   = $authto ? Koha::Authority::Types->find($authto->authtypecode) : undef;
1415
    my $authtypeto   = $authto ? Koha::Authority::Types->find($authto->authtypecode) : undef;
1413
    my $auth_tag_to_report_from = $authtypefrom ? $authtypefrom->auth_tag_to_report : '';
1416
    my $auth_tag_to_report_from = $authtypefrom ? $authtypefrom->auth_tag_to_report : '';
Lines 1459-1465 sub merge { Link Here
1459
        foreach my $tagfield (@$tags_using_authtype) {
1462
        foreach my $tagfield (@$tags_using_authtype) {
1460
            my $countfrom = 0;    # used in strict mode to remove duplicates
1463
            my $countfrom = 0;    # used in strict mode to remove duplicates
1461
            foreach my $field ( $marcrecord->field($tagfield) ) {
1464
            foreach my $field ( $marcrecord->field($tagfield) ) {
1462
                my $auth_number = $field->subfield("9");    # link to authority
1465
                my $auth_number = $field->subfield($authsubfield);    # link to authority
1463
                my $tag         = $field->tag();
1466
                my $tag         = $field->tag();
1464
                next if !defined($auth_number) || $auth_number ne $mergefrom;
1467
                next if !defined($auth_number) || $auth_number ne $mergefrom;
1465
                $countfrom++;
1468
                $countfrom++;
Lines 1479-1485 sub merge { Link Here
1479
                    $newtag,
1482
                    $newtag,
1480
                    $controlled_ind->{ind1} // $field->indicator(1),
1483
                    $controlled_ind->{ind1} // $field->indicator(1),
1481
                    $controlled_ind->{ind2} // $field->indicator(2),
1484
                    $controlled_ind->{ind2} // $field->indicator(2),
1482
                    9 => $mergeto, # Needed to create field, will be moved
1485
                    $authsubfield => $mergeto, # Needed to create field, will be moved
1483
                );
1486
                );
1484
                my ( @prefix, @postfix );
1487
                my ( @prefix, @postfix );
1485
                if ( !$overwrite ) {
1488
                if ( !$overwrite ) {
(-)a/C4/Biblio.pm (-21 / +26 lines)
Lines 99-104 use C4::OAI::Sets; Link Here
99
use C4::Debug;
99
use C4::Debug;
100
100
101
use Koha::Caches;
101
use Koha::Caches;
102
use Koha::Authorities;
102
use Koha::Authority::Types;
103
use Koha::Authority::Types;
103
use Koha::Acquisition::Currencies;
104
use Koha::Acquisition::Currencies;
104
use Koha::Biblio::Metadatas;
105
use Koha::Biblio::Metadatas;
Lines 280-286 sub ModBiblio { Link Here
280
    # throw an exception which probably won't be handled.
281
    # throw an exception which probably won't be handled.
281
    foreach my $field ($record->fields()) {
282
    foreach my $field ($record->fields()) {
282
        if (! $field->is_control_field()) {
283
        if (! $field->is_control_field()) {
283
            if (scalar($field->subfields()) == 0 || (scalar($field->subfields()) == 1 && $field->subfield('9'))) {
284
            if (scalar($field->subfields()) == 0 || (scalar($field->subfields()) == 1 && $field->subfield('0'))) {
284
                $record->delete_field($field);
285
                $record->delete_field($field);
285
            }
286
            }
286
        }
287
        }
Lines 489-494 sub LinkBibHeadingsToAuthorities { Link Here
489
    require C4::Heading;
490
    require C4::Heading;
490
    require C4::AuthoritiesMarc;
491
    require C4::AuthoritiesMarc;
491
492
493
    my $authsubfield = Koha::Authorities->authority_linking_subfield;
492
    $allowrelink = 1 unless defined $allowrelink;
494
    $allowrelink = 1 unless defined $allowrelink;
493
    my $num_headings_changed = 0;
495
    my $num_headings_changed = 0;
494
    foreach my $field ( $bib->fields() ) {
496
    foreach my $field ( $bib->fields() ) {
Lines 496-502 sub LinkBibHeadingsToAuthorities { Link Here
496
        next unless defined $heading;
498
        next unless defined $heading;
497
499
498
        # check existing $9
500
        # check existing $9
499
        my $current_link = $field->subfield('9');
501
        my $current_link = $field->subfield($authsubfield);
500
502
501
        if ( defined $current_link && (!$allowrelink || !C4::Context->preference('LinkerRelink')) )
503
        if ( defined $current_link && (!$allowrelink || !C4::Context->preference('LinkerRelink')) )
502
        {
504
        {
Lines 510-517 sub LinkBibHeadingsToAuthorities { Link Here
510
              ->{ $heading->display_form() }++;
512
              ->{ $heading->display_form() }++;
511
            next if defined $current_link and $current_link == $authid;
513
            next if defined $current_link and $current_link == $authid;
512
514
513
            $field->delete_subfield( code => '9' ) if defined $current_link;
515
            $field->delete_subfield( code => $authsubfield ) if defined $current_link;
514
            $field->add_subfields( '9', $authid );
516
            $field->add_subfields( $authsubfield, $authid );
515
            $num_headings_changed++;
517
            $num_headings_changed++;
516
        }
518
        }
517
        else {
519
        else {
Lines 531-537 sub LinkBibHeadingsToAuthorities { Link Here
531
                        $marcrecordauth->leader('     nz  a22     o  4500');
533
                        $marcrecordauth->leader('     nz  a22     o  4500');
532
                        SetMarcUnicodeFlag( $marcrecordauth, 'MARC21' );
534
                        SetMarcUnicodeFlag( $marcrecordauth, 'MARC21' );
533
                    }
535
                    }
534
                    $field->delete_subfield( code => '9' )
536
                    $field->delete_subfield( code => $authsubfield )
535
                      if defined $current_link;
537
                      if defined $current_link;
536
                    my $authfield =
538
                    my $authfield =
537
                      MARC::Field->new( $authority_type->auth_tag_to_report,
539
                      MARC::Field->new( $authority_type->auth_tag_to_report,
Lines 584-590 sub LinkBibHeadingsToAuthorities { Link Here
584
                    $authid =
586
                    $authid =
585
                      C4::AuthoritiesMarc::AddAuthority( $marcrecordauth, '',
587
                      C4::AuthoritiesMarc::AddAuthority( $marcrecordauth, '',
586
                        $heading->auth_type() );
588
                        $heading->auth_type() );
587
                    $field->add_subfields( '9', $authid );
589
                    $field->add_subfields( $authsubfield, $authid );
588
                    $num_headings_changed++;
590
                    $num_headings_changed++;
589
                    $linker->update_cache($heading, $authid);
591
                    $linker->update_cache($heading, $authid);
590
                    $results{'added'}->{ $heading->display_form() }++;
592
                    $results{'added'}->{ $heading->display_form() }++;
Lines 595-601 sub LinkBibHeadingsToAuthorities { Link Here
595
                    $results{'linked'}->{ $heading->display_form() }++;
597
                    $results{'linked'}->{ $heading->display_form() }++;
596
                }
598
                }
597
                else {
599
                else {
598
                    $field->delete_subfield( code => '9' );
600
                    $field->delete_subfield( code => $authsubfield );
599
                    $num_headings_changed++;
601
                    $num_headings_changed++;
600
                    $results{'unlinked'}->{ $heading->display_form() }++;
602
                    $results{'unlinked'}->{ $heading->display_form() }++;
601
                }
603
                }
Lines 1739-1744 sub GetMarcSubjects { Link Here
1739
1741
1740
    my $subject_limit = C4::Context->preference("TraceCompleteSubfields") ? 'su,complete-subfield' : 'su';
1742
    my $subject_limit = C4::Context->preference("TraceCompleteSubfields") ? 'su,complete-subfield' : 'su';
1741
    my $AuthoritySeparator = C4::Context->preference('AuthoritySeparator');
1743
    my $AuthoritySeparator = C4::Context->preference('AuthoritySeparator');
1744
    my $authsubfield = Koha::Authorities->authority_linking_subfield;
1742
1745
1743
    foreach my $field ( $record->field($fields_filter) ) {
1746
    foreach my $field ( $record->field($fields_filter) ) {
1744
        next unless ($field->tag() >= $mintag && $field->tag() <= $maxtag);
1747
        next unless ($field->tag() >= $mintag && $field->tag() <= $maxtag);
Lines 1746-1756 sub GetMarcSubjects { Link Here
1746
        my @subfields = $field->subfields();
1749
        my @subfields = $field->subfields();
1747
        my @link_loop;
1750
        my @link_loop;
1748
1751
1749
        # if there is an authority link, build the links with an= subfield9
1752
        # if there is an authority link, build the links with an=$authsubfield
1750
        my $subfield9 = $field->subfield('9');
1753
        my $auth_subfield = $field->subfield($authsubfield);
1751
        my $authoritylink;
1754
        my $authoritylink;
1752
        if ($subfield9) {
1755
        if ($auth_subfield) {
1753
            my $linkvalue = $subfield9;
1756
            my $linkvalue = $auth_subfield;
1754
            $linkvalue =~ s/(\(|\))//g;
1757
            $linkvalue =~ s/(\(|\))//g;
1755
            @link_loop = ( { limit => 'an', 'link' => $linkvalue } );
1758
            @link_loop = ( { limit => 'an', 'link' => $linkvalue } );
1756
            $authoritylink = $linkvalue
1759
            $authoritylink = $linkvalue
Lines 1758-1764 sub GetMarcSubjects { Link Here
1758
1761
1759
        # other subfields
1762
        # other subfields
1760
        for my $subject_subfield (@subfields) {
1763
        for my $subject_subfield (@subfields) {
1761
            next if ( $subject_subfield->[0] eq '9' );
1764
            next if ( $subject_subfield->[0] eq $authsubfield );
1762
1765
1763
            # don't load unimarc subfields 3,4,5
1766
            # don't load unimarc subfields 3,4,5
1764
            next if ( ( $marcflavour eq "UNIMARC" ) and ( $subject_subfield->[0] =~ /2|3|4|5/ ) );
1767
            next if ( ( $marcflavour eq "UNIMARC" ) and ( $subject_subfield->[0] =~ /2|3|4|5/ ) );
Lines 1770-1776 sub GetMarcSubjects { Link Here
1770
            my $linkvalue = $value;
1773
            my $linkvalue = $value;
1771
            $linkvalue =~ s/(\(|\))//g;
1774
            $linkvalue =~ s/(\(|\))//g;
1772
            # if no authority link, build a search query
1775
            # if no authority link, build a search query
1773
            unless ($subfield9) {
1776
            unless ($auth_subfield) {
1774
                push @link_loop, {
1777
                push @link_loop, {
1775
                    limit    => $subject_limit,
1778
                    limit    => $subject_limit,
1776
                    'link'   => $linkvalue,
1779
                    'link'   => $linkvalue,
Lines 1831-1836 sub GetMarcAuthors { Link Here
1831
1834
1832
    my @marcauthors;
1835
    my @marcauthors;
1833
    my $AuthoritySeparator = C4::Context->preference('AuthoritySeparator');
1836
    my $AuthoritySeparator = C4::Context->preference('AuthoritySeparator');
1837
    my $authsubfield = Koha::Authorities->authority_linking_subfield;
1834
1838
1835
    foreach my $field ( $record->field($fields_filter) ) {
1839
    foreach my $field ( $record->field($fields_filter) ) {
1836
        next unless $field->tag() >= $mintag && $field->tag() <= $maxtag;
1840
        next unless $field->tag() >= $mintag && $field->tag() <= $maxtag;
Lines 1839-1848 sub GetMarcAuthors { Link Here
1839
        my @subfields  = $field->subfields();
1843
        my @subfields  = $field->subfields();
1840
        my $count_auth = 0;
1844
        my $count_auth = 0;
1841
1845
1842
        # if there is an authority link, build the link with Koha-Auth-Number: subfield9
1846
        # if there is an authority link, build the link with Koha-Auth-Number: $authsubfield
1843
        my $subfield9 = $field->subfield('9');
1847
        my $auth_subfield = $field->subfield($authsubfield);
1844
        if ($subfield9) {
1848
        if ($auth_subfield) {
1845
            my $linkvalue = $subfield9;
1849
            my $linkvalue = $auth_subfield;
1846
            $linkvalue =~ s/(\(|\))//g;
1850
            $linkvalue =~ s/(\(|\))//g;
1847
            @link_loop = ( { 'limit' => 'an', 'link' => $linkvalue } );
1851
            @link_loop = ( { 'limit' => 'an', 'link' => $linkvalue } );
1848
        }
1852
        }
Lines 1850-1856 sub GetMarcAuthors { Link Here
1850
        # other subfields
1854
        # other subfields
1851
        my $unimarc3;
1855
        my $unimarc3;
1852
        for my $authors_subfield (@subfields) {
1856
        for my $authors_subfield (@subfields) {
1853
            next if ( $authors_subfield->[0] eq '9' );
1857
            next if ( $authors_subfield->[0] eq $authsubfield );
1854
1858
1855
            # unimarc3 contains the $3 of the author for UNIMARC.
1859
            # unimarc3 contains the $3 of the author for UNIMARC.
1856
            # For french academic libraries, it's the "ppn", and it's required for idref webservice
1860
            # For french academic libraries, it's the "ppn", and it's required for idref webservice
Lines 1869-1875 sub GetMarcAuthors { Link Here
1869
                $linkvalue = "($value)";
1873
                $linkvalue = "($value)";
1870
            }
1874
            }
1871
            # if no authority link, build a search query
1875
            # if no authority link, build a search query
1872
            unless ($subfield9) {
1876
            unless ($auth_subfield) {
1873
                push @link_loop, {
1877
                push @link_loop, {
1874
                    limit    => 'au',
1878
                    limit    => 'au',
1875
                    'link'   => $linkvalue,
1879
                    'link'   => $linkvalue,
Lines 1890-1896 sub GetMarcAuthors { Link Here
1890
        }
1894
        }
1891
        push @marcauthors, {
1895
        push @marcauthors, {
1892
            MARCAUTHOR_SUBFIELDS_LOOP => \@subfields_loop,
1896
            MARCAUTHOR_SUBFIELDS_LOOP => \@subfields_loop,
1893
            authoritylink => $subfield9,
1897
            authoritylink => $auth_subfield,
1894
            unimarc3 => $unimarc3
1898
            unimarc3 => $unimarc3
1895
        };
1899
        };
1896
    }
1900
    }
Lines 1986-1991 sub GetMarcSeries { Link Here
1986
1990
1987
    my @marcseries;
1991
    my @marcseries;
1988
    my $AuthoritySeparator = C4::Context->preference('AuthoritySeparator');
1992
    my $AuthoritySeparator = C4::Context->preference('AuthoritySeparator');
1993
    my $authsubfield = Koha::Authorities->authority_linking_subfield;
1989
1994
1990
    foreach my $field ( $record->field($fields_filter) ) {
1995
    foreach my $field ( $record->field($fields_filter) ) {
1991
        next unless $field->tag() >= $mintag && $field->tag() <= $maxtag;
1996
        next unless $field->tag() >= $mintag && $field->tag() <= $maxtag;
Lines 1996-2002 sub GetMarcSeries { Link Here
1996
        for my $series_subfield (@subfields) {
2001
        for my $series_subfield (@subfields) {
1997
2002
1998
            # ignore $9, used for authority link
2003
            # ignore $9, used for authority link
1999
            next if ( $series_subfield->[0] eq '9' );
2004
            next if ( $series_subfield->[0] eq $authsubfield );
2000
2005
2001
            my $volume_number;
2006
            my $volume_number;
2002
            my $code      = $series_subfield->[0];
2007
            my $code      = $series_subfield->[0];
(-)a/C4/Linker/Default.pm (-2 / +3 lines)
Lines 22-27 use warnings; Link Here
22
use Carp;
22
use Carp;
23
use MARC::Field;
23
use MARC::Field;
24
use C4::Heading;
24
use C4::Heading;
25
use Koha::Authorities;
25
26
26
use base qw(C4::Linker);
27
use base qw(C4::Linker);
27
28
Lines 32-38 sub get_link { Link Here
32
    my $search_form = $heading->search_form();
33
    my $search_form = $heading->search_form();
33
    my $authid;
34
    my $authid;
34
    my $fuzzy = 0;
35
    my $fuzzy = 0;
35
36
    my $authsubfield = Koha::Authorities->authority_linking_subfield;
36
    if ( $self->{'cache'}->{$search_form}->{'cached'} ) {
37
    if ( $self->{'cache'}->{$search_form}->{'cached'} ) {
37
        $authid = $self->{'cache'}->{$search_form}->{'authid'};
38
        $authid = $self->{'cache'}->{$search_form}->{'authid'};
38
        $fuzzy  = $self->{'cache'}->{$search_form}->{'fuzzy'};
39
        $fuzzy  = $self->{'cache'}->{$search_form}->{'fuzzy'};
Lines 56-62 sub get_link { Link Here
56
57
57
        if ( !defined $authid && $self->{'broader_headings'} ) {
58
        if ( !defined $authid && $self->{'broader_headings'} ) {
58
            my $field     = $heading->field();
59
            my $field     = $heading->field();
59
            my @subfields = grep { $_->[0] ne '9' } $field->subfields();
60
            my @subfields = grep { $_->[0] ne $authsubfield } $field->subfields();
60
            if ( scalar @subfields > 1 ) {
61
            if ( scalar @subfields > 1 ) {
61
                pop @subfields;
62
                pop @subfields;
62
                $field =
63
                $field =
(-)a/Koha/Authorities.pm (+24 lines)
Lines 22-27 use Modern::Perl; Link Here
22
use Carp;
22
use Carp;
23
23
24
use Koha::Database;
24
use Koha::Database;
25
use C4::Context;
25
26
26
use Koha::Authority;
27
use Koha::Authority;
27
28
Lines 94-99 sub linked_biblionumbers { Link Here
94
    return @biblionumbers;
95
    return @biblionumbers;
95
}
96
}
96
97
98
=head3 authority_linking_subfield
99
100
    $authsubfield = Koha::Authorities->authority_linking_subfield;
101
102
    Returns the authority subfield for selected MARC format
103
104
=cut
105
106
sub authority_linking_subfield {
107
    my ( $class ) = @_;
108
109
    my $marcflavour = C4::Context->preference('marcflavour');
110
111
    my $subfield;    
112
    if ($marcflavour eq 'UNIMARC') {
113
        $subfield = '9';
114
    } else {
115
        $subfield = '0';
116
    }
117
118
    return $subfield;
119
}
120
97
=head3 type
121
=head3 type
98
122
99
=cut
123
=cut
(-)a/admin/searchengine/elasticsearch/mappings.yaml (-45 / +275 lines)
Lines 2283-2513 biblios: Link Here
2283
    mappings:
2283
    mappings:
2284
      - facet: ''
2284
      - facet: ''
2285
        marc_field: '1009'
2285
        marc_field: '1009'
2286
        marc_type: marc21
2286
        marc_type: unimarc
2287
        sort: ~
2287
        sort: ~
2288
        suggestible: ''
2288
        suggestible: ''
2289
      - facet: ''
2289
      - facet: ''
2290
        marc_field: '1109'
2290
        marc_field: '1109'
2291
        marc_type: marc21
2291
        marc_type: unimarc
2292
        sort: ~
2292
        sort: ~
2293
        suggestible: ''
2293
        suggestible: ''
2294
      - facet: ''
2294
      - facet: ''
2295
        marc_field: '1119'
2295
        marc_field: '1119'
2296
        marc_type: marc21
2296
        marc_type: unimarc
2297
        sort: ~
2297
        sort: ~
2298
        suggestible: ''
2298
        suggestible: ''
2299
      - facet: ''
2299
      - facet: ''
2300
        marc_field: '1309'
2300
        marc_field: '1309'
2301
        marc_type: marc21
2301
        marc_type: unimarc
2302
        sort: ~
2302
        sort: ~
2303
        suggestible: ''
2303
        suggestible: ''
2304
      - facet: ''
2304
      - facet: ''
2305
        marc_field: '2459'
2305
        marc_field: '2459'
2306
        marc_type: marc21
2306
        marc_type: unimarc
2307
        sort: ~
2307
        sort: ~
2308
        suggestible: ''
2308
        suggestible: ''
2309
      - facet: ''
2309
      - facet: ''
2310
        marc_field: '4009'
2310
        marc_field: '4009'
2311
        marc_type: marc21
2311
        marc_type: unimarc
2312
        sort: ~
2312
        sort: ~
2313
        suggestible: ''
2313
        suggestible: ''
2314
      - facet: ''
2314
      - facet: ''
2315
        marc_field: '4109'
2315
        marc_field: '4109'
2316
        marc_type: marc21
2316
        marc_type: unimarc
2317
        sort: ~
2317
        sort: ~
2318
        suggestible: ''
2318
        suggestible: ''
2319
      - facet: ''
2319
      - facet: ''
2320
        marc_field: '4409'
2320
        marc_field: '4409'
2321
        marc_type: marc21
2321
        marc_type: unimarc
2322
        sort: ~
2322
        sort: ~
2323
        suggestible: ''
2323
        suggestible: ''
2324
      - facet: ''
2324
      - facet: ''
2325
        marc_field: '4909'
2325
        marc_field: '4909'
2326
        marc_type: marc21
2326
        marc_type: unimarc
2327
        sort: ~
2327
        sort: ~
2328
        suggestible: ''
2328
        suggestible: ''
2329
      - facet: ''
2329
      - facet: ''
2330
        marc_field: '6009'
2330
        marc_field: '6009'
2331
        marc_type: marc21
2331
        marc_type: unimarc
2332
        sort: ~
2332
        sort: ~
2333
        suggestible: ''
2333
        suggestible: ''
2334
      - facet: ''
2334
      - facet: ''
2335
        marc_field: '6109'
2335
        marc_field: '6109'
2336
        marc_type: marc21
2336
        marc_type: unimarc
2337
        sort: ~
2337
        sort: ~
2338
        suggestible: ''
2338
        suggestible: ''
2339
      - facet: ''
2339
      - facet: ''
2340
        marc_field: '6119'
2340
        marc_field: '6119'
2341
        marc_type: marc21
2341
        marc_type: unimarc
2342
        sort: ~
2342
        sort: ~
2343
        suggestible: ''
2343
        suggestible: ''
2344
      - facet: ''
2344
      - facet: ''
2345
        marc_field: '6309'
2345
        marc_field: '6309'
2346
        marc_type: marc21
2346
        marc_type: unimarc
2347
        sort: ~
2347
        sort: ~
2348
        suggestible: ''
2348
        suggestible: ''
2349
      - facet: ''
2349
      - facet: ''
2350
        marc_field: '6489'
2350
        marc_field: '6489'
2351
        marc_type: marc21
2351
        marc_type: unimarc
2352
        sort: ~
2352
        sort: ~
2353
        suggestible: ''
2353
        suggestible: ''
2354
      - facet: ''
2354
      - facet: ''
2355
        marc_field: '6509'
2355
        marc_field: '6509'
2356
        marc_type: marc21
2356
        marc_type: unimarc
2357
        sort: ~
2357
        sort: ~
2358
        suggestible: ''
2358
        suggestible: ''
2359
      - facet: ''
2359
      - facet: ''
2360
        marc_field: '6519'
2360
        marc_field: '6519'
2361
        marc_type: marc21
2361
        marc_type: unimarc
2362
        sort: ~
2362
        sort: ~
2363
        suggestible: ''
2363
        suggestible: ''
2364
      - facet: ''
2364
      - facet: ''
2365
        marc_field: '6529'
2365
        marc_field: '6529'
2366
        marc_type: marc21
2366
        marc_type: unimarc
2367
        sort: ~
2367
        sort: ~
2368
        suggestible: ''
2368
        suggestible: ''
2369
      - facet: ''
2369
      - facet: ''
2370
        marc_field: '6539'
2370
        marc_field: '6539'
2371
        marc_type: marc21
2371
        marc_type: unimarc
2372
        sort: ~
2372
        sort: ~
2373
        suggestible: ''
2373
        suggestible: ''
2374
      - facet: ''
2374
      - facet: ''
2375
        marc_field: '6549'
2375
        marc_field: '6549'
2376
        marc_type: marc21
2376
        marc_type: unimarc
2377
        sort: ~
2377
        sort: ~
2378
        suggestible: ''
2378
        suggestible: ''
2379
      - facet: ''
2379
      - facet: ''
2380
        marc_field: '6559'
2380
        marc_field: '6559'
2381
        marc_type: marc21
2381
        marc_type: unimarc
2382
        sort: ~
2382
        sort: ~
2383
        suggestible: ''
2383
        suggestible: ''
2384
      - facet: ''
2384
      - facet: ''
2385
        marc_field: '6569'
2385
        marc_field: '6569'
2386
        marc_type: marc21
2386
        marc_type: unimarc
2387
        sort: ~
2387
        sort: ~
2388
        suggestible: ''
2388
        suggestible: ''
2389
      - facet: ''
2389
      - facet: ''
2390
        marc_field: '6579'
2390
        marc_field: '6579'
2391
        marc_type: marc21
2391
        marc_type: unimarc
2392
        sort: ~
2392
        sort: ~
2393
        suggestible: ''
2393
        suggestible: ''
2394
      - facet: ''
2394
      - facet: ''
2395
        marc_field: '6629'
2395
        marc_field: '6629'
2396
        marc_type: marc21
2396
        marc_type: unimarc
2397
        sort: ~
2397
        sort: ~
2398
        suggestible: ''
2398
        suggestible: ''
2399
      - facet: ''
2399
      - facet: ''
2400
        marc_field: '6909'
2400
        marc_field: '6909'
2401
        marc_type: marc21
2401
        marc_type: unimarc
2402
        sort: ~
2402
        sort: ~
2403
        suggestible: ''
2403
        suggestible: ''
2404
      - facet: ''
2404
      - facet: ''
2405
        marc_field: '6919'
2405
        marc_field: '6919'
2406
        marc_type: marc21
2406
        marc_type: unimarc
2407
        sort: ~
2407
        sort: ~
2408
        suggestible: ''
2408
        suggestible: ''
2409
      - facet: ''
2409
      - facet: ''
2410
        marc_field: '6969'
2410
        marc_field: '6969'
2411
        marc_type: marc21
2411
        marc_type: unimarc
2412
        sort: ~
2412
        sort: ~
2413
        suggestible: ''
2413
        suggestible: ''
2414
      - facet: ''
2414
      - facet: ''
2415
        marc_field: '6979'
2415
        marc_field: '6979'
2416
        marc_type: marc21
2416
        marc_type: unimarc
2417
        sort: ~
2417
        sort: ~
2418
        suggestible: ''
2418
        suggestible: ''
2419
      - facet: ''
2419
      - facet: ''
2420
        marc_field: '6989'
2420
        marc_field: '6989'
2421
        marc_type: marc21
2421
        marc_type: unimarc
2422
        sort: ~
2422
        sort: ~
2423
        suggestible: ''
2423
        suggestible: ''
2424
      - facet: ''
2424
      - facet: ''
2425
        marc_field: '6999'
2425
        marc_field: '6999'
2426
        marc_type: marc21
2426
        marc_type: unimarc
2427
        sort: ~
2427
        sort: ~
2428
        suggestible: ''
2428
        suggestible: ''
2429
      - facet: ''
2429
      - facet: ''
2430
        marc_field: '7009'
2430
        marc_field: '7009'
2431
        marc_type: marc21
2431
        marc_type: unimarc
2432
        sort: ~
2432
        sort: ~
2433
        suggestible: ''
2433
        suggestible: ''
2434
      - facet: ''
2434
      - facet: ''
2435
        marc_field: '7109'
2435
        marc_field: '7109'
2436
        marc_type: marc21
2436
        marc_type: unimarc
2437
        sort: ~
2437
        sort: ~
2438
        suggestible: ''
2438
        suggestible: ''
2439
      - facet: ''
2439
      - facet: ''
2440
        marc_field: '7119'
2440
        marc_field: '7119'
2441
        marc_type: marc21
2441
        marc_type: unimarc
2442
        sort: ~
2442
        sort: ~
2443
        suggestible: ''
2443
        suggestible: ''
2444
      - facet: ''
2444
      - facet: ''
2445
        marc_field: '7309'
2445
        marc_field: '7309'
2446
        marc_type: marc21
2446
        marc_type: unimarc
2447
        sort: ~
2447
        sort: ~
2448
        suggestible: ''
2448
        suggestible: ''
2449
      - facet: ''
2449
      - facet: ''
2450
        marc_field: '7519'
2450
        marc_field: '7519'
2451
        marc_type: marc21
2451
        marc_type: unimarc
2452
        sort: ~
2452
        sort: ~
2453
        suggestible: ''
2453
        suggestible: ''
2454
      - facet: ''
2454
      - facet: ''
2455
        marc_field: '7969'
2455
        marc_field: '7969'
2456
        marc_type: marc21
2456
        marc_type: unimarc
2457
        sort: ~
2457
        sort: ~
2458
        suggestible: ''
2458
        suggestible: ''
2459
      - facet: ''
2459
      - facet: ''
2460
        marc_field: '7979'
2460
        marc_field: '7979'
2461
        marc_type: marc21
2461
        marc_type: unimarc
2462
        sort: ~
2462
        sort: ~
2463
        suggestible: ''
2463
        suggestible: ''
2464
      - facet: ''
2464
      - facet: ''
2465
        marc_field: '7989'
2465
        marc_field: '7989'
2466
        marc_type: marc21
2466
        marc_type: unimarc
2467
        sort: ~
2467
        sort: ~
2468
        suggestible: ''
2468
        suggestible: ''
2469
      - facet: ''
2469
      - facet: ''
2470
        marc_field: '7999'
2470
        marc_field: '7999'
2471
        marc_type: marc21
2471
        marc_type: unimarc
2472
        sort: ~
2472
        sort: ~
2473
        suggestible: ''
2473
        suggestible: ''
2474
      - facet: ''
2474
      - facet: ''
2475
        marc_field: '8009'
2475
        marc_field: '8009'
2476
        marc_type: marc21
2476
        marc_type: unimarc
2477
        sort: ~
2477
        sort: ~
2478
        suggestible: ''
2478
        suggestible: ''
2479
      - facet: ''
2479
      - facet: ''
2480
        marc_field: '8109'
2480
        marc_field: '8109'
2481
        marc_type: marc21
2481
        marc_type: unimarc
2482
        sort: ~
2482
        sort: ~
2483
        suggestible: ''
2483
        suggestible: ''
2484
      - facet: ''
2484
      - facet: ''
2485
        marc_field: '8119'
2485
        marc_field: '8119'
2486
        marc_type: marc21
2486
        marc_type: unimarc
2487
        sort: ~
2487
        sort: ~
2488
        suggestible: ''
2488
        suggestible: ''
2489
      - facet: ''
2489
      - facet: ''
2490
        marc_field: '8309'
2490
        marc_field: '8309'
2491
        marc_type: marc21
2491
        marc_type: unimarc
2492
        sort: ~
2492
        sort: ~
2493
        suggestible: ''
2493
        suggestible: ''
2494
      - facet: ''
2494
      - facet: ''
2495
        marc_field: '8969'
2495
        marc_field: '8969'
2496
        marc_type: marc21
2496
        marc_type: unimarc
2497
        sort: ~
2497
        sort: ~
2498
        suggestible: ''
2498
        suggestible: ''
2499
      - facet: ''
2499
      - facet: ''
2500
        marc_field: '8979'
2500
        marc_field: '8979'
2501
        marc_type: marc21
2501
        marc_type: unimarc
2502
        sort: ~
2502
        sort: ~
2503
        suggestible: ''
2503
        suggestible: ''
2504
      - facet: ''
2504
      - facet: ''
2505
        marc_field: '8989'
2505
        marc_field: '8989'
2506
        marc_type: marc21
2506
        marc_type: unimarc
2507
        sort: ~
2507
        sort: ~
2508
        suggestible: ''
2508
        suggestible: ''
2509
      - facet: ''
2509
      - facet: ''
2510
        marc_field: '8999'
2510
        marc_field: '8999'
2511
        marc_type: unimarc
2512
        sort: ~
2513
        suggestible: ''
2514
      - facet: ''
2515
        marc_field: '1000'
2516
        marc_type: marc21
2517
        sort: ~
2518
        suggestible: ''
2519
      - facet: ''
2520
        marc_field: '1100'
2521
        marc_type: marc21
2522
        sort: ~
2523
        suggestible: ''
2524
      - facet: ''
2525
        marc_field: '1110'
2526
        marc_type: marc21
2527
        sort: ~
2528
        suggestible: ''
2529
      - facet: ''
2530
        marc_field: '1300'
2531
        marc_type: marc21
2532
        sort: ~
2533
        suggestible: ''
2534
      - facet: ''
2535
        marc_field: '2450'
2536
        marc_type: marc21
2537
        sort: ~
2538
        suggestible: ''
2539
      - facet: ''
2540
        marc_field: '4000'
2541
        marc_type: marc21
2542
        sort: ~
2543
        suggestible: ''
2544
      - facet: ''
2545
        marc_field: '4100'
2546
        marc_type: marc21
2547
        sort: ~
2548
        suggestible: ''
2549
      - facet: ''
2550
        marc_field: '4400'
2551
        marc_type: marc21
2552
        sort: ~
2553
        suggestible: ''
2554
      - facet: ''
2555
        marc_field: '4900'
2556
        marc_type: marc21
2557
        sort: ~
2558
        suggestible: ''
2559
      - facet: ''
2560
        marc_field: '6000'
2561
        marc_type: marc21
2562
        sort: ~
2563
        suggestible: ''
2564
      - facet: ''
2565
        marc_field: '6100'
2566
        marc_type: marc21
2567
        sort: ~
2568
        suggestible: ''
2569
      - facet: ''
2570
        marc_field: '6110'
2571
        marc_type: marc21
2572
        sort: ~
2573
        suggestible: ''
2574
      - facet: ''
2575
        marc_field: '6300'
2576
        marc_type: marc21
2577
        sort: ~
2578
        suggestible: ''
2579
      - facet: ''
2580
        marc_field: '6480'
2581
        marc_type: marc21
2582
        sort: ~
2583
        suggestible: ''
2584
      - facet: ''
2585
        marc_field: '6500'
2586
        marc_type: marc21
2587
        sort: ~
2588
        suggestible: ''
2589
      - facet: ''
2590
        marc_field: '6510'
2591
        marc_type: marc21
2592
        sort: ~
2593
        suggestible: ''
2594
      - facet: ''
2595
        marc_field: '6520'
2596
        marc_type: marc21
2597
        sort: ~
2598
        suggestible: ''
2599
      - facet: ''
2600
        marc_field: '6530'
2601
        marc_type: marc21
2602
        sort: ~
2603
        suggestible: ''
2604
      - facet: ''
2605
        marc_field: '6540'
2606
        marc_type: marc21
2607
        sort: ~
2608
        suggestible: ''
2609
      - facet: ''
2610
        marc_field: '6550'
2611
        marc_type: marc21
2612
        sort: ~
2613
        suggestible: ''
2614
      - facet: ''
2615
        marc_field: '6560'
2616
        marc_type: marc21
2617
        sort: ~
2618
        suggestible: ''
2619
      - facet: ''
2620
        marc_field: '6570'
2621
        marc_type: marc21
2622
        sort: ~
2623
        suggestible: ''
2624
      - facet: ''
2625
        marc_field: '6620'
2626
        marc_type: marc21
2627
        sort: ~
2628
        suggestible: ''
2629
      - facet: ''
2630
        marc_field: '6900'
2631
        marc_type: marc21
2632
        sort: ~
2633
        suggestible: ''
2634
      - facet: ''
2635
        marc_field: '6910'
2636
        marc_type: marc21
2637
        sort: ~
2638
        suggestible: ''
2639
      - facet: ''
2640
        marc_field: '6960'
2641
        marc_type: marc21
2642
        sort: ~
2643
        suggestible: ''
2644
      - facet: ''
2645
        marc_field: '6970'
2646
        marc_type: marc21
2647
        sort: ~
2648
        suggestible: ''
2649
      - facet: ''
2650
        marc_field: '6980'
2651
        marc_type: marc21
2652
        sort: ~
2653
        suggestible: ''
2654
      - facet: ''
2655
        marc_field: '6990'
2656
        marc_type: marc21
2657
        sort: ~
2658
        suggestible: ''
2659
      - facet: ''
2660
        marc_field: '7000'
2661
        marc_type: marc21
2662
        sort: ~
2663
        suggestible: ''
2664
      - facet: ''
2665
        marc_field: '7100'
2666
        marc_type: marc21
2667
        sort: ~
2668
        suggestible: ''
2669
      - facet: ''
2670
        marc_field: '7110'
2671
        marc_type: marc21
2672
        sort: ~
2673
        suggestible: ''
2674
      - facet: ''
2675
        marc_field: '7300'
2676
        marc_type: marc21
2677
        sort: ~
2678
        suggestible: ''
2679
      - facet: ''
2680
        marc_field: '7510'
2681
        marc_type: marc21
2682
        sort: ~
2683
        suggestible: ''
2684
      - facet: ''
2685
        marc_field: '7960'
2686
        marc_type: marc21
2687
        sort: ~
2688
        suggestible: ''
2689
      - facet: ''
2690
        marc_field: '7970'
2691
        marc_type: marc21
2692
        sort: ~
2693
        suggestible: ''
2694
      - facet: ''
2695
        marc_field: '7980'
2696
        marc_type: marc21
2697
        sort: ~
2698
        suggestible: ''
2699
      - facet: ''
2700
        marc_field: '7990'
2701
        marc_type: marc21
2702
        sort: ~
2703
        suggestible: ''
2704
      - facet: ''
2705
        marc_field: '8000'
2706
        marc_type: marc21
2707
        sort: ~
2708
        suggestible: ''
2709
      - facet: ''
2710
        marc_field: '8100'
2711
        marc_type: marc21
2712
        sort: ~
2713
        suggestible: ''
2714
      - facet: ''
2715
        marc_field: '8110'
2716
        marc_type: marc21
2717
        sort: ~
2718
        suggestible: ''
2719
      - facet: ''
2720
        marc_field: '8300'
2721
        marc_type: marc21
2722
        sort: ~
2723
        suggestible: ''
2724
      - facet: ''
2725
        marc_field: '8960'
2726
        marc_type: marc21
2727
        sort: ~
2728
        suggestible: ''
2729
      - facet: ''
2730
        marc_field: '8970'
2731
        marc_type: marc21
2732
        sort: ~
2733
        suggestible: ''
2734
      - facet: ''
2735
        marc_field: '8980'
2736
        marc_type: marc21
2737
        sort: ~
2738
        suggestible: ''
2739
      - facet: ''
2740
        marc_field: '8990'
2511
        marc_type: marc21
2741
        marc_type: marc21
2512
        sort: ~
2742
        sort: ~
2513
        suggestible: ''
2743
        suggestible: ''
(-)a/authorities/blinddetail-biblio-search.pl (-1 / +3 lines)
Lines 57-62 my $authid = $query->param('authid'); Link Here
57
my $index        = $query->param('index');
57
my $index        = $query->param('index');
58
my $tagid        = $query->param('tagid');
58
my $tagid        = $query->param('tagid');
59
my $relationship = $query->param('relationship');
59
my $relationship = $query->param('relationship');
60
my $authsubfield = Koha::Authorities->authority_linking_subfield;
60
61
61
# open template
62
# open template
62
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
63
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
Lines 88-94 if ($authid) { Link Here
88
    # Get all values for each distinct subfield and add to subfield loop
89
    # Get all values for each distinct subfield and add to subfield loop
89
    my %done_subfields;
90
    my %done_subfields;
90
    for ( $field->subfields ) {
91
    for ( $field->subfields ) {
91
        next if $_->[0] eq '9'; # $9 will be set with authid value
92
        next if $_->[0] eq $authsubfield; # will be set with authid value
92
        my $letter = $_->[0];
93
        my $letter = $_->[0];
93
        $letter ||= '@';
94
        $letter ||= '@';
94
        next if defined $done_subfields{$letter};
95
        next if defined $done_subfields{$letter};
Lines 115-120 if ($authid) { Link Here
115
116
116
$template->param(
117
$template->param(
117
    authid          => $authid ? $authid : "",
118
    authid          => $authid ? $authid : "",
119
    authsubfield    => $authsubfield,
118
    index           => $index,
120
    index           => $index,
119
    tagid           => $tagid,
121
    tagid           => $tagid,
120
    update_ind1     => defined($indicator1),
122
    update_ind1     => defined($indicator1),
(-)a/authorities/detail.pl (-1 / +2 lines)
Lines 210-217 my $count = $authobj ? $authobj->get_usage_count : 0; Link Here
210
my $sth = $dbh->prepare("select distinct tagfield from marc_subfield_structure where authtypecode=?");
210
my $sth = $dbh->prepare("select distinct tagfield from marc_subfield_structure where authtypecode=?");
211
$sth->execute($authtypecode);
211
$sth->execute($authtypecode);
212
my $biblio_fields;
212
my $biblio_fields;
213
my $authsubfield = Koha::Authorities->authority_linking_subfield;
213
while (my ($tagfield) = $sth->fetchrow) {
214
while (my ($tagfield) = $sth->fetchrow) {
214
	$biblio_fields.= $tagfield."9,";
215
	$biblio_fields.= $tagfield.$authsubfield.",";
215
}
216
}
216
chop $biblio_fields if $biblio_fields;
217
chop $biblio_fields if $biblio_fields;
217
218
(-)a/cataloguing/addbiblio.pl (-6 / +7 lines)
Lines 328-343 sub create_input { Link Here
328
    # expand all subfields of 773 if there is a host item provided in the input
328
    # expand all subfields of 773 if there is a host item provided in the input
329
    $subfield_data{visibility} ="" if ($tag eq 773 and $cgi->param('hostitemnumber'));
329
    $subfield_data{visibility} ="" if ($tag eq 773 and $cgi->param('hostitemnumber'));
330
330
331
331
    my $authsubfield = Koha::Authorities->authority_linking_subfield;
332
    # it's an authorised field
332
    # it's an authorised field
333
    if ( $tagslib->{$tag}->{$subfield}->{authorised_value} ) {
333
    if ( $tagslib->{$tag}->{$subfield}->{authorised_value} ) {
334
        $subfield_data{marc_value} =
334
        $subfield_data{marc_value} =
335
          build_authorized_values_list( $tag, $subfield, $value, $dbh,
335
          build_authorized_values_list( $tag, $subfield, $value, $dbh,
336
            $authorised_values_sth,$index_tag,$index_subfield );
336
            $authorised_values_sth,$index_tag,$index_subfield );
337
337
338
    # it's a subfield $9 linking to an authority record - see bug 2206
338
    # it's a subfield linking to an authority record - see bug 2206
339
    }
339
    }
340
    elsif ($subfield eq "9" and
340
    elsif ($subfield eq $authsubfield and
341
           exists($tagslib->{$tag}->{'a'}->{authtypecode}) and
341
           exists($tagslib->{$tag}->{'a'}->{authtypecode}) and
342
           defined($tagslib->{$tag}->{'a'}->{authtypecode}) and
342
           defined($tagslib->{$tag}->{'a'}->{authtypecode}) and
343
           $tagslib->{$tag}->{'a'}->{authtypecode} ne '') {
343
           $tagslib->{$tag}->{'a'}->{authtypecode} ne '') {
Lines 489-495 sub build_tabs { Link Here
489
    my @BIG_LOOP;
489
    my @BIG_LOOP;
490
    my %seen;
490
    my %seen;
491
    my @tab_data; # all tags to display
491
    my @tab_data; # all tags to display
492
    
492
    my $authsubfield = Koha::Authorities->authority_linking_subfield;
493
493
    foreach my $used ( @$usedTagsLib ){
494
    foreach my $used ( @$usedTagsLib ){
494
        push @tab_data,$used->{tagfield} if not $seen{$used->{tagfield}};
495
        push @tab_data,$used->{tagfield} if not $seen{$used->{tagfield}};
495
        $seen{$used->{tagfield}}++;
496
        $seen{$used->{tagfield}}++;
Lines 576-582 sub build_tabs { Link Here
576
                        next
577
                        next
577
                          if ( ( $tagslib->{$tag}->{$subfield}->{hidden} <= -4 )
578
                          if ( ( $tagslib->{$tag}->{$subfield}->{hidden} <= -4 )
578
                            or ( $tagslib->{$tag}->{$subfield}->{hidden} >= 5 ) )
579
                            or ( $tagslib->{$tag}->{$subfield}->{hidden} >= 5 ) )
579
                            and not ( $subfield eq "9" and
580
                            and not ( $subfield eq $authsubfield and
580
                                      exists($tagslib->{$tag}->{'a'}->{authtypecode}) and
581
                                      exists($tagslib->{$tag}->{'a'}->{authtypecode}) and
581
                                      defined($tagslib->{$tag}->{'a'}->{authtypecode}) and
582
                                      defined($tagslib->{$tag}->{'a'}->{authtypecode}) and
582
                                      $tagslib->{$tag}->{'a'}->{authtypecode} ne ""
583
                                      $tagslib->{$tag}->{'a'}->{authtypecode} ne ""
Lines 625-631 sub build_tabs { Link Here
625
                    next
626
                    next
626
                      if ( ( $tagslib->{$tag}->{$subfield}->{hidden} <= -4 )
627
                      if ( ( $tagslib->{$tag}->{$subfield}->{hidden} <= -4 )
627
                        or ( $tagslib->{$tag}->{$subfield}->{hidden} >= 5 ) )
628
                        or ( $tagslib->{$tag}->{$subfield}->{hidden} >= 5 ) )
628
                      and not ( $subfield eq "9" and
629
                      and not ( $subfield eq $authsubfield and
629
                                exists($tagslib->{$tag}->{'a'}->{authtypecode}) and
630
                                exists($tagslib->{$tag}->{'a'}->{authtypecode}) and
630
                                defined($tagslib->{$tag}->{'a'}->{authtypecode}) and
631
                                defined($tagslib->{$tag}->{'a'}->{authtypecode}) and
631
                                $tagslib->{$tag}->{'a'}->{authtypecode} ne ""
632
                                $tagslib->{$tag}->{'a'}->{authtypecode} ne ""
(-)a/etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml (-77 / +77 lines)
Lines 257-264 Link Here
257
  <index_data_field tag="086">
257
  <index_data_field tag="086">
258
    <target_index>Number-govt-pub:w</target_index>
258
    <target_index>Number-govt-pub:w</target_index>
259
  </index_data_field>
259
  </index_data_field>
260
  <!--record.abs line 90: melm 100$9      Cross-Reference:w,Koha-Auth-Number-->
260
  <!--record.abs line 90: melm 100$0      Cross-Reference:w,Koha-Auth-Number-->
261
  <index_subfields tag="100" subfields="9">
261
  <index_subfields tag="100" subfields="0">
262
    <target_index>Cross-Reference:w</target_index>
262
    <target_index>Cross-Reference:w</target_index>
263
    <target_index>Koha-Auth-Number:w</target_index>
263
    <target_index>Koha-Auth-Number:w</target_index>
264
  </index_subfields>
264
  </index_subfields>
Lines 283-290 Link Here
283
    <target_index>Name-and-title:w</target_index>
283
    <target_index>Name-and-title:w</target_index>
284
    <target_index>Personal-name:w</target_index>
284
    <target_index>Personal-name:w</target_index>
285
  </index_data_field>
285
  </index_data_field>
286
  <!--record.abs line 93: melm 110$9      Koha-Auth-Number-->
286
  <!--record.abs line 93: melm 110$0      Koha-Auth-Number-->
287
  <index_subfields tag="110" subfields="9">
287
  <index_subfields tag="110" subfields="0">
288
    <target_index>Koha-Auth-Number:w</target_index>
288
    <target_index>Koha-Auth-Number:w</target_index>
289
  </index_subfields>
289
  </index_subfields>
290
  <!--record.abs line 94: melm 110        Author,Author:p,Author:s,Author-title,Author-name-corporate,Name,Name-and-title,Corporate-name-->
290
  <!--record.abs line 94: melm 110        Author,Author:p,Author:s,Author-title,Author-name-corporate,Name,Name-and-title,Corporate-name-->
Lines 298-305 Link Here
298
    <target_index>Name-and-title:w</target_index>
298
    <target_index>Name-and-title:w</target_index>
299
    <target_index>Corporate-name:w</target_index>
299
    <target_index>Corporate-name:w</target_index>
300
  </index_data_field>
300
  </index_data_field>
301
  <!--record.abs line 95: melm 111$9      Koha-Auth-Number-->
301
  <!--record.abs line 95: melm 111$0      Koha-Auth-Number-->
302
  <index_subfields tag="111" subfields="9">
302
  <index_subfields tag="111" subfields="0">
303
    <target_index>Koha-Auth-Number:w</target_index>
303
    <target_index>Koha-Auth-Number:w</target_index>
304
  </index_subfields>
304
  </index_subfields>
305
  <!--record.abs line 96: melm 111        Author,Author:p,Author:s,Author-title,Author-name-corporate,Name,Name-and-title,Conference-name-->
305
  <!--record.abs line 96: melm 111        Author,Author:p,Author:s,Author-title,Author-name-corporate,Name,Name-and-title,Conference-name-->
Lines 321-328 Link Here
321
  <index_subfields tag="130" subfields="r">
321
  <index_subfields tag="130" subfields="r">
322
    <target_index>Music-key:w</target_index>
322
    <target_index>Music-key:w</target_index>
323
  </index_subfields>
323
  </index_subfields>
324
  <!--record.abs line 99: melm 130$9      Koha-Auth-Number-->
324
  <!--record.abs line 99: melm 130$0      Koha-Auth-Number-->
325
  <index_subfields tag="130" subfields="9">
325
  <index_subfields tag="130" subfields="0">
326
    <target_index>Koha-Auth-Number:w</target_index>
326
    <target_index>Koha-Auth-Number:w</target_index>
327
  </index_subfields>
327
  </index_subfields>
328
  <!--record.abs line 100: melm 130        Title,Title:p,Title-uniform-->
328
  <!--record.abs line 100: melm 130        Title,Title:p,Title-uniform-->
Lines 404-411 Link Here
404
    <target_index>Author-in-order:p</target_index>
404
    <target_index>Author-in-order:p</target_index>
405
    <target_index>Author-in-order:s</target_index>
405
    <target_index>Author-in-order:s</target_index>
406
  </index_subfields>
406
  </index_subfields>
407
  <!--record.abs line 115: melm 245$9      Cross-Reference:w,Koha-Auth-Number-->
407
  <!--record.abs line 115: melm 245$0      Cross-Reference:w,Koha-Auth-Number-->
408
  <index_subfields tag="245" subfields="9">
408
  <index_subfields tag="245" subfields="0">
409
    <target_index>Cross-Reference:w</target_index>
409
    <target_index>Cross-Reference:w</target_index>
410
    <target_index>Koha-Auth-Number:w</target_index>
410
    <target_index>Koha-Auth-Number:w</target_index>
411
  </index_subfields>
411
  </index_subfields>
Lines 470-477 Link Here
470
    <target_index>Title:w</target_index>
470
    <target_index>Title:w</target_index>
471
    <target_index>Title-series:w</target_index>
471
    <target_index>Title-series:w</target_index>
472
  </index_subfields>
472
  </index_subfields>
473
  <!--record.abs line 126: melm 400$9      Koha-Auth-Number-->
473
  <!--record.abs line 126: melm 400$0      Koha-Auth-Number-->
474
  <index_subfields tag="400" subfields="9">
474
  <index_subfields tag="400" subfields="0">
475
    <target_index>Koha-Auth-Number:w</target_index>
475
    <target_index>Koha-Auth-Number:w</target_index>
476
  </index_subfields>
476
  </index_subfields>
477
  <!--record.abs line 127: melm 400        Author,Author-name-personal,Name,Personal-name-->
477
  <!--record.abs line 127: melm 400        Author,Author-name-personal,Name,Personal-name-->
Lines 491-498 Link Here
491
    <target_index>Title:w</target_index>
491
    <target_index>Title:w</target_index>
492
    <target_index>Title-series:w</target_index>
492
    <target_index>Title-series:w</target_index>
493
  </index_subfields>
493
  </index_subfields>
494
  <!--record.abs line 130: melm 410$9      Koha-Auth-Number-->
494
  <!--record.abs line 130: melm 410$0      Koha-Auth-Number-->
495
  <index_subfields tag="410" subfields="9">
495
  <index_subfields tag="410" subfields="0">
496
    <target_index>Koha-Auth-Number:w</target_index>
496
    <target_index>Koha-Auth-Number:w</target_index>
497
  </index_subfields>
497
  </index_subfields>
498
  <!--record.abs line 131: melm 410        Author,Corporate-name-->
498
  <!--record.abs line 131: melm 410        Author,Corporate-name-->
Lines 519-526 Link Here
519
    <target_index>Title-series:w</target_index>
519
    <target_index>Title-series:w</target_index>
520
    <target_index>Title-series:p</target_index>
520
    <target_index>Title-series:p</target_index>
521
  </index_subfields>
521
  </index_subfields>
522
  <!--record.abs line 140: melm 440$9      Koha-Auth-Number-->
522
  <!--record.abs line 140: melm 440$0      Koha-Auth-Number-->
523
  <index_subfields tag="440" subfields="9">
523
  <index_subfields tag="440" subfields="0">
524
    <target_index>Koha-Auth-Number:w</target_index>
524
    <target_index>Koha-Auth-Number:w</target_index>
525
  </index_subfields>
525
  </index_subfields>
526
  <!--record.abs line 141: melm 440        Title-series:w,Title-series:p,Title,Title-series-->
526
  <!--record.abs line 141: melm 440        Title-series:w,Title-series:p,Title,Title-series-->
Lines 535-542 Link Here
535
    <target_index>Title-series:w</target_index>
535
    <target_index>Title-series:w</target_index>
536
    <target_index>Title-series:p</target_index>
536
    <target_index>Title-series:p</target_index>
537
  </index_subfields>
537
  </index_subfields>
538
  <!--record.abs line 143: melm 490$9      Koha-Auth-Number-->
538
  <!--record.abs line 143: melm 490$0      Koha-Auth-Number-->
539
  <index_subfields tag="490" subfields="9">
539
  <index_subfields tag="490" subfields="0">
540
    <target_index>Koha-Auth-Number:w</target_index>
540
    <target_index>Koha-Auth-Number:w</target_index>
541
  </index_subfields>
541
  </index_subfields>
542
  <!--record.abs line 144: melm 490        Title,Title-series-->
542
  <!--record.abs line 144: melm 490        Title,Title-series-->
Lines 628-635 Link Here
628
    <target_index>Subject:w</target_index>
628
    <target_index>Subject:w</target_index>
629
    <target_index>Subject:p</target_index>
629
    <target_index>Subject:p</target_index>
630
  </index_subfields>
630
  </index_subfields>
631
  <!--record.abs line 162: melm 600$9      Koha-Auth-Number-->
631
  <!--record.abs line 162: melm 600$0      Koha-Auth-Number-->
632
  <index_subfields tag="600" subfields="9">
632
  <index_subfields tag="600" subfields="0">
633
    <target_index>Koha-Auth-Number:w</target_index>
633
    <target_index>Koha-Auth-Number:w</target_index>
634
  </index_subfields>
634
  </index_subfields>
635
  <!--record.abs line 164: melm 600        Name,Personal-name,Subject-name-personal,Subject,Subject:p-->
635
  <!--record.abs line 164: melm 600        Name,Personal-name,Subject-name-personal,Subject,Subject:p-->
Lines 653-660 Link Here
653
    <target_index>Subject:w</target_index>
653
    <target_index>Subject:w</target_index>
654
    <target_index>Subject:p</target_index>
654
    <target_index>Subject:p</target_index>
655
  </index_subfields>
655
  </index_subfields>
656
  <!--record.abs line 167: melm 610$9      Koha-Auth-Number-->
656
  <!--record.abs line 167: melm 610$0      Koha-Auth-Number-->
657
  <index_subfields tag="610" subfields="9">
657
  <index_subfields tag="610" subfields="0">
658
    <target_index>Koha-Auth-Number:w</target_index>
658
    <target_index>Koha-Auth-Number:w</target_index>
659
  </index_subfields>
659
  </index_subfields>
660
  <!--record.abs line 168: melm 610        Name,Subject,Subject:p,Corporate-name-->
660
  <!--record.abs line 168: melm 610        Name,Subject,Subject:p,Corporate-name-->
Lines 677-684 Link Here
677
    <target_index>Subject:w</target_index>
677
    <target_index>Subject:w</target_index>
678
    <target_index>Subject:p</target_index>
678
    <target_index>Subject:p</target_index>
679
  </index_subfields>
679
  </index_subfields>
680
  <!--record.abs line 171: melm 611$9      Koha-Auth-Number-->
680
  <!--record.abs line 171: melm 611$0      Koha-Auth-Number-->
681
  <index_subfields tag="611" subfields="9">
681
  <index_subfields tag="611" subfields="0">
682
    <target_index>Koha-Auth-Number:w</target_index>
682
    <target_index>Koha-Auth-Number:w</target_index>
683
  </index_subfields>
683
  </index_subfields>
684
  <!--record.abs line 172: melm 611        Conference-name,Name,Subject,Subject:p-->
684
  <!--record.abs line 172: melm 611        Conference-name,Name,Subject,Subject:p-->
Lines 700-707 Link Here
700
    <target_index>Subject:w</target_index>
700
    <target_index>Subject:w</target_index>
701
    <target_index>Subject:p</target_index>
701
    <target_index>Subject:p</target_index>
702
  </index_subfields>
702
  </index_subfields>
703
  <!--record.abs line 175: melm 630$9      Koha-Auth-Number-->
703
  <!--record.abs line 175: melm 630$0      Koha-Auth-Number-->
704
  <index_subfields tag="630" subfields="9">
704
  <index_subfields tag="630" subfields="0">
705
    <target_index>Koha-Auth-Number:w</target_index>
705
    <target_index>Koha-Auth-Number:w</target_index>
706
  </index_subfields>
706
  </index_subfields>
707
  <!--record.abs line 176: melm 630        Subject,Subject:p-->
707
  <!--record.abs line 176: melm 630        Subject,Subject:p-->
Lines 709-719 Link Here
709
    <target_index>Subject:w</target_index>
709
    <target_index>Subject:w</target_index>
710
    <target_index>Subject:p</target_index>
710
    <target_index>Subject:p</target_index>
711
  </index_data_field>
711
  </index_data_field>
712
  <index_subfields tag="648" subfields="9">
712
  <index_subfields tag="648" subfields="0">
713
    <target_index>Koha-Auth-Number:w</target_index>
713
    <target_index>Koha-Auth-Number:w</target_index>
714
  </index_subfields>
714
  </index_subfields>
715
  <!--record.abs line 177: melm 650$9      Koha-Auth-Number    -->
715
  <!--record.abs line 177: melm 650$0      Koha-Auth-Number    -->
716
  <index_subfields tag="650" subfields="9">
716
  <index_subfields tag="650" subfields="0">
717
    <target_index>Koha-Auth-Number:w</target_index>
717
    <target_index>Koha-Auth-Number:w</target_index>
718
  </index_subfields>
718
  </index_subfields>
719
  <!--record.abs line 178: melm 650        Subject,Subject:p-->
719
  <!--record.abs line 178: melm 650        Subject,Subject:p-->
Lines 721-728 Link Here
721
    <target_index>Subject:w</target_index>
721
    <target_index>Subject:w</target_index>
722
    <target_index>Subject:p</target_index>
722
    <target_index>Subject:p</target_index>
723
  </index_data_field>
723
  </index_data_field>
724
  <!--record.abs line 179: melm 651$9      Koha-Auth-Number    -->
724
  <!--record.abs line 179: melm 651$0      Koha-Auth-Number    -->
725
  <index_subfields tag="651" subfields="9">
725
  <index_subfields tag="651" subfields="0">
726
    <target_index>Koha-Auth-Number:w</target_index>
726
    <target_index>Koha-Auth-Number:w</target_index>
727
  </index_subfields>
727
  </index_subfields>
728
  <!--record.abs line 180: melm 651        Name-geographic,Subject,Subject:p-->
728
  <!--record.abs line 180: melm 651        Name-geographic,Subject,Subject:p-->
Lines 731-738 Link Here
731
    <target_index>Subject:w</target_index>
731
    <target_index>Subject:w</target_index>
732
    <target_index>Subject:p</target_index>
732
    <target_index>Subject:p</target_index>
733
  </index_data_field>
733
  </index_data_field>
734
  <!--record.abs line 181: melm 652$9      Koha-Auth-Number    -->
734
  <!--record.abs line 181: melm 652$0      Koha-Auth-Number    -->
735
  <index_subfields tag="652" subfields="9">
735
  <index_subfields tag="652" subfields="0">
736
    <target_index>Koha-Auth-Number:w</target_index>
736
    <target_index>Koha-Auth-Number:w</target_index>
737
  </index_subfields>
737
  </index_subfields>
738
  <!--melm 653$a      Index-term-uncontrolled    -->
738
  <!--melm 653$a      Index-term-uncontrolled    -->
Lines 742-749 Link Here
742
    <target_index>Subject:w</target_index>
742
    <target_index>Subject:w</target_index>
743
    <target_index>Subject:p</target_index>
743
    <target_index>Subject:p</target_index>
744
  </index_subfields>
744
  </index_subfields>
745
  <!--record.abs line 183: melm 653$9      Koha-Auth-Number    -->
745
  <!--record.abs line 183: melm 653$0      Koha-Auth-Number    -->
746
  <index_subfields tag="653" subfields="9">
746
  <index_subfields tag="653" subfields="0">
747
    <target_index>Koha-Auth-Number:w</target_index>
747
    <target_index>Koha-Auth-Number:w</target_index>
748
  </index_subfields>
748
  </index_subfields>
749
  <!--record.abs line 184: melm 653        Subject,Subject:p-->
749
  <!--record.abs line 184: melm 653        Subject,Subject:p-->
Lines 751-758 Link Here
751
    <target_index>Subject:w</target_index>
751
    <target_index>Subject:w</target_index>
752
    <target_index>Subject:p</target_index>
752
    <target_index>Subject:p</target_index>
753
  </index_data_field>
753
  </index_data_field>
754
  <!--record.abs line 185: melm 654$9      Koha-Auth-Number    -->
754
  <!--record.abs line 185: melm 654$0      Koha-Auth-Number    -->
755
  <index_subfields tag="654" subfields="9">
755
  <index_subfields tag="654" subfields="0">
756
    <target_index>Koha-Auth-Number:w</target_index>
756
    <target_index>Koha-Auth-Number:w</target_index>
757
  </index_subfields>
757
  </index_subfields>
758
  <!--record.abs line 186: melm 654        Subject,Subject:p-->
758
  <!--record.abs line 186: melm 654        Subject,Subject:p-->
Lines 767-774 Link Here
767
    <target_index>Subject:w</target_index>
767
    <target_index>Subject:w</target_index>
768
    <target_index>Subject:p</target_index>
768
    <target_index>Subject:p</target_index>
769
  </index_subfields>
769
  </index_subfields>
770
  <!--record.abs line 187: melm 655$9      Koha-Auth-Number    -->
770
  <!--record.abs line 187: melm 655$0      Koha-Auth-Number    -->
771
  <index_subfields tag="655" subfields="9">
771
  <index_subfields tag="655" subfields="0">
772
    <target_index>Koha-Auth-Number:w</target_index>
772
    <target_index>Koha-Auth-Number:w</target_index>
773
  </index_subfields>
773
  </index_subfields>
774
  <!--record.abs line 188: melm 655        Subject,Subject:p-->
774
  <!--record.abs line 188: melm 655        Subject,Subject:p-->
Lines 776-783 Link Here
776
    <target_index>Subject:w</target_index>
776
    <target_index>Subject:w</target_index>
777
    <target_index>Subject:p</target_index>
777
    <target_index>Subject:p</target_index>
778
  </index_data_field>
778
  </index_data_field>
779
  <!--record.abs line 189: melm 656$9      Koha-Auth-Number    -->
779
  <!--record.abs line 189: melm 656$0      Koha-Auth-Number    -->
780
  <index_subfields tag="656" subfields="9">
780
  <index_subfields tag="656" subfields="0">
781
    <target_index>Koha-Auth-Number:w</target_index>
781
    <target_index>Koha-Auth-Number:w</target_index>
782
  </index_subfields>
782
  </index_subfields>
783
  <!--record.abs line 190: melm 656        Subject,Subject:p-->
783
  <!--record.abs line 190: melm 656        Subject,Subject:p-->
Lines 785-792 Link Here
785
    <target_index>Subject:w</target_index>
785
    <target_index>Subject:w</target_index>
786
    <target_index>Subject:p</target_index>
786
    <target_index>Subject:p</target_index>
787
  </index_data_field>
787
  </index_data_field>
788
  <!--record.abs line 191: melm 657$9      Koha-Auth-Number    -->
788
  <!--record.abs line 191: melm 657$0      Koha-Auth-Number    -->
789
  <index_subfields tag="657" subfields="9">
789
  <index_subfields tag="657" subfields="0">
790
    <target_index>Koha-Auth-Number:w</target_index>
790
    <target_index>Koha-Auth-Number:w</target_index>
791
  </index_subfields>
791
  </index_subfields>
792
  <!--record.abs line 192: melm 657        Subject,Subject:p-->
792
  <!--record.abs line 192: melm 657        Subject,Subject:p-->
Lines 820-830 Link Here
820
    <target_index>Subject:w</target_index>
820
    <target_index>Subject:w</target_index>
821
    <target_index>Subject:p</target_index>
821
    <target_index>Subject:p</target_index>
822
  </index_data_field>
822
  </index_data_field>
823
  <index_subfields tag="662" subfields="9">
823
  <index_subfields tag="662" subfields="0">
824
    <target_index>Koha-Auth-Number:w</target_index>
824
    <target_index>Koha-Auth-Number:w</target_index>
825
  </index_subfields>
825
  </index_subfields>
826
  <!--record.abs line 197: melm 690$9      Koha-Auth-Number    -->
826
  <!--record.abs line 197: melm 690$0      Koha-Auth-Number    -->
827
  <index_subfields tag="690" subfields="9">
827
  <index_subfields tag="690" subfields="0">
828
    <target_index>Koha-Auth-Number:w</target_index>
828
    <target_index>Koha-Auth-Number:w</target_index>
829
  </index_subfields>
829
  </index_subfields>
830
  <!--record.abs line 198: melm 690        Subject,Subject:p-->
830
  <!--record.abs line 198: melm 690        Subject,Subject:p-->
Lines 832-854 Link Here
832
    <target_index>Subject:w</target_index>
832
    <target_index>Subject:w</target_index>
833
    <target_index>Subject:p</target_index>
833
    <target_index>Subject:p</target_index>
834
  </index_data_field>
834
  </index_data_field>
835
  <index_subfields tag="691" subfields="9">
835
  <index_subfields tag="691" subfields="0">
836
    <target_index>Koha-Auth-Number:w</target_index>
836
    <target_index>Koha-Auth-Number:w</target_index>
837
  </index_subfields>
837
  </index_subfields>
838
  <index_subfields tag="696" subfields="9">
838
  <index_subfields tag="696" subfields="0">
839
    <target_index>Koha-Auth-Number:w</target_index>
839
    <target_index>Koha-Auth-Number:w</target_index>
840
  </index_subfields>
840
  </index_subfields>
841
  <index_subfields tag="697" subfields="9">
841
  <index_subfields tag="697" subfields="0">
842
    <target_index>Koha-Auth-Number:w</target_index>
842
    <target_index>Koha-Auth-Number:w</target_index>
843
  </index_subfields>
843
  </index_subfields>
844
  <index_subfields tag="698" subfields="9">
844
  <index_subfields tag="698" subfields="0">
845
    <target_index>Koha-Auth-Number:w</target_index>
845
    <target_index>Koha-Auth-Number:w</target_index>
846
  </index_subfields>
846
  </index_subfields>
847
  <index_subfields tag="699" subfields="9">
847
  <index_subfields tag="699" subfields="0">
848
    <target_index>Koha-Auth-Number:w</target_index>
848
    <target_index>Koha-Auth-Number:w</target_index>
849
  </index_subfields>
849
  </index_subfields>
850
  <!--record.abs line 200: melm 700$9      Cross-Reference,Koha-Auth-Number-->
850
  <!--record.abs line 200: melm 700$0      Cross-Reference,Koha-Auth-Number-->
851
  <index_subfields tag="700" subfields="9">
851
  <index_subfields tag="700" subfields="0">
852
    <target_index>Cross-Reference:w</target_index>
852
    <target_index>Cross-Reference:w</target_index>
853
    <target_index>Koha-Auth-Number:w</target_index>
853
    <target_index>Koha-Auth-Number:w</target_index>
854
  </index_subfields>
854
  </index_subfields>
Lines 892-899 Link Here
892
  <index_subfields tag="710" subfields="a">
892
  <index_subfields tag="710" subfields="a">
893
    <target_index>Name-and-title:w</target_index>
893
    <target_index>Name-and-title:w</target_index>
894
  </index_subfields>
894
  </index_subfields>
895
  <!--record.abs line 211: melm 710$9      Koha-Auth-Number    -->
895
  <!--record.abs line 211: melm 710$0      Koha-Auth-Number    -->
896
  <index_subfields tag="710" subfields="9">
896
  <index_subfields tag="710" subfields="0">
897
    <target_index>Koha-Auth-Number:w</target_index>
897
    <target_index>Koha-Auth-Number:w</target_index>
898
  </index_subfields>
898
  </index_subfields>
899
  <!--record.abs line 212: melm 710        Author,Author:p,Corporate-name,Name-->
899
  <!--record.abs line 212: melm 710        Author,Author:p,Corporate-name,Name-->
Lines 913-920 Link Here
913
    <target_index>Title:w</target_index>
913
    <target_index>Title:w</target_index>
914
    <target_index>Title-uniform:w</target_index>
914
    <target_index>Title-uniform:w</target_index>
915
  </index_subfields>
915
  </index_subfields>
916
  <!--record.abs line 216: melm 711$9      Koha-Auth-Number    -->
916
  <!--record.abs line 216: melm 711$0      Koha-Auth-Number    -->
917
  <index_subfields tag="711" subfields="9">
917
  <index_subfields tag="711" subfields="0">
918
    <target_index>Koha-Auth-Number:w</target_index>
918
    <target_index>Koha-Auth-Number:w</target_index>
919
  </index_subfields>
919
  </index_subfields>
920
  <!--record.abs line 218: melm 711        Author,Author:p,Author-name-corporate,Name,Conference-name-->
920
  <!--record.abs line 218: melm 711        Author,Author:p,Author-name-corporate,Name,Conference-name-->
Lines 933-940 Link Here
933
  <index_subfields tag="730" subfields="r">
933
  <index_subfields tag="730" subfields="r">
934
    <target_index>Music-key:w</target_index>
934
    <target_index>Music-key:w</target_index>
935
  </index_subfields>
935
  </index_subfields>
936
  <!--record.abs line 221: melm 730$9      Koha-Auth-Number-->
936
  <!--record.abs line 221: melm 730$0      Koha-Auth-Number-->
937
  <index_subfields tag="730" subfields="9">
937
  <index_subfields tag="730" subfields="0">
938
    <target_index>Koha-Auth-Number:w</target_index>
938
    <target_index>Koha-Auth-Number:w</target_index>
939
  </index_subfields>
939
  </index_subfields>
940
  <!--record.abs line 222: melm 730        Title,Title:p,Title-uniform-->
940
  <!--record.abs line 222: melm 730        Title,Title:p,Title-uniform-->
Lines 953-960 Link Here
953
  <index_subfields tag="751" subfields="a">
953
  <index_subfields tag="751" subfields="a">
954
    <target_index>Name-geographic:w</target_index>
954
    <target_index>Name-geographic:w</target_index>
955
  </index_subfields>
955
  </index_subfields>
956
  <!--record.abs line 225: melm 751$9      Koha-Auth-Number-->
956
  <!--record.abs line 225: melm 751$0      Koha-Auth-Number-->
957
  <index_subfields tag="751" subfields="9">
957
  <index_subfields tag="751" subfields="0">
958
    <target_index>Koha-Auth-Number:w</target_index>
958
    <target_index>Koha-Auth-Number:w</target_index>
959
  </index_subfields>
959
  </index_subfields>
960
  <!--record.abs line 226: melm 751        Name-geographic-->
960
  <!--record.abs line 226: melm 751        Name-geographic-->
Lines 1031-1046 Link Here
1031
  <index_subfields tag="787" subfields="w">
1031
  <index_subfields tag="787" subfields="w">
1032
    <target_index>Record-control-number:w</target_index>
1032
    <target_index>Record-control-number:w</target_index>
1033
  </index_subfields>
1033
  </index_subfields>
1034
  <index_subfields tag="796" subfields="9">
1034
  <index_subfields tag="796" subfields="0">
1035
    <target_index>Koha-Auth-Number:w</target_index>
1035
    <target_index>Koha-Auth-Number:w</target_index>
1036
  </index_subfields>
1036
  </index_subfields>
1037
  <index_subfields tag="797" subfields="9">
1037
  <index_subfields tag="797" subfields="0">
1038
    <target_index>Koha-Auth-Number:w</target_index>
1038
    <target_index>Koha-Auth-Number:w</target_index>
1039
  </index_subfields>
1039
  </index_subfields>
1040
  <index_subfields tag="798" subfields="9">
1040
  <index_subfields tag="798" subfields="0">
1041
    <target_index>Koha-Auth-Number:w</target_index>
1041
    <target_index>Koha-Auth-Number:w</target_index>
1042
  </index_subfields>
1042
  </index_subfields>
1043
  <index_subfields tag="799" subfields="9">
1043
  <index_subfields tag="799" subfields="0">
1044
    <target_index>Koha-Auth-Number:w</target_index>
1044
    <target_index>Koha-Auth-Number:w</target_index>
1045
  </index_subfields>
1045
  </index_subfields>
1046
  <!--record.abs line 244: melm 800$a      Name-and-title,Title-series:w,Title-series:p-->
1046
  <!--record.abs line 244: melm 800$a      Name-and-title,Title-series:w,Title-series:p-->
Lines 1057-1064 Link Here
1057
    <target_index>Title-series:w</target_index>
1057
    <target_index>Title-series:w</target_index>
1058
    <target_index>Title-series:p</target_index>
1058
    <target_index>Title-series:p</target_index>
1059
  </index_subfields>
1059
  </index_subfields>
1060
  <!--record.abs line 247: melm 800$9      Koha-Auth-Number-->
1060
  <!--record.abs line 247: melm 800$0      Koha-Auth-Number-->
1061
  <index_subfields tag="800" subfields="9">
1061
  <index_subfields tag="800" subfields="0">
1062
    <target_index>Koha-Auth-Number:w</target_index>
1062
    <target_index>Koha-Auth-Number:w</target_index>
1063
  </index_subfields>
1063
  </index_subfields>
1064
  <!--record.abs line 248: melm 800$w      Record-control-number-->
1064
  <!--record.abs line 248: melm 800$w      Record-control-number-->
Lines 1090-1097 Link Here
1090
  <index_subfields tag="810" subfields="w">
1090
  <index_subfields tag="810" subfields="w">
1091
    <target_index>Record-control-number:w</target_index>
1091
    <target_index>Record-control-number:w</target_index>
1092
  </index_subfields>
1092
  </index_subfields>
1093
  <!--record.abs line 253: melm 810$9      Koha-Auth-Number-->
1093
  <!--record.abs line 253: melm 810$0      Koha-Auth-Number-->
1094
  <index_subfields tag="810" subfields="9">
1094
  <index_subfields tag="810" subfields="0">
1095
    <target_index>Koha-Auth-Number:w</target_index>
1095
    <target_index>Koha-Auth-Number:w</target_index>
1096
  </index_subfields>
1096
  </index_subfields>
1097
  <!--record.abs line 254: melm 810        Author,Corporate-name,Author-name-corporate,Name-->
1097
  <!--record.abs line 254: melm 810        Author,Corporate-name,Author-name-corporate,Name-->
Lines 1107-1114 Link Here
1107
    <target_index>Title-series:w</target_index>
1107
    <target_index>Title-series:w</target_index>
1108
    <target_index>Title-series:p</target_index>
1108
    <target_index>Title-series:p</target_index>
1109
  </index_subfields>
1109
  </index_subfields>
1110
  <!--record.abs line 256: melm 811$9      Koha-Auth-Number-->
1110
  <!--record.abs line 256: melm 811$0      Koha-Auth-Number-->
1111
  <index_subfields tag="811" subfields="9">
1111
  <index_subfields tag="811" subfields="0">
1112
    <target_index>Koha-Auth-Number:w</target_index>
1112
    <target_index>Koha-Auth-Number:w</target_index>
1113
  </index_subfields>
1113
  </index_subfields>
1114
  <!--record.abs line 258: melm 811$t      Author-title,Name-and-title,Title,Title-series:w,Title-series:p-->
1114
  <!--record.abs line 258: melm 811$t      Author-title,Name-and-title,Title,Title-series:w,Title-series:p-->
Lines 1134-1141 Link Here
1134
  <index_subfields tag="830" subfields="w">
1134
  <index_subfields tag="830" subfields="w">
1135
    <target_index>Record-control-number:w</target_index>
1135
    <target_index>Record-control-number:w</target_index>
1136
  </index_subfields>
1136
  </index_subfields>
1137
  <!--record.abs line 262: melm 830$9      Koha-Auth-Number-->
1137
  <!--record.abs line 262: melm 830$0      Koha-Auth-Number-->
1138
  <index_subfields tag="830" subfields="9">
1138
  <index_subfields tag="830" subfields="0">
1139
    <target_index>Koha-Auth-Number:w</target_index>
1139
    <target_index>Koha-Auth-Number:w</target_index>
1140
  </index_subfields>
1140
  </index_subfields>
1141
  <!--record.abs line 263: melm 830        Title,Title-series:w,Title-series:p-->
1141
  <!--record.abs line 263: melm 830        Title,Title-series:w,Title-series:p-->
Lines 1150-1165 Link Here
1150
    <target_index>Title-series:w</target_index>
1150
    <target_index>Title-series:w</target_index>
1151
    <target_index>Title-series:p</target_index>
1151
    <target_index>Title-series:p</target_index>
1152
  </index_data_field>
1152
  </index_data_field>
1153
  <index_subfields tag="896" subfields="9">
1153
  <index_subfields tag="896" subfields="0">
1154
    <target_index>Koha-Auth-Number:w</target_index>
1154
    <target_index>Koha-Auth-Number:w</target_index>
1155
  </index_subfields>
1155
  </index_subfields>
1156
  <index_subfields tag="897" subfields="9">
1156
  <index_subfields tag="897" subfields="0">
1157
    <target_index>Koha-Auth-Number:w</target_index>
1157
    <target_index>Koha-Auth-Number:w</target_index>
1158
  </index_subfields>
1158
  </index_subfields>
1159
  <index_subfields tag="898" subfields="9">
1159
  <index_subfields tag="898" subfields="0">
1160
    <target_index>Koha-Auth-Number:w</target_index>
1160
    <target_index>Koha-Auth-Number:w</target_index>
1161
  </index_subfields>
1161
  </index_subfields>
1162
  <index_subfields tag="899" subfields="9">
1162
  <index_subfields tag="899" subfields="0">
1163
    <target_index>Koha-Auth-Number:w</target_index>
1163
    <target_index>Koha-Auth-Number:w</target_index>
1164
  </index_subfields>
1164
  </index_subfields>
1165
  <!--record.abs line 268: melm 999$c      Local-Number:n,Local-Number:w,Local-Number:s-->
1165
  <!--record.abs line 268: melm 999$c      Local-Number:n,Local-Number:w,Local-Number:s-->
(-)a/etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl (-46 / +46 lines)
Lines 239-245 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
239
  </xslo:template>
239
  </xslo:template>
240
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='100']">
240
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='100']">
241
    <xslo:for-each select="marc:subfield">
241
    <xslo:for-each select="marc:subfield">
242
      <xslo:if test="contains('9', @code)">
242
      <xslo:if test="contains('0', @code)">
243
        <z:index name="Cross-Reference:w Koha-Auth-Number:w">
243
        <z:index name="Cross-Reference:w Koha-Auth-Number:w">
244
          <xslo:value-of select="."/>
244
          <xslo:value-of select="."/>
245
        </z:index>
245
        </z:index>
Lines 255-261 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
255
  </xslo:template>
255
  </xslo:template>
256
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='110']">
256
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='110']">
257
    <xslo:for-each select="marc:subfield">
257
    <xslo:for-each select="marc:subfield">
258
      <xslo:if test="contains('9', @code)">
258
      <xslo:if test="contains('0', @code)">
259
        <z:index name="Koha-Auth-Number:w">
259
        <z:index name="Koha-Auth-Number:w">
260
          <xslo:value-of select="."/>
260
          <xslo:value-of select="."/>
261
        </z:index>
261
        </z:index>
Lines 264-270 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
264
  </xslo:template>
264
  </xslo:template>
265
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='111']">
265
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='111']">
266
    <xslo:for-each select="marc:subfield">
266
    <xslo:for-each select="marc:subfield">
267
      <xslo:if test="contains('9', @code)">
267
      <xslo:if test="contains('0', @code)">
268
        <z:index name="Koha-Auth-Number:w">
268
        <z:index name="Koha-Auth-Number:w">
269
          <xslo:value-of select="."/>
269
          <xslo:value-of select="."/>
270
        </z:index>
270
        </z:index>
Lines 287-293 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
287
      </xslo:if>
287
      </xslo:if>
288
    </xslo:for-each>
288
    </xslo:for-each>
289
    <xslo:for-each select="marc:subfield">
289
    <xslo:for-each select="marc:subfield">
290
      <xslo:if test="contains('9', @code)">
290
      <xslo:if test="contains('0', @code)">
291
        <z:index name="Koha-Auth-Number:w">
291
        <z:index name="Koha-Auth-Number:w">
292
          <xslo:value-of select="."/>
292
          <xslo:value-of select="."/>
293
        </z:index>
293
        </z:index>
Lines 342-348 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
342
      </xslo:if>
342
      </xslo:if>
343
    </xslo:for-each>
343
    </xslo:for-each>
344
    <xslo:for-each select="marc:subfield">
344
    <xslo:for-each select="marc:subfield">
345
      <xslo:if test="contains('9', @code)">
345
      <xslo:if test="contains('0', @code)">
346
        <z:index name="Cross-Reference:w Koha-Auth-Number:w">
346
        <z:index name="Cross-Reference:w Koha-Auth-Number:w">
347
          <xslo:value-of select="."/>
347
          <xslo:value-of select="."/>
348
        </z:index>
348
        </z:index>
Lines 388-394 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
388
      </xslo:if>
388
      </xslo:if>
389
    </xslo:for-each>
389
    </xslo:for-each>
390
    <xslo:for-each select="marc:subfield">
390
    <xslo:for-each select="marc:subfield">
391
      <xslo:if test="contains('9', @code)">
391
      <xslo:if test="contains('0', @code)">
392
        <z:index name="Koha-Auth-Number:w">
392
        <z:index name="Koha-Auth-Number:w">
393
          <xslo:value-of select="."/>
393
          <xslo:value-of select="."/>
394
        </z:index>
394
        </z:index>
Lines 411-417 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
411
      </xslo:if>
411
      </xslo:if>
412
    </xslo:for-each>
412
    </xslo:for-each>
413
    <xslo:for-each select="marc:subfield">
413
    <xslo:for-each select="marc:subfield">
414
      <xslo:if test="contains('9', @code)">
414
      <xslo:if test="contains('0', @code)">
415
        <z:index name="Koha-Auth-Number:w">
415
        <z:index name="Koha-Auth-Number:w">
416
          <xslo:value-of select="."/>
416
          <xslo:value-of select="."/>
417
        </z:index>
417
        </z:index>
Lines 443-449 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
443
      </xslo:if>
443
      </xslo:if>
444
    </xslo:for-each>
444
    </xslo:for-each>
445
    <xslo:for-each select="marc:subfield">
445
    <xslo:for-each select="marc:subfield">
446
      <xslo:if test="contains('9', @code)">
446
      <xslo:if test="contains('0', @code)">
447
        <z:index name="Koha-Auth-Number:w">
447
        <z:index name="Koha-Auth-Number:w">
448
          <xslo:value-of select="."/>
448
          <xslo:value-of select="."/>
449
        </z:index>
449
        </z:index>
Lines 459-465 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
459
      </xslo:if>
459
      </xslo:if>
460
    </xslo:for-each>
460
    </xslo:for-each>
461
    <xslo:for-each select="marc:subfield">
461
    <xslo:for-each select="marc:subfield">
462
      <xslo:if test="contains('9', @code)">
462
      <xslo:if test="contains('0', @code)">
463
        <z:index name="Koha-Auth-Number:w">
463
        <z:index name="Koha-Auth-Number:w">
464
          <xslo:value-of select="."/>
464
          <xslo:value-of select="."/>
465
        </z:index>
465
        </z:index>
Lines 552-558 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
552
      </xslo:if>
552
      </xslo:if>
553
    </xslo:for-each>
553
    </xslo:for-each>
554
    <xslo:for-each select="marc:subfield">
554
    <xslo:for-each select="marc:subfield">
555
      <xslo:if test="contains('9', @code)">
555
      <xslo:if test="contains('0', @code)">
556
        <z:index name="Koha-Auth-Number:w">
556
        <z:index name="Koha-Auth-Number:w">
557
          <xslo:value-of select="."/>
557
          <xslo:value-of select="."/>
558
        </z:index>
558
        </z:index>
Lines 575-581 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
575
      </xslo:if>
575
      </xslo:if>
576
    </xslo:for-each>
576
    </xslo:for-each>
577
    <xslo:for-each select="marc:subfield">
577
    <xslo:for-each select="marc:subfield">
578
      <xslo:if test="contains('9', @code)">
578
      <xslo:if test="contains('0', @code)">
579
        <z:index name="Koha-Auth-Number:w">
579
        <z:index name="Koha-Auth-Number:w">
580
          <xslo:value-of select="."/>
580
          <xslo:value-of select="."/>
581
        </z:index>
581
        </z:index>
Lines 598-604 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
598
      </xslo:if>
598
      </xslo:if>
599
    </xslo:for-each>
599
    </xslo:for-each>
600
    <xslo:for-each select="marc:subfield">
600
    <xslo:for-each select="marc:subfield">
601
      <xslo:if test="contains('9', @code)">
601
      <xslo:if test="contains('0', @code)">
602
        <z:index name="Koha-Auth-Number:w">
602
        <z:index name="Koha-Auth-Number:w">
603
          <xslo:value-of select="."/>
603
          <xslo:value-of select="."/>
604
        </z:index>
604
        </z:index>
Lines 621-627 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
621
      </xslo:if>
621
      </xslo:if>
622
    </xslo:for-each>
622
    </xslo:for-each>
623
    <xslo:for-each select="marc:subfield">
623
    <xslo:for-each select="marc:subfield">
624
      <xslo:if test="contains('9', @code)">
624
      <xslo:if test="contains('0', @code)">
625
        <z:index name="Koha-Auth-Number:w">
625
        <z:index name="Koha-Auth-Number:w">
626
          <xslo:value-of select="."/>
626
          <xslo:value-of select="."/>
627
        </z:index>
627
        </z:index>
Lines 630-636 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
630
  </xslo:template>
630
  </xslo:template>
631
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='648']">
631
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='648']">
632
    <xslo:for-each select="marc:subfield">
632
    <xslo:for-each select="marc:subfield">
633
      <xslo:if test="contains('9', @code)">
633
      <xslo:if test="contains('0', @code)">
634
        <z:index name="Koha-Auth-Number:w">
634
        <z:index name="Koha-Auth-Number:w">
635
          <xslo:value-of select="."/>
635
          <xslo:value-of select="."/>
636
        </z:index>
636
        </z:index>
Lines 639-645 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
639
  </xslo:template>
639
  </xslo:template>
640
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='650']">
640
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='650']">
641
    <xslo:for-each select="marc:subfield">
641
    <xslo:for-each select="marc:subfield">
642
      <xslo:if test="contains('9', @code)">
642
      <xslo:if test="contains('0', @code)">
643
        <z:index name="Koha-Auth-Number:w">
643
        <z:index name="Koha-Auth-Number:w">
644
          <xslo:value-of select="."/>
644
          <xslo:value-of select="."/>
645
        </z:index>
645
        </z:index>
Lines 648-654 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
648
  </xslo:template>
648
  </xslo:template>
649
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='651']">
649
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='651']">
650
    <xslo:for-each select="marc:subfield">
650
    <xslo:for-each select="marc:subfield">
651
      <xslo:if test="contains('9', @code)">
651
      <xslo:if test="contains('0', @code)">
652
        <z:index name="Koha-Auth-Number:w">
652
        <z:index name="Koha-Auth-Number:w">
653
          <xslo:value-of select="."/>
653
          <xslo:value-of select="."/>
654
        </z:index>
654
        </z:index>
Lines 657-663 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
657
  </xslo:template>
657
  </xslo:template>
658
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='652']">
658
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='652']">
659
    <xslo:for-each select="marc:subfield">
659
    <xslo:for-each select="marc:subfield">
660
      <xslo:if test="contains('9', @code)">
660
      <xslo:if test="contains('0', @code)">
661
        <z:index name="Koha-Auth-Number:w">
661
        <z:index name="Koha-Auth-Number:w">
662
          <xslo:value-of select="."/>
662
          <xslo:value-of select="."/>
663
        </z:index>
663
        </z:index>
Lines 673-679 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
673
      </xslo:if>
673
      </xslo:if>
674
    </xslo:for-each>
674
    </xslo:for-each>
675
    <xslo:for-each select="marc:subfield">
675
    <xslo:for-each select="marc:subfield">
676
      <xslo:if test="contains('9', @code)">
676
      <xslo:if test="contains('0', @code)">
677
        <z:index name="Koha-Auth-Number:w">
677
        <z:index name="Koha-Auth-Number:w">
678
          <xslo:value-of select="."/>
678
          <xslo:value-of select="."/>
679
        </z:index>
679
        </z:index>
Lines 682-688 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
682
  </xslo:template>
682
  </xslo:template>
683
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='654']">
683
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='654']">
684
    <xslo:for-each select="marc:subfield">
684
    <xslo:for-each select="marc:subfield">
685
      <xslo:if test="contains('9', @code)">
685
      <xslo:if test="contains('0', @code)">
686
        <z:index name="Koha-Auth-Number:w">
686
        <z:index name="Koha-Auth-Number:w">
687
          <xslo:value-of select="."/>
687
          <xslo:value-of select="."/>
688
        </z:index>
688
        </z:index>
Lines 698-704 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
698
      </xslo:if>
698
      </xslo:if>
699
    </xslo:for-each>
699
    </xslo:for-each>
700
    <xslo:for-each select="marc:subfield">
700
    <xslo:for-each select="marc:subfield">
701
      <xslo:if test="contains('9', @code)">
701
      <xslo:if test="contains('0', @code)">
702
        <z:index name="Koha-Auth-Number:w">
702
        <z:index name="Koha-Auth-Number:w">
703
          <xslo:value-of select="."/>
703
          <xslo:value-of select="."/>
704
        </z:index>
704
        </z:index>
Lines 707-713 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
707
  </xslo:template>
707
  </xslo:template>
708
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='656']">
708
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='656']">
709
    <xslo:for-each select="marc:subfield">
709
    <xslo:for-each select="marc:subfield">
710
      <xslo:if test="contains('9', @code)">
710
      <xslo:if test="contains('0', @code)">
711
        <z:index name="Koha-Auth-Number:w">
711
        <z:index name="Koha-Auth-Number:w">
712
          <xslo:value-of select="."/>
712
          <xslo:value-of select="."/>
713
        </z:index>
713
        </z:index>
Lines 716-722 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
716
  </xslo:template>
716
  </xslo:template>
717
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='657']">
717
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='657']">
718
    <xslo:for-each select="marc:subfield">
718
    <xslo:for-each select="marc:subfield">
719
      <xslo:if test="contains('9', @code)">
719
      <xslo:if test="contains('0', @code)">
720
        <z:index name="Koha-Auth-Number:w">
720
        <z:index name="Koha-Auth-Number:w">
721
          <xslo:value-of select="."/>
721
          <xslo:value-of select="."/>
722
        </z:index>
722
        </z:index>
Lines 748-754 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
748
  </xslo:template>
748
  </xslo:template>
749
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='662']">
749
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='662']">
750
    <xslo:for-each select="marc:subfield">
750
    <xslo:for-each select="marc:subfield">
751
      <xslo:if test="contains('9', @code)">
751
      <xslo:if test="contains('0', @code)">
752
        <z:index name="Koha-Auth-Number:w">
752
        <z:index name="Koha-Auth-Number:w">
753
          <xslo:value-of select="."/>
753
          <xslo:value-of select="."/>
754
        </z:index>
754
        </z:index>
Lines 757-763 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
757
  </xslo:template>
757
  </xslo:template>
758
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='690']">
758
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='690']">
759
    <xslo:for-each select="marc:subfield">
759
    <xslo:for-each select="marc:subfield">
760
      <xslo:if test="contains('9', @code)">
760
      <xslo:if test="contains('0', @code)">
761
        <z:index name="Koha-Auth-Number:w">
761
        <z:index name="Koha-Auth-Number:w">
762
          <xslo:value-of select="."/>
762
          <xslo:value-of select="."/>
763
        </z:index>
763
        </z:index>
Lines 766-772 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
766
  </xslo:template>
766
  </xslo:template>
767
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='691']">
767
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='691']">
768
    <xslo:for-each select="marc:subfield">
768
    <xslo:for-each select="marc:subfield">
769
      <xslo:if test="contains('9', @code)">
769
      <xslo:if test="contains('0', @code)">
770
        <z:index name="Koha-Auth-Number:w">
770
        <z:index name="Koha-Auth-Number:w">
771
          <xslo:value-of select="."/>
771
          <xslo:value-of select="."/>
772
        </z:index>
772
        </z:index>
Lines 775-781 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
775
  </xslo:template>
775
  </xslo:template>
776
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='696']">
776
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='696']">
777
    <xslo:for-each select="marc:subfield">
777
    <xslo:for-each select="marc:subfield">
778
      <xslo:if test="contains('9', @code)">
778
      <xslo:if test="contains('0', @code)">
779
        <z:index name="Koha-Auth-Number:w">
779
        <z:index name="Koha-Auth-Number:w">
780
          <xslo:value-of select="."/>
780
          <xslo:value-of select="."/>
781
        </z:index>
781
        </z:index>
Lines 784-790 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
784
  </xslo:template>
784
  </xslo:template>
785
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='697']">
785
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='697']">
786
    <xslo:for-each select="marc:subfield">
786
    <xslo:for-each select="marc:subfield">
787
      <xslo:if test="contains('9', @code)">
787
      <xslo:if test="contains('0', @code)">
788
        <z:index name="Koha-Auth-Number:w">
788
        <z:index name="Koha-Auth-Number:w">
789
          <xslo:value-of select="."/>
789
          <xslo:value-of select="."/>
790
        </z:index>
790
        </z:index>
Lines 793-799 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
793
  </xslo:template>
793
  </xslo:template>
794
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='698']">
794
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='698']">
795
    <xslo:for-each select="marc:subfield">
795
    <xslo:for-each select="marc:subfield">
796
      <xslo:if test="contains('9', @code)">
796
      <xslo:if test="contains('0', @code)">
797
        <z:index name="Koha-Auth-Number:w">
797
        <z:index name="Koha-Auth-Number:w">
798
          <xslo:value-of select="."/>
798
          <xslo:value-of select="."/>
799
        </z:index>
799
        </z:index>
Lines 802-808 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
802
  </xslo:template>
802
  </xslo:template>
803
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='699']">
803
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='699']">
804
    <xslo:for-each select="marc:subfield">
804
    <xslo:for-each select="marc:subfield">
805
      <xslo:if test="contains('9', @code)">
805
      <xslo:if test="contains('0', @code)">
806
        <z:index name="Koha-Auth-Number:w">
806
        <z:index name="Koha-Auth-Number:w">
807
          <xslo:value-of select="."/>
807
          <xslo:value-of select="."/>
808
        </z:index>
808
        </z:index>
Lines 811-817 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
811
  </xslo:template>
811
  </xslo:template>
812
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='700']">
812
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='700']">
813
    <xslo:for-each select="marc:subfield">
813
    <xslo:for-each select="marc:subfield">
814
      <xslo:if test="contains('9', @code)">
814
      <xslo:if test="contains('0', @code)">
815
        <z:index name="Cross-Reference:w Koha-Auth-Number:w">
815
        <z:index name="Cross-Reference:w Koha-Auth-Number:w">
816
          <xslo:value-of select="."/>
816
          <xslo:value-of select="."/>
817
        </z:index>
817
        </z:index>
Lines 862-868 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
862
      </xslo:if>
862
      </xslo:if>
863
    </xslo:for-each>
863
    </xslo:for-each>
864
    <xslo:for-each select="marc:subfield">
864
    <xslo:for-each select="marc:subfield">
865
      <xslo:if test="contains('9', @code)">
865
      <xslo:if test="contains('0', @code)">
866
        <z:index name="Koha-Auth-Number:w">
866
        <z:index name="Koha-Auth-Number:w">
867
          <xslo:value-of select="."/>
867
          <xslo:value-of select="."/>
868
        </z:index>
868
        </z:index>
Lines 885-891 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
885
      </xslo:if>
885
      </xslo:if>
886
    </xslo:for-each>
886
    </xslo:for-each>
887
    <xslo:for-each select="marc:subfield">
887
    <xslo:for-each select="marc:subfield">
888
      <xslo:if test="contains('9', @code)">
888
      <xslo:if test="contains('0', @code)">
889
        <z:index name="Koha-Auth-Number:w">
889
        <z:index name="Koha-Auth-Number:w">
890
          <xslo:value-of select="."/>
890
          <xslo:value-of select="."/>
891
        </z:index>
891
        </z:index>
Lines 908-914 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
908
      </xslo:if>
908
      </xslo:if>
909
    </xslo:for-each>
909
    </xslo:for-each>
910
    <xslo:for-each select="marc:subfield">
910
    <xslo:for-each select="marc:subfield">
911
      <xslo:if test="contains('9', @code)">
911
      <xslo:if test="contains('0', @code)">
912
        <z:index name="Koha-Auth-Number:w">
912
        <z:index name="Koha-Auth-Number:w">
913
          <xslo:value-of select="."/>
913
          <xslo:value-of select="."/>
914
        </z:index>
914
        </z:index>
Lines 924-930 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
924
      </xslo:if>
924
      </xslo:if>
925
    </xslo:for-each>
925
    </xslo:for-each>
926
    <xslo:for-each select="marc:subfield">
926
    <xslo:for-each select="marc:subfield">
927
      <xslo:if test="contains('9', @code)">
927
      <xslo:if test="contains('0', @code)">
928
        <z:index name="Koha-Auth-Number:w">
928
        <z:index name="Koha-Auth-Number:w">
929
          <xslo:value-of select="."/>
929
          <xslo:value-of select="."/>
930
        </z:index>
930
        </z:index>
Lines 1051-1057 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
1051
  </xslo:template>
1051
  </xslo:template>
1052
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='796']">
1052
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='796']">
1053
    <xslo:for-each select="marc:subfield">
1053
    <xslo:for-each select="marc:subfield">
1054
      <xslo:if test="contains('9', @code)">
1054
      <xslo:if test="contains('0', @code)">
1055
        <z:index name="Koha-Auth-Number:w">
1055
        <z:index name="Koha-Auth-Number:w">
1056
          <xslo:value-of select="."/>
1056
          <xslo:value-of select="."/>
1057
        </z:index>
1057
        </z:index>
Lines 1060-1066 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
1060
  </xslo:template>
1060
  </xslo:template>
1061
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='797']">
1061
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='797']">
1062
    <xslo:for-each select="marc:subfield">
1062
    <xslo:for-each select="marc:subfield">
1063
      <xslo:if test="contains('9', @code)">
1063
      <xslo:if test="contains('0', @code)">
1064
        <z:index name="Koha-Auth-Number:w">
1064
        <z:index name="Koha-Auth-Number:w">
1065
          <xslo:value-of select="."/>
1065
          <xslo:value-of select="."/>
1066
        </z:index>
1066
        </z:index>
Lines 1069-1075 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
1069
  </xslo:template>
1069
  </xslo:template>
1070
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='798']">
1070
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='798']">
1071
    <xslo:for-each select="marc:subfield">
1071
    <xslo:for-each select="marc:subfield">
1072
      <xslo:if test="contains('9', @code)">
1072
      <xslo:if test="contains('0', @code)">
1073
        <z:index name="Koha-Auth-Number:w">
1073
        <z:index name="Koha-Auth-Number:w">
1074
          <xslo:value-of select="."/>
1074
          <xslo:value-of select="."/>
1075
        </z:index>
1075
        </z:index>
Lines 1078-1084 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
1078
  </xslo:template>
1078
  </xslo:template>
1079
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='799']">
1079
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='799']">
1080
    <xslo:for-each select="marc:subfield">
1080
    <xslo:for-each select="marc:subfield">
1081
      <xslo:if test="contains('9', @code)">
1081
      <xslo:if test="contains('0', @code)">
1082
        <z:index name="Koha-Auth-Number:w">
1082
        <z:index name="Koha-Auth-Number:w">
1083
          <xslo:value-of select="."/>
1083
          <xslo:value-of select="."/>
1084
        </z:index>
1084
        </z:index>
Lines 1101-1107 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
1101
      </xslo:if>
1101
      </xslo:if>
1102
    </xslo:for-each>
1102
    </xslo:for-each>
1103
    <xslo:for-each select="marc:subfield">
1103
    <xslo:for-each select="marc:subfield">
1104
      <xslo:if test="contains('9', @code)">
1104
      <xslo:if test="contains('0', @code)">
1105
        <z:index name="Koha-Auth-Number:w">
1105
        <z:index name="Koha-Auth-Number:w">
1106
          <xslo:value-of select="."/>
1106
          <xslo:value-of select="."/>
1107
        </z:index>
1107
        </z:index>
Lines 1138-1144 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
1138
      </xslo:if>
1138
      </xslo:if>
1139
    </xslo:for-each>
1139
    </xslo:for-each>
1140
    <xslo:for-each select="marc:subfield">
1140
    <xslo:for-each select="marc:subfield">
1141
      <xslo:if test="contains('9', @code)">
1141
      <xslo:if test="contains('0', @code)">
1142
        <z:index name="Koha-Auth-Number:w">
1142
        <z:index name="Koha-Auth-Number:w">
1143
          <xslo:value-of select="."/>
1143
          <xslo:value-of select="."/>
1144
        </z:index>
1144
        </z:index>
Lines 1154-1160 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
1154
      </xslo:if>
1154
      </xslo:if>
1155
    </xslo:for-each>
1155
    </xslo:for-each>
1156
    <xslo:for-each select="marc:subfield">
1156
    <xslo:for-each select="marc:subfield">
1157
      <xslo:if test="contains('9', @code)">
1157
      <xslo:if test="contains('0', @code)">
1158
        <z:index name="Koha-Auth-Number:w">
1158
        <z:index name="Koha-Auth-Number:w">
1159
          <xslo:value-of select="."/>
1159
          <xslo:value-of select="."/>
1160
        </z:index>
1160
        </z:index>
Lines 1184-1190 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
1184
      </xslo:if>
1184
      </xslo:if>
1185
    </xslo:for-each>
1185
    </xslo:for-each>
1186
    <xslo:for-each select="marc:subfield">
1186
    <xslo:for-each select="marc:subfield">
1187
      <xslo:if test="contains('9', @code)">
1187
      <xslo:if test="contains('0', @code)">
1188
        <z:index name="Koha-Auth-Number:w">
1188
        <z:index name="Koha-Auth-Number:w">
1189
          <xslo:value-of select="."/>
1189
          <xslo:value-of select="."/>
1190
        </z:index>
1190
        </z:index>
Lines 1193-1199 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
1193
  </xslo:template>
1193
  </xslo:template>
1194
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='896']">
1194
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='896']">
1195
    <xslo:for-each select="marc:subfield">
1195
    <xslo:for-each select="marc:subfield">
1196
      <xslo:if test="contains('9', @code)">
1196
      <xslo:if test="contains('0', @code)">
1197
        <z:index name="Koha-Auth-Number:w">
1197
        <z:index name="Koha-Auth-Number:w">
1198
          <xslo:value-of select="."/>
1198
          <xslo:value-of select="."/>
1199
        </z:index>
1199
        </z:index>
Lines 1202-1208 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
1202
  </xslo:template>
1202
  </xslo:template>
1203
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='897']">
1203
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='897']">
1204
    <xslo:for-each select="marc:subfield">
1204
    <xslo:for-each select="marc:subfield">
1205
      <xslo:if test="contains('9', @code)">
1205
      <xslo:if test="contains('0', @code)">
1206
        <z:index name="Koha-Auth-Number:w">
1206
        <z:index name="Koha-Auth-Number:w">
1207
          <xslo:value-of select="."/>
1207
          <xslo:value-of select="."/>
1208
        </z:index>
1208
        </z:index>
Lines 1211-1217 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
1211
  </xslo:template>
1211
  </xslo:template>
1212
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='898']">
1212
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='898']">
1213
    <xslo:for-each select="marc:subfield">
1213
    <xslo:for-each select="marc:subfield">
1214
      <xslo:if test="contains('9', @code)">
1214
      <xslo:if test="contains('0', @code)">
1215
        <z:index name="Koha-Auth-Number:w">
1215
        <z:index name="Koha-Auth-Number:w">
1216
          <xslo:value-of select="."/>
1216
          <xslo:value-of select="."/>
1217
        </z:index>
1217
        </z:index>
Lines 1220-1226 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
1220
  </xslo:template>
1220
  </xslo:template>
1221
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='899']">
1221
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='899']">
1222
    <xslo:for-each select="marc:subfield">
1222
    <xslo:for-each select="marc:subfield">
1223
      <xslo:if test="contains('9', @code)">
1223
      <xslo:if test="contains('0', @code)">
1224
        <z:index name="Koha-Auth-Number:w">
1224
        <z:index name="Koha-Auth-Number:w">
1225
          <xslo:value-of select="."/>
1225
          <xslo:value-of select="."/>
1226
        </z:index>
1226
        </z:index>
(-)a/etc/zebradb/marc_defs/normarc/biblios/biblio-koha-indexdefs.xml (-59 / +59 lines)
Lines 163-170 Link Here
163
    <target_index>Dewey-classification:w</target_index>
163
    <target_index>Dewey-classification:w</target_index>
164
    <target_index>Dewey-classification:s</target_index>
164
    <target_index>Dewey-classification:s</target_index>
165
  </index_data_field>
165
  </index_data_field>
166
  <!--record.abs line 113: melm 100$9      Cross-Reference:w,Koha-Auth-Number-->
166
  <!--record.abs line 113: melm 100$0      Cross-Reference:w,Koha-Auth-Number-->
167
  <index_subfields tag="100" subfields="9">
167
  <index_subfields tag="100" subfields="0">
168
    <target_index>Cross-Reference:w</target_index>
168
    <target_index>Cross-Reference:w</target_index>
169
    <target_index>Koha-Auth-Number:w</target_index>
169
    <target_index>Koha-Auth-Number:w</target_index>
170
  </index_subfields>
170
  </index_subfields>
Lines 187-194 Link Here
187
    <target_index>Name-and-title:w</target_index>
187
    <target_index>Name-and-title:w</target_index>
188
    <target_index>Personal-name:w</target_index>
188
    <target_index>Personal-name:w</target_index>
189
  </index_data_field>
189
  </index_data_field>
190
  <!--record.abs line 116: melm 110$9      Koha-Auth-Number-->
190
  <!--record.abs line 116: melm 110$0      Koha-Auth-Number-->
191
  <index_subfields tag="110" subfields="9">
191
  <index_subfields tag="110" subfields="0">
192
    <target_index>Koha-Auth-Number:w</target_index>
192
    <target_index>Koha-Auth-Number:w</target_index>
193
  </index_subfields>
193
  </index_subfields>
194
  <!--record.abs line 117: melm 110        Author,Author-title,Author-name-corporate,Name,Name-and-title,Corporate-name-->
194
  <!--record.abs line 117: melm 110        Author,Author-title,Author-name-corporate,Name,Name-and-title,Corporate-name-->
Lines 200-207 Link Here
200
    <target_index>Name-and-title:w</target_index>
200
    <target_index>Name-and-title:w</target_index>
201
    <target_index>Corporate-name:w</target_index>
201
    <target_index>Corporate-name:w</target_index>
202
  </index_data_field>
202
  </index_data_field>
203
  <!--record.abs line 118: melm 111$9      Koha-Auth-Number-->
203
  <!--record.abs line 118: melm 111$0      Koha-Auth-Number-->
204
  <index_subfields tag="111" subfields="9">
204
  <index_subfields tag="111" subfields="0">
205
    <target_index>Koha-Auth-Number:w</target_index>
205
    <target_index>Koha-Auth-Number:w</target_index>
206
  </index_subfields>
206
  </index_subfields>
207
  <!--record.abs line 119: melm 111        Author,Author-title,Author-name-corporate,Name,Name-and-title,Conference-name-->
207
  <!--record.abs line 119: melm 111        Author,Author-title,Author-name-corporate,Name,Name-and-title,Conference-name-->
Lines 225-232 Link Here
225
  <index_subfields tag="130" subfields="r">
225
  <index_subfields tag="130" subfields="r">
226
    <target_index>Music-key:w</target_index>
226
    <target_index>Music-key:w</target_index>
227
  </index_subfields>
227
  </index_subfields>
228
  <!--record.abs line 123: melm 130$9      Koha-Auth-Number-->
228
  <!--record.abs line 123: melm 130$0      Koha-Auth-Number-->
229
  <index_subfields tag="130" subfields="9">
229
  <index_subfields tag="130" subfields="0">
230
    <target_index>Koha-Auth-Number:w</target_index>
230
    <target_index>Koha-Auth-Number:w</target_index>
231
  </index_subfields>
231
  </index_subfields>
232
  <!--record.abs line 124: melm 130        Title,Title-uniform-->
232
  <!--record.abs line 124: melm 130        Title,Title-uniform-->
Lines 278-285 Link Here
278
    <target_index>Author-in-order:p</target_index>
278
    <target_index>Author-in-order:p</target_index>
279
    <target_index>Author-in-order:s</target_index>
279
    <target_index>Author-in-order:s</target_index>
280
  </index_subfields>
280
  </index_subfields>
281
  <!--record.abs line 140: melm 245$9      Cross-Reference:w,Koha-Auth-Number-->
281
  <!--record.abs line 140: melm 245$0      Cross-Reference:w,Koha-Auth-Number-->
282
  <index_subfields tag="245" subfields="9">
282
  <index_subfields tag="245" subfields="0">
283
    <target_index>Cross-Reference:w</target_index>
283
    <target_index>Cross-Reference:w</target_index>
284
    <target_index>Koha-Auth-Number:w</target_index>
284
    <target_index>Koha-Auth-Number:w</target_index>
285
  </index_subfields>
285
  </index_subfields>
Lines 325-332 Link Here
325
    <target_index>Title-series:w</target_index>
325
    <target_index>Title-series:w</target_index>
326
    <target_index>Title-series:p</target_index>
326
    <target_index>Title-series:p</target_index>
327
  </index_subfields>
327
  </index_subfields>
328
  <!--record.abs line 165: melm 440$9      Koha-Auth-Number-->
328
  <!--record.abs line 165: melm 440$0      Koha-Auth-Number-->
329
  <index_subfields tag="440" subfields="9">
329
  <index_subfields tag="440" subfields="0">
330
    <target_index>Koha-Auth-Number:w</target_index>
330
    <target_index>Koha-Auth-Number:w</target_index>
331
  </index_subfields>
331
  </index_subfields>
332
  <!--record.abs line 166: melm 440        Title-series:w,Title-series:p,Title,Title-series-->
332
  <!--record.abs line 166: melm 440        Title-series:w,Title-series:p,Title,Title-series-->
Lines 346-353 Link Here
346
    <target_index>Title:w</target_index>
346
    <target_index>Title:w</target_index>
347
    <target_index>Title-series:w</target_index>
347
    <target_index>Title-series:w</target_index>
348
  </index_data_field>
348
  </index_data_field>
349
  <!--record.abs line 169: melm 490$9      Koha-Auth-Number-->
349
  <!--record.abs line 169: melm 490$0      Koha-Auth-Number-->
350
  <index_subfields tag="490" subfields="9">
350
  <index_subfields tag="490" subfields="0">
351
    <target_index>Koha-Auth-Number:w</target_index>
351
    <target_index>Koha-Auth-Number:w</target_index>
352
  </index_subfields>
352
  </index_subfields>
353
  <!--record.abs line 171: melm 502        Material-type-->
353
  <!--record.abs line 171: melm 502        Material-type-->
Lines 384-391 Link Here
384
    <target_index>Subject:w</target_index>
384
    <target_index>Subject:w</target_index>
385
    <target_index>Subject:p</target_index>
385
    <target_index>Subject:p</target_index>
386
  </index_subfields>
386
  </index_subfields>
387
  <!--record.abs line 182: melm 600$9      Koha-Auth-Number-->
387
  <!--record.abs line 182: melm 600$0      Koha-Auth-Number-->
388
  <index_subfields tag="600" subfields="9">
388
  <index_subfields tag="600" subfields="0">
389
    <target_index>Koha-Auth-Number:w</target_index>
389
    <target_index>Koha-Auth-Number:w</target_index>
390
  </index_subfields>
390
  </index_subfields>
391
  <!--record.abs line 184: melm 600        Name,Personal-name,Subject-name-personal,Subject,Subject:p-->
391
  <!--record.abs line 184: melm 600        Name,Personal-name,Subject-name-personal,Subject,Subject:p-->
Lines 409-416 Link Here
409
    <target_index>Subject:w</target_index>
409
    <target_index>Subject:w</target_index>
410
    <target_index>Subject:p</target_index>
410
    <target_index>Subject:p</target_index>
411
  </index_subfields>
411
  </index_subfields>
412
  <!--record.abs line 187: melm 610$9      Koha-Auth-Number-->
412
  <!--record.abs line 187: melm 610$0      Koha-Auth-Number-->
413
  <index_subfields tag="610" subfields="9">
413
  <index_subfields tag="610" subfields="0">
414
    <target_index>Koha-Auth-Number:w</target_index>
414
    <target_index>Koha-Auth-Number:w</target_index>
415
  </index_subfields>
415
  </index_subfields>
416
  <!--record.abs line 188: melm 610        Name,Subject,Corporate-name,Subject,Subject:p-->
416
  <!--record.abs line 188: melm 610        Name,Subject,Corporate-name,Subject,Subject:p-->
Lines 440-447 Link Here
440
    <target_index>Subject:w</target_index>
440
    <target_index>Subject:w</target_index>
441
    <target_index>Subject:p</target_index>
441
    <target_index>Subject:p</target_index>
442
  </index_subfields>
442
  </index_subfields>
443
  <!--record.abs line 192: melm 611$9      Koha-Auth-Number-->
443
  <!--record.abs line 192: melm 611$0      Koha-Auth-Number-->
444
  <index_subfields tag="611" subfields="9">
444
  <index_subfields tag="611" subfields="0">
445
    <target_index>Koha-Auth-Number:w</target_index>
445
    <target_index>Koha-Auth-Number:w</target_index>
446
  </index_subfields>
446
  </index_subfields>
447
  <!--record.abs line 193: melm 611        Name,Subject,Subject:p-->
447
  <!--record.abs line 193: melm 611        Name,Subject,Subject:p-->
Lines 468-475 Link Here
468
    <target_index>Subject:w</target_index>
468
    <target_index>Subject:w</target_index>
469
    <target_index>Subject:p</target_index>
469
    <target_index>Subject:p</target_index>
470
  </index_subfields>
470
  </index_subfields>
471
  <!--record.abs line 197: melm 630$9      Koha-Auth-Number-->
471
  <!--record.abs line 197: melm 630$0      Koha-Auth-Number-->
472
  <index_subfields tag="630" subfields="9">
472
  <index_subfields tag="630" subfields="0">
473
    <target_index>Koha-Auth-Number:w</target_index>
473
    <target_index>Koha-Auth-Number:w</target_index>
474
  </index_subfields>
474
  </index_subfields>
475
  <!--record.abs line 198: melm 630        Subject,Subject:p-->
475
  <!--record.abs line 198: melm 630        Subject,Subject:p-->
Lines 477-487 Link Here
477
    <target_index>Subject:w</target_index>
477
    <target_index>Subject:w</target_index>
478
    <target_index>Subject:p</target_index>
478
    <target_index>Subject:p</target_index>
479
  </index_data_field>
479
  </index_data_field>
480
  <index_subfields tag="648" subfields="9">
480
  <index_subfields tag="648" subfields="0">
481
    <target_index>Koha-Auth-Number:w</target_index>
481
    <target_index>Koha-Auth-Number:w</target_index>
482
  </index_subfields>
482
  </index_subfields>
483
  <!--record.abs line 199: melm 650$9      Koha-Auth-Number-->
483
  <!--record.abs line 199: melm 650$0      Koha-Auth-Number-->
484
  <index_subfields tag="650" subfields="9">
484
  <index_subfields tag="650" subfields="0">
485
    <target_index>Koha-Auth-Number:w</target_index>
485
    <target_index>Koha-Auth-Number:w</target_index>
486
  </index_subfields>
486
  </index_subfields>
487
  <!--record.abs line 200: melm 650        Subject,Subject:p-->
487
  <!--record.abs line 200: melm 650        Subject,Subject:p-->
Lines 489-496 Link Here
489
    <target_index>Subject:w</target_index>
489
    <target_index>Subject:w</target_index>
490
    <target_index>Subject:p</target_index>
490
    <target_index>Subject:p</target_index>
491
  </index_data_field>
491
  </index_data_field>
492
  <!--record.abs line 201: melm 651$9      Koha-Auth-Number-->
492
  <!--record.abs line 201: melm 651$0      Koha-Auth-Number-->
493
  <index_subfields tag="651" subfields="9">
493
  <index_subfields tag="651" subfields="0">
494
    <target_index>Koha-Auth-Number:w</target_index>
494
    <target_index>Koha-Auth-Number:w</target_index>
495
  </index_subfields>
495
  </index_subfields>
496
  <!--record.abs line 202: melm 651        Name-geographic,Subject,Subject:p-->
496
  <!--record.abs line 202: melm 651        Name-geographic,Subject,Subject:p-->
Lines 499-510 Link Here
499
    <target_index>Subject:w</target_index>
499
    <target_index>Subject:w</target_index>
500
    <target_index>Subject:p</target_index>
500
    <target_index>Subject:p</target_index>
501
  </index_data_field>
501
  </index_data_field>
502
  <!--record.abs line 203: melm 652$9      Koha-Auth-Number-->
502
  <!--record.abs line 203: melm 652$0      Koha-Auth-Number-->
503
  <index_subfields tag="652" subfields="9">
503
  <index_subfields tag="652" subfields="0">
504
    <target_index>Koha-Auth-Number:w</target_index>
504
    <target_index>Koha-Auth-Number:w</target_index>
505
  </index_subfields>
505
  </index_subfields>
506
  <!--record.abs line 205: melm 653$9      Koha-Auth-Number-->
506
  <!--record.abs line 205: melm 653$0      Koha-Auth-Number-->
507
  <index_subfields tag="653" subfields="9">
507
  <index_subfields tag="653" subfields="0">
508
    <target_index>Koha-Auth-Number:w</target_index>
508
    <target_index>Koha-Auth-Number:w</target_index>
509
  </index_subfields>
509
  </index_subfields>
510
  <!--record.abs line 206: melm 653        Subject,Subject:p-->
510
  <!--record.abs line 206: melm 653        Subject,Subject:p-->
Lines 512-519 Link Here
512
    <target_index>Subject:w</target_index>
512
    <target_index>Subject:w</target_index>
513
    <target_index>Subject:p</target_index>
513
    <target_index>Subject:p</target_index>
514
  </index_data_field>
514
  </index_data_field>
515
  <!--record.abs line 207: melm 654$9      Koha-Auth-Number-->
515
  <!--record.abs line 207: melm 654$0      Koha-Auth-Number-->
516
  <index_subfields tag="654" subfields="9">
516
  <index_subfields tag="654" subfields="0">
517
    <target_index>Koha-Auth-Number:w</target_index>
517
    <target_index>Koha-Auth-Number:w</target_index>
518
  </index_subfields>
518
  </index_subfields>
519
  <!--record.abs line 208: melm 654        Subject,Subject:p-->
519
  <!--record.abs line 208: melm 654        Subject,Subject:p-->
Lines 521-528 Link Here
521
    <target_index>Subject:w</target_index>
521
    <target_index>Subject:w</target_index>
522
    <target_index>Subject:p</target_index>
522
    <target_index>Subject:p</target_index>
523
  </index_data_field>
523
  </index_data_field>
524
  <!--record.abs line 209: melm 655$9      Koha-Auth-Number-->
524
  <!--record.abs line 209: melm 655$0      Koha-Auth-Number-->
525
  <index_subfields tag="655" subfields="9">
525
  <index_subfields tag="655" subfields="0">
526
    <target_index>Koha-Auth-Number:w</target_index>
526
    <target_index>Koha-Auth-Number:w</target_index>
527
  </index_subfields>
527
  </index_subfields>
528
  <!--record.abs line 210: melm 655        Subject,Subject:p-->
528
  <!--record.abs line 210: melm 655        Subject,Subject:p-->
Lines 530-537 Link Here
530
    <target_index>Subject:w</target_index>
530
    <target_index>Subject:w</target_index>
531
    <target_index>Subject:p</target_index>
531
    <target_index>Subject:p</target_index>
532
  </index_data_field>
532
  </index_data_field>
533
  <!--record.abs line 211: melm 656$9      Koha-Auth-Number-->
533
  <!--record.abs line 211: melm 656$0      Koha-Auth-Number-->
534
  <index_subfields tag="656" subfields="9">
534
  <index_subfields tag="656" subfields="0">
535
    <target_index>Koha-Auth-Number:w</target_index>
535
    <target_index>Koha-Auth-Number:w</target_index>
536
  </index_subfields>
536
  </index_subfields>
537
  <!--record.abs line 212: melm 656        Subject,Subject:p-->
537
  <!--record.abs line 212: melm 656        Subject,Subject:p-->
Lines 539-546 Link Here
539
    <target_index>Subject:w</target_index>
539
    <target_index>Subject:w</target_index>
540
    <target_index>Subject:p</target_index>
540
    <target_index>Subject:p</target_index>
541
  </index_data_field>
541
  </index_data_field>
542
  <!--record.abs line 213: melm 657$9      Koha-Auth-Number-->
542
  <!--record.abs line 213: melm 657$0      Koha-Auth-Number-->
543
  <index_subfields tag="657" subfields="9">
543
  <index_subfields tag="657" subfields="0">
544
    <target_index>Koha-Auth-Number:w</target_index>
544
    <target_index>Koha-Auth-Number:w</target_index>
545
  </index_subfields>
545
  </index_subfields>
546
  <!--record.abs line 214: melm 657        Subject,Subject:p-->
546
  <!--record.abs line 214: melm 657        Subject,Subject:p-->
Lines 548-555 Link Here
548
    <target_index>Subject:w</target_index>
548
    <target_index>Subject:w</target_index>
549
    <target_index>Subject:p</target_index>
549
    <target_index>Subject:p</target_index>
550
  </index_data_field>
550
  </index_data_field>
551
  <!--record.abs line 215: melm 690$9      Koha-Auth-Number-->
551
  <!--record.abs line 215: melm 690$0      Koha-Auth-Number-->
552
  <index_subfields tag="690" subfields="9">
552
  <index_subfields tag="690" subfields="0">
553
    <target_index>Koha-Auth-Number:w</target_index>
553
    <target_index>Koha-Auth-Number:w</target_index>
554
  </index_subfields>
554
  </index_subfields>
555
  <!--record.abs line 216: melm 690        Subject,Subject:p-->
555
  <!--record.abs line 216: melm 690        Subject,Subject:p-->
Lines 557-564 Link Here
557
    <target_index>Subject:w</target_index>
557
    <target_index>Subject:w</target_index>
558
    <target_index>Subject:p</target_index>
558
    <target_index>Subject:p</target_index>
559
  </index_data_field>
559
  </index_data_field>
560
  <!--record.abs line 218: melm 700$9      Cross-Reference,Koha-Auth-Number-->
560
  <!--record.abs line 218: melm 700$0      Cross-Reference,Koha-Auth-Number-->
561
  <index_subfields tag="700" subfields="9">
561
  <index_subfields tag="700" subfields="0">
562
    <target_index>Cross-Reference:w</target_index>
562
    <target_index>Cross-Reference:w</target_index>
563
    <target_index>Koha-Auth-Number:w</target_index>
563
    <target_index>Koha-Auth-Number:w</target_index>
564
  </index_subfields>
564
  </index_subfields>
Lines 615-622 Link Here
615
  <index_subfields tag="710" subfields="i">
615
  <index_subfields tag="710" subfields="i">
616
    <target_index>Thematic-number:w</target_index>
616
    <target_index>Thematic-number:w</target_index>
617
  </index_subfields>
617
  </index_subfields>
618
  <!--record.abs line 232: melm 710$9      Koha-Auth-Number-->
618
  <!--record.abs line 232: melm 710$0      Koha-Auth-Number-->
619
  <index_subfields tag="710" subfields="9">
619
  <index_subfields tag="710" subfields="0">
620
    <target_index>Koha-Auth-Number:w</target_index>
620
    <target_index>Koha-Auth-Number:w</target_index>
621
  </index_subfields>
621
  </index_subfields>
622
  <!--record.abs line 234: melm 710        Author,Name-->
622
  <!--record.abs line 234: melm 710        Author,Name-->
Lines 634-641 Link Here
634
    <target_index>Title:w</target_index>
634
    <target_index>Title:w</target_index>
635
    <target_index>Title-uniform:w</target_index>
635
    <target_index>Title-uniform:w</target_index>
636
  </index_subfields>
636
  </index_subfields>
637
  <!--record.abs line 238: melm 711$9      Koha-Auth-Number-->
637
  <!--record.abs line 238: melm 711$0      Koha-Auth-Number-->
638
  <index_subfields tag="711" subfields="9">
638
  <index_subfields tag="711" subfields="0">
639
    <target_index>Koha-Auth-Number:w</target_index>
639
    <target_index>Koha-Auth-Number:w</target_index>
640
  </index_subfields>
640
  </index_subfields>
641
  <!--record.abs line 240: melm 711        Author-name-corporate,Name,Conference-name-->
641
  <!--record.abs line 240: melm 711        Author-name-corporate,Name,Conference-name-->
Lines 656-663 Link Here
656
  <index_subfields tag="730" subfields="r">
656
  <index_subfields tag="730" subfields="r">
657
    <target_index>Music-key:w</target_index>
657
    <target_index>Music-key:w</target_index>
658
  </index_subfields>
658
  </index_subfields>
659
  <!--record.abs line 244: melm 730$9      Koha-Auth-Number-->
659
  <!--record.abs line 244: melm 730$0      Koha-Auth-Number-->
660
  <index_subfields tag="730" subfields="9">
660
  <index_subfields tag="730" subfields="0">
661
    <target_index>Koha-Auth-Number:w</target_index>
661
    <target_index>Koha-Auth-Number:w</target_index>
662
  </index_subfields>
662
  </index_subfields>
663
  <!--record.abs line 245: melm 730        Title,Title-uniform-->
663
  <!--record.abs line 245: melm 730        Title,Title-uniform-->
Lines 674-681 Link Here
674
  <index_subfields tag="773" subfields="a">
674
  <index_subfields tag="773" subfields="a">
675
    <target_index>Host-item:w</target_index>
675
    <target_index>Host-item:w</target_index>
676
  </index_subfields>
676
  </index_subfields>
677
  <!--record.abs line 248: melm 773$9	    Host-Item-Number-->
677
  <!--record.abs line 248: melm 773$0	    Host-Item-Number-->
678
  <index_subfields tag="773" subfields="9">
678
  <index_subfields tag="773" subfields="0">
679
    <target_index>Host-Item-Number:w</target_index>
679
    <target_index>Host-Item-Number:w</target_index>
680
  </index_subfields>
680
  </index_subfields>
681
  <!--record.abs line 249: melm 773$t      Host-item-->
681
  <!--record.abs line 249: melm 773$t      Host-item-->
Lines 711-718 Link Here
711
    <target_index>Title:w</target_index>
711
    <target_index>Title:w</target_index>
712
    <target_index>Title-series:w</target_index>
712
    <target_index>Title-series:w</target_index>
713
  </index_subfields>
713
  </index_subfields>
714
  <!--record.abs line 258: melm 800$9      Koha-Auth-Number-->
714
  <!--record.abs line 258: melm 800$0      Koha-Auth-Number-->
715
  <index_subfields tag="800" subfields="9">
715
  <index_subfields tag="800" subfields="0">
716
    <target_index>Koha-Auth-Number:w</target_index>
716
    <target_index>Koha-Auth-Number:w</target_index>
717
  </index_subfields>
717
  </index_subfields>
718
  <!--record.abs line 259: melm 800        Author,Author-name-personal,Name,Personal-name-->
718
  <!--record.abs line 259: melm 800        Author,Author-name-personal,Name,Personal-name-->
Lines 733-740 Link Here
733
    <target_index>Title:w</target_index>
733
    <target_index>Title:w</target_index>
734
    <target_index>Title-series:w</target_index>
734
    <target_index>Title-series:w</target_index>
735
  </index_subfields>
735
  </index_subfields>
736
  <!--record.abs line 262: melm 810$9      Koha-Auth-Number-->
736
  <!--record.abs line 262: melm 810$0      Koha-Auth-Number-->
737
  <index_subfields tag="810" subfields="9">
737
  <index_subfields tag="810" subfields="0">
738
    <target_index>Koha-Auth-Number:w</target_index>
738
    <target_index>Koha-Auth-Number:w</target_index>
739
  </index_subfields>
739
  </index_subfields>
740
  <!--record.abs line 263: melm 810        Author,Corporate-name,Author-name-corporate,Name-->
740
  <!--record.abs line 263: melm 810        Author,Corporate-name,Author-name-corporate,Name-->
Lines 748-755 Link Here
748
  <index_subfields tag="811" subfields="a">
748
  <index_subfields tag="811" subfields="a">
749
    <target_index>Name-and-title:w</target_index>
749
    <target_index>Name-and-title:w</target_index>
750
  </index_subfields>
750
  </index_subfields>
751
  <!--record.abs line 265: melm 811$9      Koha-Auth-Number-->
751
  <!--record.abs line 265: melm 811$0      Koha-Auth-Number-->
752
  <index_subfields tag="811" subfields="9">
752
  <index_subfields tag="811" subfields="0">
753
    <target_index>Koha-Auth-Number:w</target_index>
753
    <target_index>Koha-Auth-Number:w</target_index>
754
  </index_subfields>
754
  </index_subfields>
755
  <!--record.abs line 267: melm 811$t      Author-title,Name-and-title,Title,Title-series-->
755
  <!--record.abs line 267: melm 811$t      Author-title,Name-and-title,Title,Title-series-->
Lines 766-773 Link Here
766
    <target_index>Name:w</target_index>
766
    <target_index>Name:w</target_index>
767
    <target_index>Conference-name:w</target_index>
767
    <target_index>Conference-name:w</target_index>
768
  </index_data_field>
768
  </index_data_field>
769
  <!--record.abs line 269: melm 830$9      Koha-Auth-Number-->
769
  <!--record.abs line 269: melm 830$0      Koha-Auth-Number-->
770
  <index_subfields tag="830" subfields="9">
770
  <index_subfields tag="830" subfields="0">
771
    <target_index>Koha-Auth-Number:w</target_index>
771
    <target_index>Koha-Auth-Number:w</target_index>
772
  </index_subfields>
772
  </index_subfields>
773
  <!--record.abs line 270: melm 830        Title,Title-series-->
773
  <!--record.abs line 270: melm 830        Title,Title-series-->
(-)a/etc/zebradb/marc_defs/normarc/biblios/biblio-zebra-indexdefs.xsl (-29 / +29 lines)
Lines 149-155 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
149
  </xslo:template>
149
  </xslo:template>
150
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='100']">
150
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='100']">
151
    <xslo:for-each select="marc:subfield">
151
    <xslo:for-each select="marc:subfield">
152
      <xslo:if test="contains('9', @code)">
152
      <xslo:if test="contains('0', @code)">
153
        <z:index name="Cross-Reference:w Koha-Auth-Number:w">
153
        <z:index name="Cross-Reference:w Koha-Auth-Number:w">
154
          <xslo:value-of select="."/>
154
          <xslo:value-of select="."/>
155
        </z:index>
155
        </z:index>
Lines 165-171 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
165
  </xslo:template>
165
  </xslo:template>
166
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='110']">
166
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='110']">
167
    <xslo:for-each select="marc:subfield">
167
    <xslo:for-each select="marc:subfield">
168
      <xslo:if test="contains('9', @code)">
168
      <xslo:if test="contains('0', @code)">
169
        <z:index name="Koha-Auth-Number:w">
169
        <z:index name="Koha-Auth-Number:w">
170
          <xslo:value-of select="."/>
170
          <xslo:value-of select="."/>
171
        </z:index>
171
        </z:index>
Lines 174-180 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
174
  </xslo:template>
174
  </xslo:template>
175
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='111']">
175
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='111']">
176
    <xslo:for-each select="marc:subfield">
176
    <xslo:for-each select="marc:subfield">
177
      <xslo:if test="contains('9', @code)">
177
      <xslo:if test="contains('0', @code)">
178
        <z:index name="Koha-Auth-Number:w">
178
        <z:index name="Koha-Auth-Number:w">
179
          <xslo:value-of select="."/>
179
          <xslo:value-of select="."/>
180
        </z:index>
180
        </z:index>
Lines 204-210 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
204
      </xslo:if>
204
      </xslo:if>
205
    </xslo:for-each>
205
    </xslo:for-each>
206
    <xslo:for-each select="marc:subfield">
206
    <xslo:for-each select="marc:subfield">
207
      <xslo:if test="contains('9', @code)">
207
      <xslo:if test="contains('0', @code)">
208
        <z:index name="Koha-Auth-Number:w">
208
        <z:index name="Koha-Auth-Number:w">
209
          <xslo:value-of select="."/>
209
          <xslo:value-of select="."/>
210
        </z:index>
210
        </z:index>
Lines 250-256 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
250
      </xslo:if>
250
      </xslo:if>
251
    </xslo:for-each>
251
    </xslo:for-each>
252
    <xslo:for-each select="marc:subfield">
252
    <xslo:for-each select="marc:subfield">
253
      <xslo:if test="contains('9', @code)">
253
      <xslo:if test="contains('0', @code)">
254
        <z:index name="Cross-Reference:w Koha-Auth-Number:w">
254
        <z:index name="Cross-Reference:w Koha-Auth-Number:w">
255
          <xslo:value-of select="."/>
255
          <xslo:value-of select="."/>
256
        </z:index>
256
        </z:index>
Lines 289-295 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
289
      </xslo:if>
289
      </xslo:if>
290
    </xslo:for-each>
290
    </xslo:for-each>
291
    <xslo:for-each select="marc:subfield">
291
    <xslo:for-each select="marc:subfield">
292
      <xslo:if test="contains('9', @code)">
292
      <xslo:if test="contains('0', @code)">
293
        <z:index name="Koha-Auth-Number:w">
293
        <z:index name="Koha-Auth-Number:w">
294
          <xslo:value-of select="."/>
294
          <xslo:value-of select="."/>
295
        </z:index>
295
        </z:index>
Lines 305-311 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
305
      </xslo:if>
305
      </xslo:if>
306
    </xslo:for-each>
306
    </xslo:for-each>
307
    <xslo:for-each select="marc:subfield">
307
    <xslo:for-each select="marc:subfield">
308
      <xslo:if test="contains('9', @code)">
308
      <xslo:if test="contains('0', @code)">
309
        <z:index name="Koha-Auth-Number:w">
309
        <z:index name="Koha-Auth-Number:w">
310
          <xslo:value-of select="."/>
310
          <xslo:value-of select="."/>
311
        </z:index>
311
        </z:index>
Lines 328-334 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
328
      </xslo:if>
328
      </xslo:if>
329
    </xslo:for-each>
329
    </xslo:for-each>
330
    <xslo:for-each select="marc:subfield">
330
    <xslo:for-each select="marc:subfield">
331
      <xslo:if test="contains('9', @code)">
331
      <xslo:if test="contains('0', @code)">
332
        <z:index name="Koha-Auth-Number:w">
332
        <z:index name="Koha-Auth-Number:w">
333
          <xslo:value-of select="."/>
333
          <xslo:value-of select="."/>
334
        </z:index>
334
        </z:index>
Lines 351-357 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
351
      </xslo:if>
351
      </xslo:if>
352
    </xslo:for-each>
352
    </xslo:for-each>
353
    <xslo:for-each select="marc:subfield">
353
    <xslo:for-each select="marc:subfield">
354
      <xslo:if test="contains('9', @code)">
354
      <xslo:if test="contains('0', @code)">
355
        <z:index name="Koha-Auth-Number:w">
355
        <z:index name="Koha-Auth-Number:w">
356
          <xslo:value-of select="."/>
356
          <xslo:value-of select="."/>
357
        </z:index>
357
        </z:index>
Lines 374-380 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
374
      </xslo:if>
374
      </xslo:if>
375
    </xslo:for-each>
375
    </xslo:for-each>
376
    <xslo:for-each select="marc:subfield">
376
    <xslo:for-each select="marc:subfield">
377
      <xslo:if test="contains('9', @code)">
377
      <xslo:if test="contains('0', @code)">
378
        <z:index name="Koha-Auth-Number:w">
378
        <z:index name="Koha-Auth-Number:w">
379
          <xslo:value-of select="."/>
379
          <xslo:value-of select="."/>
380
        </z:index>
380
        </z:index>
Lines 404-410 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
404
      </xslo:if>
404
      </xslo:if>
405
    </xslo:for-each>
405
    </xslo:for-each>
406
    <xslo:for-each select="marc:subfield">
406
    <xslo:for-each select="marc:subfield">
407
      <xslo:if test="contains('9', @code)">
407
      <xslo:if test="contains('0', @code)">
408
        <z:index name="Koha-Auth-Number:w">
408
        <z:index name="Koha-Auth-Number:w">
409
          <xslo:value-of select="."/>
409
          <xslo:value-of select="."/>
410
        </z:index>
410
        </z:index>
Lines 413-419 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
413
  </xslo:template>
413
  </xslo:template>
414
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='648']">
414
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='648']">
415
    <xslo:for-each select="marc:subfield">
415
    <xslo:for-each select="marc:subfield">
416
      <xslo:if test="contains('9', @code)">
416
      <xslo:if test="contains('0', @code)">
417
        <z:index name="Koha-Auth-Number:w">
417
        <z:index name="Koha-Auth-Number:w">
418
          <xslo:value-of select="."/>
418
          <xslo:value-of select="."/>
419
        </z:index>
419
        </z:index>
Lines 422-428 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
422
  </xslo:template>
422
  </xslo:template>
423
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='650']">
423
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='650']">
424
    <xslo:for-each select="marc:subfield">
424
    <xslo:for-each select="marc:subfield">
425
      <xslo:if test="contains('9', @code)">
425
      <xslo:if test="contains('0', @code)">
426
        <z:index name="Koha-Auth-Number:w">
426
        <z:index name="Koha-Auth-Number:w">
427
          <xslo:value-of select="."/>
427
          <xslo:value-of select="."/>
428
        </z:index>
428
        </z:index>
Lines 431-437 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
431
  </xslo:template>
431
  </xslo:template>
432
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='651']">
432
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='651']">
433
    <xslo:for-each select="marc:subfield">
433
    <xslo:for-each select="marc:subfield">
434
      <xslo:if test="contains('9', @code)">
434
      <xslo:if test="contains('0', @code)">
435
        <z:index name="Koha-Auth-Number:w">
435
        <z:index name="Koha-Auth-Number:w">
436
          <xslo:value-of select="."/>
436
          <xslo:value-of select="."/>
437
        </z:index>
437
        </z:index>
Lines 440-446 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
440
  </xslo:template>
440
  </xslo:template>
441
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='652']">
441
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='652']">
442
    <xslo:for-each select="marc:subfield">
442
    <xslo:for-each select="marc:subfield">
443
      <xslo:if test="contains('9', @code)">
443
      <xslo:if test="contains('0', @code)">
444
        <z:index name="Koha-Auth-Number:w">
444
        <z:index name="Koha-Auth-Number:w">
445
          <xslo:value-of select="."/>
445
          <xslo:value-of select="."/>
446
        </z:index>
446
        </z:index>
Lines 449-455 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
449
  </xslo:template>
449
  </xslo:template>
450
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='653']">
450
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='653']">
451
    <xslo:for-each select="marc:subfield">
451
    <xslo:for-each select="marc:subfield">
452
      <xslo:if test="contains('9', @code)">
452
      <xslo:if test="contains('0', @code)">
453
        <z:index name="Koha-Auth-Number:w">
453
        <z:index name="Koha-Auth-Number:w">
454
          <xslo:value-of select="."/>
454
          <xslo:value-of select="."/>
455
        </z:index>
455
        </z:index>
Lines 458-464 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
458
  </xslo:template>
458
  </xslo:template>
459
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='654']">
459
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='654']">
460
    <xslo:for-each select="marc:subfield">
460
    <xslo:for-each select="marc:subfield">
461
      <xslo:if test="contains('9', @code)">
461
      <xslo:if test="contains('0', @code)">
462
        <z:index name="Koha-Auth-Number:w">
462
        <z:index name="Koha-Auth-Number:w">
463
          <xslo:value-of select="."/>
463
          <xslo:value-of select="."/>
464
        </z:index>
464
        </z:index>
Lines 467-473 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
467
  </xslo:template>
467
  </xslo:template>
468
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='655']">
468
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='655']">
469
    <xslo:for-each select="marc:subfield">
469
    <xslo:for-each select="marc:subfield">
470
      <xslo:if test="contains('9', @code)">
470
      <xslo:if test="contains('0', @code)">
471
        <z:index name="Koha-Auth-Number:w">
471
        <z:index name="Koha-Auth-Number:w">
472
          <xslo:value-of select="."/>
472
          <xslo:value-of select="."/>
473
        </z:index>
473
        </z:index>
Lines 476-482 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
476
  </xslo:template>
476
  </xslo:template>
477
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='656']">
477
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='656']">
478
    <xslo:for-each select="marc:subfield">
478
    <xslo:for-each select="marc:subfield">
479
      <xslo:if test="contains('9', @code)">
479
      <xslo:if test="contains('0', @code)">
480
        <z:index name="Koha-Auth-Number:w">
480
        <z:index name="Koha-Auth-Number:w">
481
          <xslo:value-of select="."/>
481
          <xslo:value-of select="."/>
482
        </z:index>
482
        </z:index>
Lines 485-491 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
485
  </xslo:template>
485
  </xslo:template>
486
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='657']">
486
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='657']">
487
    <xslo:for-each select="marc:subfield">
487
    <xslo:for-each select="marc:subfield">
488
      <xslo:if test="contains('9', @code)">
488
      <xslo:if test="contains('0', @code)">
489
        <z:index name="Koha-Auth-Number:w">
489
        <z:index name="Koha-Auth-Number:w">
490
          <xslo:value-of select="."/>
490
          <xslo:value-of select="."/>
491
        </z:index>
491
        </z:index>
Lines 494-500 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
494
  </xslo:template>
494
  </xslo:template>
495
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='690']">
495
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='690']">
496
    <xslo:for-each select="marc:subfield">
496
    <xslo:for-each select="marc:subfield">
497
      <xslo:if test="contains('9', @code)">
497
      <xslo:if test="contains('0', @code)">
498
        <z:index name="Koha-Auth-Number:w">
498
        <z:index name="Koha-Auth-Number:w">
499
          <xslo:value-of select="."/>
499
          <xslo:value-of select="."/>
500
        </z:index>
500
        </z:index>
Lines 503-509 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
503
  </xslo:template>
503
  </xslo:template>
504
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='700']">
504
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='700']">
505
    <xslo:for-each select="marc:subfield">
505
    <xslo:for-each select="marc:subfield">
506
      <xslo:if test="contains('9', @code)">
506
      <xslo:if test="contains('0', @code)">
507
        <z:index name="Cross-Reference:w Koha-Auth-Number:w">
507
        <z:index name="Cross-Reference:w Koha-Auth-Number:w">
508
          <xslo:value-of select="."/>
508
          <xslo:value-of select="."/>
509
        </z:index>
509
        </z:index>
Lines 568-574 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
568
      </xslo:if>
568
      </xslo:if>
569
    </xslo:for-each>
569
    </xslo:for-each>
570
    <xslo:for-each select="marc:subfield">
570
    <xslo:for-each select="marc:subfield">
571
      <xslo:if test="contains('9', @code)">
571
      <xslo:if test="contains('0', @code)">
572
        <z:index name="Koha-Auth-Number:w">
572
        <z:index name="Koha-Auth-Number:w">
573
          <xslo:value-of select="."/>
573
          <xslo:value-of select="."/>
574
        </z:index>
574
        </z:index>
Lines 591-597 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
591
      </xslo:if>
591
      </xslo:if>
592
    </xslo:for-each>
592
    </xslo:for-each>
593
    <xslo:for-each select="marc:subfield">
593
    <xslo:for-each select="marc:subfield">
594
      <xslo:if test="contains('9', @code)">
594
      <xslo:if test="contains('0', @code)">
595
        <z:index name="Koha-Auth-Number:w">
595
        <z:index name="Koha-Auth-Number:w">
596
          <xslo:value-of select="."/>
596
          <xslo:value-of select="."/>
597
        </z:index>
597
        </z:index>
Lines 621-627 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
621
      </xslo:if>
621
      </xslo:if>
622
    </xslo:for-each>
622
    </xslo:for-each>
623
    <xslo:for-each select="marc:subfield">
623
    <xslo:for-each select="marc:subfield">
624
      <xslo:if test="contains('9', @code)">
624
      <xslo:if test="contains('0', @code)">
625
        <z:index name="Koha-Auth-Number:w">
625
        <z:index name="Koha-Auth-Number:w">
626
          <xslo:value-of select="."/>
626
          <xslo:value-of select="."/>
627
        </z:index>
627
        </z:index>
Lines 683-689 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
683
      </xslo:if>
683
      </xslo:if>
684
    </xslo:for-each>
684
    </xslo:for-each>
685
    <xslo:for-each select="marc:subfield">
685
    <xslo:for-each select="marc:subfield">
686
      <xslo:if test="contains('9', @code)">
686
      <xslo:if test="contains('0', @code)">
687
        <z:index name="Koha-Auth-Number:w">
687
        <z:index name="Koha-Auth-Number:w">
688
          <xslo:value-of select="."/>
688
          <xslo:value-of select="."/>
689
        </z:index>
689
        </z:index>
Lines 706-712 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
706
      </xslo:if>
706
      </xslo:if>
707
    </xslo:for-each>
707
    </xslo:for-each>
708
    <xslo:for-each select="marc:subfield">
708
    <xslo:for-each select="marc:subfield">
709
      <xslo:if test="contains('9', @code)">
709
      <xslo:if test="contains('0', @code)">
710
        <z:index name="Koha-Auth-Number:w">
710
        <z:index name="Koha-Auth-Number:w">
711
          <xslo:value-of select="."/>
711
          <xslo:value-of select="."/>
712
        </z:index>
712
        </z:index>
Lines 722-728 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
722
      </xslo:if>
722
      </xslo:if>
723
    </xslo:for-each>
723
    </xslo:for-each>
724
    <xslo:for-each select="marc:subfield">
724
    <xslo:for-each select="marc:subfield">
725
      <xslo:if test="contains('9', @code)">
725
      <xslo:if test="contains('0', @code)">
726
        <z:index name="Koha-Auth-Number:w">
726
        <z:index name="Koha-Auth-Number:w">
727
          <xslo:value-of select="."/>
727
          <xslo:value-of select="."/>
728
        </z:index>
728
        </z:index>
Lines 738-744 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
738
  </xslo:template>
738
  </xslo:template>
739
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='830']">
739
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='830']">
740
    <xslo:for-each select="marc:subfield">
740
    <xslo:for-each select="marc:subfield">
741
      <xslo:if test="contains('9', @code)">
741
      <xslo:if test="contains('0', @code)">
742
        <z:index name="Koha-Auth-Number:w">
742
        <z:index name="Koha-Auth-Number:w">
743
          <xslo:value-of select="."/>
743
          <xslo:value-of select="."/>
744
        </z:index>
744
        </z:index>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/blinddetail-biblio-search.tt (-1 / +2 lines)
Lines 40-45 Link Here
40
                RancorReplaceField( new_line, "[% indicator1 | html %]", "[% indicator2 | html %]" );
40
                RancorReplaceField( new_line, "[% indicator1 | html %]", "[% indicator2 | html %]" );
41
            [% ELSE %]
41
            [% ELSE %]
42
            var index_start = "[% index | html %]";
42
            var index_start = "[% index | html %]";
43
            var authsubfield = "[% authsubfield %]";
43
            var whichfield;
44
            var whichfield;
44
            try {
45
            try {
45
                whichfield = opener.opener.document.getElementById(index_start);
46
                whichfield = opener.opener.document.getElementById(index_start);
Lines 135-141 Link Here
135
                [% IF ( clear ) %]
136
                [% IF ( clear ) %]
136
                    if (subfield){subfield.value="" ;}
137
                    if (subfield){subfield.value="" ;}
137
                [% ELSE %]
138
                [% ELSE %]
138
                    if(code.value=='9'){
139
                    if(code.value==authsubfield){
139
                        subfield.value = "[% authid |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') | html %]";
140
                        subfield.value = "[% authid |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') | html %]";
140
                        break;
141
                        break;
141
                    }
142
                    }
(-)a/misc/maintenance/batchAuthorityLinking.pl (+210 lines)
Line 0 Link Here
1
#!/usr/bin/perl
2
3
#-----------------------------------
4
# Copyright 2019 Koha-Suomi Oy
5
#
6
# This file is part of Koha.
7
#
8
# Koha is free software; you can redistribute it and/or modify it under the
9
# terms of the GNU General Public License as published by the Free Software
10
# Foundation; either version 2 of the License, or (at your option) any later
11
# version.
12
#
13
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
14
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
15
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
16
#
17
# You should have received a copy of the GNU General Public License along
18
# with Koha; if not, write to the Free Software Foundation, Inc.,
19
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20
#-----------------------------------
21
22
use Modern::Perl;
23
use Getopt::Long;
24
25
use C4::Context;
26
use C4::Biblio;
27
use C4::Record;
28
use MARC::Field;
29
30
my ($help, $confirm, $verbose);
31
my $schema = 'MARC21';
32
my $chunks = 500;
33
34
GetOptions(
35
  'h|help'      => \$help,
36
  'v|verbose:i' => \$verbose,
37
  'c|confirm'   => \$confirm,
38
  's|schema:s'  => \$schema,
39
  'chunks:i'    => \$chunks,
40
);
41
42
my $usage = << 'ENDUSAGE';
43
44
Changes authority linking subfield from $9 to $0
45
46
  -h --help      This nice help!
47
48
  -v --verbose   More chatty output.
49
50
  -c --confirm   Confirm that you want to mangle your bibliographic records
51
52
  -s --schema   Select MARC schema, MARC21 or NORMARC. Default is MARC21
53
54
  --chunks       Increase processed chunks
55
56
57
EXAMPLE:
58
59
perl batchAuthorityLinking.pl -v -c
60
perl batchAuthorityLinking.pl -v -c -f NORMARC
61
perl batchAuthorityLinking.pl -v --chunks 1000
62
63
ENDUSAGE
64
65
if ($help) {
66
    print $usage;
67
    exit 0;
68
}
69
70
our $marc21Authorityfields = {
71
    '100' => 1,
72
    '110' => 1,
73
    '111' => 1,
74
    '130' => 1,
75
    '245' => 1,
76
    '400' => 1,
77
    '410' => 1,
78
    '440' => 1,
79
    '490' => 1,
80
    '600' => 1,
81
    '610' => 1,
82
    '611' => 1,
83
    '630' => 1,
84
    '648' => 1,
85
    '650' => 1,
86
    '651' => 1,
87
    '652' => 1,
88
    '653' => 1,
89
    '654' => 1,
90
    '655' => 1,
91
    '656' => 1,
92
    '657' => 1,
93
    '662' => 1,
94
    '690' => 1,
95
    '691' => 1,
96
    '696' => 1,
97
    '697' => 1,
98
    '698' => 1,
99
    '699' => 1,
100
    '700' => 1,
101
    '710' => 1,
102
    '711' => 1,
103
    '730' => 1,
104
    '751' => 1,
105
    '796' => 1,
106
    '797' => 1,
107
    '798' => 1,
108
    '799' => 1,
109
    '800' => 1,
110
    '810' => 1,
111
    '811' => 1,
112
    '830' => 1,
113
    '896' => 1,
114
    '897' => 1,
115
    '898' => 1,
116
    '899' => 1
117
    };
118
119
our $normarcAuthorityfields = {
120
    '100' => 1,
121
    '110' => 1,
122
    '111' => 1,
123
    '130' => 1,
124
    '245' => 1,
125
    '440' => 1,
126
    '490' => 1,
127
    '600' => 1,
128
    '610' => 1,
129
    '611' => 1,
130
    '630' => 1,
131
    '650' => 1,
132
    '651' => 1,
133
    '652' => 1,
134
    '653' => 1,
135
    '654' => 1,
136
    '655' => 1,
137
    '656' => 1,
138
    '657' => 1,
139
    '690' => 1,
140
    '700' => 1,
141
    '710' => 1,
142
    '711' => 1,
143
    '730' => 1,
144
    '800' => 1,
145
    '810' => 1,
146
    '811' => 1,
147
    '830' => 1
148
};
149
150
my $params = {
151
    chunks => $chunks,
152
    page => 1
153
};
154
155
156
my $pageCount = 1;
157
my $authorityfields = $schema eq 'NORMARC' ? $normarcAuthorityfields : $marc21Authorityfields;
158
159
while ($pageCount >= $params->{page}) {
160
    my $biblios = biblios($params);
161
    my $count = 0;
162
    my $lastnumber = 0;
163
    foreach my $biblio (@{$biblios}) {
164
        my $record = C4::Record::marcxml2marc($biblio->{metadata});
165
        foreach my $field ($record->fields) {
166
            my @subfield_data;
167
            if ($authorityfields->{$field->tag}) {
168
                if ($field->subfields) {
169
                    for my $subfield ($field->subfields) {
170
                        if ($subfield->[0] eq "9") {
171
                            $subfield->[0] = "0";
172
                            print "Change $schema 9 field to 0 from ".$biblio->{biblionumber}."\n" if (defined $verbose);
173
                        }
174
                        push @subfield_data, $subfield->[0], $subfield->[1];
175
                    }
176
                }
177
            }
178
            $field->replace_with(MARC::Field->new(
179
                $field->tag(), $field->indicator(1), $field->indicator(2),
180
                @subfield_data)
181
            ) if @subfield_data; 
182
        }
183
        my $frameworkcode = C4::Biblio::GetFrameworkCode( $biblio->{biblionumber} );
184
        C4::Biblio::ModBiblio($record, $biblio->{biblionumber}, $frameworkcode) if $confirm;
185
        $count++;
186
        $lastnumber = $biblio->{biblionumber};
187
    }
188
    print "last processed biblio $lastnumber\n";
189
    print "$count biblios processed!\n";
190
    if ($count eq $params->{chunks}) {
191
        $pageCount++;
192
        $params->{page} = $pageCount;
193
    } else {
194
        $pageCount = 0;
195
    }
196
}
197
198
sub biblios {
199
    my ($params) = @_;
200
    print "Starting to change offset $params->{page}!\n";
201
    my $biblios = Koha::Biblio::Metadatas->search({format => 'marcxml', schema => $schema},
202
    {
203
        page => $params->{page},
204
        rows => $params->{chunks}
205
    }
206
    )->unblessed;
207
208
    return $biblios;
209
210
}
(-)a/t/db_dependent/Koha/Authorities.t (-7 / +50 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Test::More tests => 7;
22
use Test::More tests => 8;
23
use MARC::Field;
23
use MARC::Field;
24
use MARC::File::XML;
24
use MARC::File::XML;
25
use MARC::Record;
25
use MARC::Record;
Lines 129-135 subtest 'Testing reporting_tag_xml in MergeRequest' => sub { Link Here
129
    );
129
    );
130
};
130
};
131
131
132
subtest 'Trivial tests for get_usage_count and linked_biblionumbers' => sub {
132
subtest 'Trivial tests for get_usage_count and linked_biblionumbers with UNIMARC' => sub {
133
    plan tests => 5;
133
    plan tests => 5;
134
134
135
    # NOTE: We are not testing $searcher->simple_search_compat here. Suppose
135
    # NOTE: We are not testing $searcher->simple_search_compat here. Suppose
Lines 137-142 subtest 'Trivial tests for get_usage_count and linked_biblionumbers' => sub { Link Here
137
    # So we're just testing the 'wrapper' here.
137
    # So we're just testing the 'wrapper' here.
138
138
139
    my ( $mods, $koha_fields );
139
    my ( $mods, $koha_fields );
140
    t::lib::Mocks::mock_preference( 'marcflavour', 'UNIMARC' );
141
    t::lib::Mocks::mock_preference('SearchEngine', 'Zebra');
142
    $mods->{zebra} = Test::MockModule->new( 'Koha::SearchEngine::Zebra::Search' );
143
    $mods->{elastic} = Test::MockModule->new( 'Koha::SearchEngine::Elasticsearch::Search' );
144
    $mods->{biblio} = Test::MockModule->new( 'C4::Biblio' );
145
    $mods->{zebra}->mock( 'simple_search_compat', \&simple_search_compat );
146
    $mods->{elastic}->mock( 'simple_search_compat', \&simple_search_compat );
147
    $mods->{biblio}->mock( 'GetMarcFromKohaField', sub { return @$koha_fields; });
148
149
    my $auth1 = $builder->build({ source => 'AuthHeader' });
150
    $auth1 = Koha::Authorities->find( $auth1->{authid} );
151
152
    # Test error condition
153
    my $count;
154
    $search_compat_pars = [ 0, 'some_error' ];
155
    warning_like { $count = $auth1->get_usage_count }
156
        qr/some_error/, 'Catch warn of simple_search_compat';
157
    is( $count, undef, 'Undef returned when error encountered' );
158
159
    # Simple test with some results; one result discarded in the 2nd test
160
    $search_compat_pars = [ 1 ];
161
    $koha_fields = [ '001', '' ];
162
    is(  $auth1->get_usage_count, 3, 'Three results expected (Zebra)' );
163
    cmp_deeply( [ $auth1->linked_biblionumbers ], [ 1001, 3003 ],
164
        'linked_biblionumbers should ignore record without biblionumber' );
165
166
    # And a simple test with Elastic
167
    t::lib::Mocks::mock_preference('SearchEngine', 'Elasticsearch');
168
    cmp_deeply( [ $auth1->linked_biblionumbers ], [ 2001 ],
169
        'linked_biblionumbers with Elasticsearch' );
170
    t::lib::Mocks::mock_preference('SearchEngine', 'Zebra');
171
};
172
173
subtest 'Trivial tests for get_usage_count and linked_biblionumbers with MARC21' => sub {
174
    plan tests => 5;
175
176
    # NOTE: We are not testing $searcher->simple_search_compat here. Suppose
177
    # that should be done in t/db../Koha/SearchEngine?
178
    # So we're just testing the 'wrapper' here.
179
180
    my ( $mods, $koha_fields );
181
    t::lib::Mocks::mock_preference( 'marcflavour', 'MARC21' );
140
    t::lib::Mocks::mock_preference('SearchEngine', 'Zebra');
182
    t::lib::Mocks::mock_preference('SearchEngine', 'Zebra');
141
    $mods->{zebra} = Test::MockModule->new( 'Koha::SearchEngine::Zebra::Search' );
183
    $mods->{zebra} = Test::MockModule->new( 'Koha::SearchEngine::Zebra::Search' );
142
    $mods->{elastic} = Test::MockModule->new( 'Koha::SearchEngine::Elasticsearch::Search' );
184
    $mods->{elastic} = Test::MockModule->new( 'Koha::SearchEngine::Elasticsearch::Search' );
Lines 200-222 unimarc,*,ind1:auth2,ind2:auth1|); Link Here
200
};
242
};
201
243
202
sub simple_search_compat {
244
sub simple_search_compat {
245
    my $authsubfield = Koha::Authorities->authority_linking_subfield;
203
    if( $search_compat_pars->[0] == 0 ) {
246
    if( $search_compat_pars->[0] == 0 ) {
204
        return ( $search_compat_pars->[1], [], 0 );
247
        return ( $search_compat_pars->[1], [], 0 );
205
    } elsif( $search_compat_pars->[0] == 1 ) {
248
    } elsif( $search_compat_pars->[0] == 1 ) {
206
        my $records = C4::Context->preference('SearchEngine') eq 'Zebra'
249
        my $records = C4::Context->preference('SearchEngine') eq 'Zebra'
207
            ? few_marcxml_records()
250
            ? few_marcxml_records($authsubfield)
208
            : few_marc_records();
251
            : few_marc_records();
209
        return ( undef, $records, scalar @$records );
252
        return ( undef, $records, scalar @$records );
210
    }
253
    }
211
}
254
}
212
255
213
sub few_marcxml_records {
256
sub few_marcxml_records {
257
    my ($authsubfield) = @_;
214
    return [
258
    return [
215
q|<?xml version="1.0" encoding="UTF-8"?>
259
q|<?xml version="1.0" encoding="UTF-8"?>
216
<record xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.loc.gov/MARC21/slim" xsi:schemaLocation="http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd">
260
<record xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.loc.gov/MARC21/slim" xsi:schemaLocation="http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd">
217
    <controlfield tag="001">1001</controlfield>
261
    <controlfield tag="001">1001</controlfield>
218
    <datafield tag="110" ind1=" " ind2=" ">
262
    <datafield tag="110" ind1=" " ind2=" ">
219
        <subfield code="9">102</subfield>
263
        <subfield code="$authsubfield">102</subfield>
220
        <subfield code="a">My Corporation</subfield>
264
        <subfield code="a">My Corporation</subfield>
221
    </datafield>
265
    </datafield>
222
</record>|,
266
</record>|,
Lines 224-230 q|<?xml version="1.0" encoding="UTF-8"?> Link Here
224
<record xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.loc.gov/MARC21/slim" xsi:schemaLocation="http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd">
268
<record xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.loc.gov/MARC21/slim" xsi:schemaLocation="http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd">
225
    <!-- No biblionumber here -->
269
    <!-- No biblionumber here -->
226
    <datafield tag="610" ind1=" " ind2=" ">
270
    <datafield tag="610" ind1=" " ind2=" ">
227
        <subfield code="9">112</subfield>
271
        <subfield code="$authsubfield">112</subfield>
228
        <subfield code="a">Another Corporation</subfield>
272
        <subfield code="a">Another Corporation</subfield>
229
    </datafield>
273
    </datafield>
230
</record>|,
274
</record>|,
Lines 232-238 q|<?xml version="1.0" encoding="UTF-8"?> Link Here
232
<record xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.loc.gov/MARC21/slim" xsi:schemaLocation="http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd">
276
<record xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.loc.gov/MARC21/slim" xsi:schemaLocation="http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd">
233
    <controlfield tag="001">3003</controlfield>
277
    <controlfield tag="001">3003</controlfield>
234
    <datafield tag="110" ind1=" " ind2=" ">
278
    <datafield tag="110" ind1=" " ind2=" ">
235
        <subfield code="9">102</subfield>
279
        <subfield code="$authsubfield">102</subfield>
236
        <subfield code="a">My Corporation</subfield>
280
        <subfield code="a">My Corporation</subfield>
237
    </datafield>
281
    </datafield>
238
</record>|
282
</record>|
239
- 

Return to bug 22613