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

(-)a/C4/Heading.pm (-1 / +1 lines)
Lines 244-250 sub _search { Link Here
244
    # This is legal, so we do a fallback search
244
    # This is legal, so we do a fallback search
245
    if( !$total && $thesaurus && !( grep /$thesaurus/,('lcsh','lcac','mesh','nal','notspecified','cash','rvm','sears','aat') ) ){
245
    if( !$total && $thesaurus && !( grep /$thesaurus/,('lcsh','lcac','mesh','nal','notspecified','cash','rvm','sears','aat') ) ){
246
        pop @value;
246
        pop @value;
247
        push @value, 'z';
247
        push @value, 'notdefined';
248
        $search_query = $builder->build_authorities_query_compat(
248
        $search_query = $builder->build_authorities_query_compat(
249
            \@marclist, \@and_or, \@excluding, \@operator,
249
            \@marclist, \@and_or, \@excluding, \@operator,
250
            \@value,    $self->{'auth_type'},
250
            \@value,    $self->{'auth_type'},
(-)a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm (-1 / +2 lines)
Lines 577-583 our $thesaurus_to_value = { Link Here
577
   cash  => 'k',
577
   cash  => 'k',
578
   rvm   => 'v',
578
   rvm   => 'v',
579
   aat   => 'r',
579
   aat   => 'r',
580
   sears => 's'
580
   sears => 's',
581
   notdefined => 'z'
581
};
582
};
582
583
583
sub build_authorities_query_compat {
584
sub build_authorities_query_compat {
(-)a/t/db_dependent/Heading.t (-2 / +1 lines)
Lines 165-170 subtest "_search tests" => sub { Link Here
165
        { term => { 'match-heading.ci_raw' => 'Uncles generalsubdiv Fiction' } },
165
        { term => { 'match-heading.ci_raw' => 'Uncles generalsubdiv Fiction' } },
166
        { term => { 'subject-heading-thesaurus.ci_raw' => 'z' } },
166
        { term => { 'subject-heading-thesaurus.ci_raw' => 'z' } },
167
    ];
167
    ];
168
    is_deeply( $terms, $expected_terms, "When thesaurus in subfield 2, and nothing is found, we should search again for 008_11 = z");
168
    is_deeply( $terms, $expected_terms, "When thesaurus in subfield 2, and nothing is found, we should search again for notdefined (008_11 = z) ");
169
169
170
};
170
};
171
- 

Return to bug 33277