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

(-)a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm (-2 / +4 lines)
Lines 573-583 our $thesaurus_to_value = { Link Here
573
   lcac  => 'b',
573
   lcac  => 'b',
574
   mesh  => 'c',
574
   mesh  => 'c',
575
   nal   => 'd',
575
   nal   => 'd',
576
   notspecified => 'n',
576
   notapplicable => 'n',
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',
582
   notspecified => '|'
581
};
583
};
582
584
583
sub build_authorities_query_compat {
585
sub build_authorities_query_compat {
(-)a/etc/zebradb/marc_defs/marc21/authorities/authority-zebra-indexdefs.xsl (-1 / +1 lines)
Lines 2452-2458 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
2452
          </xslo:choose>
2452
          </xslo:choose>
2453
        </xslo:when>
2453
        </xslo:when>
2454
        <xslo:otherwise>
2454
        <xslo:otherwise>
2455
          <xslo:text>notdefined</xslo:text>
2455
          <xslo:text>notspecified</xslo:text>
2456
        </xslo:otherwise>
2456
        </xslo:otherwise>
2457
      </xslo:choose>
2457
      </xslo:choose>
2458
    </xslo:variable>
2458
    </xslo:variable>
(-)a/t/db_dependent/Heading.t (-2 / +11 lines)
Lines 65-71 subtest "UNIMARC tests" => sub { Link Here
65
65
66
subtest "_search tests" => sub {
66
subtest "_search tests" => sub {
67
67
68
    plan tests => 7;
68
    plan tests => 8;
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');
Lines 111-116 subtest "_search tests" => sub { Link Here
111
    ];
111
    ];
112
    is_deeply( $terms, $expected_terms, "Search formed as expected with second indicator 7 and subfield 2");
112
    is_deeply( $terms, $expected_terms, "Search formed as expected with second indicator 7 and subfield 2");
113
113
114
    $field = MARC::Field->new( '650', ' ', '4', a => 'Uncles', x => 'Fiction' );
115
    $heading = C4::Heading->new_from_field($field);
116
    ($search_query) = $heading->_search( 'match-heading' );
117
    $terms = $search_query->{query}->{bool}->{must};
118
    $expected_terms = [
119
        { term => { 'match-heading.ci_raw' => 'Uncles generalsubdiv Fiction' } },
120
        { term => { 'subject-heading-thesaurus.ci_raw' => '|' } },
121
    ];
122
    is_deeply( $terms, $expected_terms, "Search looks for thesaurus '|' when second indicator 4");
123
114
    $field = MARC::Field->new( '100', ' ', '', a => 'Yankovic, Al', d => '1959-,' );
124
    $field = MARC::Field->new( '100', ' ', '', a => 'Yankovic, Al', d => '1959-,' );
115
    $heading = C4::Heading->new_from_field($field);
125
    $heading = C4::Heading->new_from_field($field);
116
    ($search_query) = $heading->_search( 'match-heading' );
126
    ($search_query) = $heading->_search( 'match-heading' );
117
- 

Return to bug 33277