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

(-)a/C4/Heading.pm (+2 lines)
Lines 202-207 sub _search { Link Here
202
    my @operator;
202
    my @operator;
203
    my @value;
203
    my @value;
204
204
205
    # FIXME: We specify values for @and_or and @excluding
206
    # but these fields are not used anywhere and should be removed
205
    if ($index) {
207
    if ($index) {
206
        push @marclist, $index;
208
        push @marclist, $index;
207
        push @and_or,   'AND';
209
        push @and_or,   'AND';
(-)a/C4/Heading/MARC21.pm (+5 lines)
Lines 359-364 sub _get_subject_thesaurus { Link Here
359
    my $field = shift;
359
    my $field = shift;
360
    my $ind2  = $field->indicator(2);
360
    my $ind2  = $field->indicator(2);
361
361
362
    # NOTE: sears and aat do not appear
363
    # here as they do not have indicator values
364
    # though the 008 in the authority records
365
    # do have values for them
366
362
    my $thesaurus = "notdefined";
367
    my $thesaurus = "notdefined";
363
    if ( $ind2 eq '0' ) {
368
    if ( $ind2 eq '0' ) {
364
        $thesaurus = "lcsh";
369
        $thesaurus = "lcsh";
(-)a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm (-6 / +12 lines)
Lines 564-577 our $koha_to_index_name = { Link Here
564
    all             => ''
564
    all             => ''
565
};
565
};
566
566
567
# Note that sears and aat map to 008/11 values here
568
# but don't appear in C4/Headin/MARC21 thesaurus
569
# because they don't have values in controlled field indicators
570
# https://www.loc.gov/marc/authority/ad008.html
567
our $thesaurus_to_value = {
571
our $thesaurus_to_value = {
568
   lcsh => 'a',
572
   lcsh  => 'a',
569
   lcac => 'b',
573
   lcac  => 'b',
570
   mesh => 'c',
574
   mesh  => 'c',
571
   nal  => 'd',
575
   nal   => 'd',
572
   notspecified => 'n',
576
   notspecified => 'n',
573
   cash => 'k',
577
   cash  => 'k',
574
   rvm => 'v',
578
   rvm   => 'v',
579
   aat   => 'r',
580
   sears => 's'
575
};
581
};
576
582
577
sub build_authorities_query_compat {
583
sub build_authorities_query_compat {
(-)a/t/db_dependent/Heading.t (-1 / +3 lines)
Lines 69-74 subtest "_search tests" => sub { Link Here
69
69
70
    t::lib::Mocks::mock_preference('marcflavour', 'MARC21');
70
    t::lib::Mocks::mock_preference('marcflavour', 'MARC21');
71
    t::lib::Mocks::mock_preference('SearchEngine', 'Elasticsearch');
71
    t::lib::Mocks::mock_preference('SearchEngine', 'Elasticsearch');
72
    # NOTE: We are testing solely against ES here to make the assumptions simpler while testing
73
    # C4/Headings code specifically. The actual query building and searching code should
74
    # be covered in other test files
72
    my $search = Test::MockModule->new('Koha::SearchEngine::Elasticsearch::Search');
75
    my $search = Test::MockModule->new('Koha::SearchEngine::Elasticsearch::Search');
73
76
74
    $search->mock('search_auth_compat', sub {
77
    $search->mock('search_auth_compat', sub {
75
- 

Return to bug 33277