| 
      
            Lines 358-363
          sub run_marc21_search_tests {
      
      
        Link Here
      
     | 
  
        
          | 358 | 
                  getRecords('au:Lessig', 'au:Lessig', [], [ 'biblioserver' ], '20', 0, undef, \%branches, \%itemtypes, 'ccl', undef); | 
          358 | 
                  getRecords('au:Lessig', 'au:Lessig', [], [ 'biblioserver' ], '20', 0, undef, \%branches, \%itemtypes, 'ccl', undef); | 
        
        
          | 359 | 
              is($results_hashref->{biblioserver}->{hits}, 4, "getRecords title search for 'Australia' matched right number of records"); | 
          359 | 
              is($results_hashref->{biblioserver}->{hits}, 4, "getRecords title search for 'Australia' matched right number of records"); | 
        
        
          | 360 | 
           | 
          360 | 
           | 
        
            
               | 
               | 
              361 | 
              if ( $indexing_mode eq 'dom' ) { | 
            
            
              | 362 | 
                  ( undef, $results_hashref, $facets_loop ) =  | 
            
            
              | 363 | 
                      getRecords('salud', 'salud', [], [ 'biblioserver' ], '19', 0, undef, \%branches, \%itemtypes, 'ccl', undef); | 
            
            
              | 364 | 
                  ok(MARC::Record::new_from_xml($results_hashref->{biblioserver}->{RECORDS}->[0],'UTF-8')->title_proper() =~ m/^Efectos del ambiente/ && | 
            
            
              | 365 | 
                      MARC::Record::new_from_xml($results_hashref->{biblioserver}->{RECORDS}->[7],'UTF-8')->title_proper() eq 'Salud y seguridad de los trabajadores del sector salud: manual para gerentes y administradores^ies' && | 
            
            
              | 366 | 
                      MARC::Record::new_from_xml($results_hashref->{biblioserver}->{RECORDS}->[18],'UTF-8')->title_proper() =~ m/^Indicadores de resultados identificados/ | 
            
            
              | 367 | 
                      , "Simple relevance sorting in getRecords matches old behavior");  | 
            
            
              | 368 | 
               | 
            
            
              | 369 | 
                  ( undef, $results_hashref, $facets_loop ) =  | 
            
            
              | 370 | 
                      getRecords('salud', 'salud', [ 'author_az' ], [ 'biblioserver' ], '38', 0, undef, \%branches, \%itemtypes, 'ccl', undef); | 
            
            
              | 371 | 
                  ok(MARC::Record::new_from_xml($results_hashref->{biblioserver}->{RECORDS}->[0],'UTF-8')->title_proper() =~ m/la enfermedad laboral\^ies$/ && | 
            
            
              | 372 | 
                      MARC::Record::new_from_xml($results_hashref->{biblioserver}->{RECORDS}->[6],'UTF-8')->title_proper() =~ m/^Indicadores de resultados identificados/ && | 
            
            
              | 373 | 
                      MARC::Record::new_from_xml($results_hashref->{biblioserver}->{RECORDS}->[18],'UTF-8')->title_proper() eq 'World health statistics 2009^ien' | 
            
            
              | 374 | 
                      , "Simple ascending author sorting in getRecords matches old behavior");  | 
            
            
              | 375 | 
               | 
            
            
              | 376 | 
                  ( undef, $results_hashref, $facets_loop ) =  | 
            
            
              | 377 | 
                      getRecords('salud', 'salud', [ 'author_za' ], [ 'biblioserver' ], '38', 0, undef, \%branches, \%itemtypes, 'ccl', undef); | 
            
            
              | 378 | 
                  ok(MARC::Record::new_from_xml($results_hashref->{biblioserver}->{RECORDS}->[0],'UTF-8')->title_proper() eq 'World health statistics 2009^ien' && | 
            
            
              | 379 | 
                      MARC::Record::new_from_xml($results_hashref->{biblioserver}->{RECORDS}->[12],'UTF-8')->title_proper() =~ m/^Indicadores de resultados identificados/ && | 
            
            
              | 380 | 
                      MARC::Record::new_from_xml($results_hashref->{biblioserver}->{RECORDS}->[18],'UTF-8')->title_proper() =~ m/la enfermedad laboral\^ies$/ | 
            
            
              | 381 | 
                      , "Simple descending author sorting in getRecords matches old behavior");  | 
            
            
              | 382 | 
               | 
            
            
              | 383 | 
                  ( undef, $results_hashref, $facets_loop ) =  | 
            
            
              | 384 | 
                      getRecords('salud', 'salud', [ 'pubdate_asc' ], [ 'biblioserver' ], '38', 0, undef, \%branches, \%itemtypes, 'ccl', undef); | 
            
            
              | 385 | 
                  ok(MARC::Record::new_from_xml($results_hashref->{biblioserver}->{RECORDS}->[0],'UTF-8')->title_proper() eq 'Manual de higiene industrial^ies' && | 
            
            
              | 386 | 
                      MARC::Record::new_from_xml($results_hashref->{biblioserver}->{RECORDS}->[7],'UTF-8')->title_proper() =~ m/seguridad e higiene del trabajo\^ies$/ && | 
            
            
              | 387 | 
                      MARC::Record::new_from_xml($results_hashref->{biblioserver}->{RECORDS}->[18],'UTF-8')->title_proper() =~ m/^Indicadores de resultados identificados/ | 
            
            
              | 388 | 
                      , "Simple ascending publication date sorting in getRecords matches old behavior");  | 
            
            
              | 389 | 
               | 
            
            
              | 390 | 
                  ( undef, $results_hashref, $facets_loop ) =  | 
            
            
              | 391 | 
                      getRecords('salud', 'salud', [ 'pubdate_dsc' ], [ 'biblioserver' ], '38', 0, undef, \%branches, \%itemtypes, 'ccl', undef); | 
            
            
              | 392 | 
                  ok(MARC::Record::new_from_xml($results_hashref->{biblioserver}->{RECORDS}->[0],'UTF-8')->title_proper() =~ m/^Estado de salud/ && | 
            
            
              | 393 | 
                      MARC::Record::new_from_xml($results_hashref->{biblioserver}->{RECORDS}->[7],'UTF-8')->title_proper() eq 'World health statistics 2009^ien' && | 
            
            
              | 394 | 
                      MARC::Record::new_from_xml($results_hashref->{biblioserver}->{RECORDS}->[18],'UTF-8')->title_proper() eq 'Manual de higiene industrial^ies' | 
            
            
              | 395 | 
                      , "Simple descending publication date sorting in getRecords matches old behavior");  | 
            
            
              | 396 | 
               | 
            
            
              | 397 | 
              } elsif ( $indexing_mode eq 'grs1' ){ | 
            
        
          | 361 | 
              ( undef, $results_hashref, $facets_loop ) =  | 
          398 | 
              ( undef, $results_hashref, $facets_loop ) =  | 
        
        
          | 362 | 
                  getRecords('salud', 'salud', [], [ 'biblioserver' ], '19', 0, undef, \%branches, \%itemtypes, 'ccl', undef); | 
          399 | 
                  getRecords('salud', 'salud', [], [ 'biblioserver' ], '19', 0, undef, \%branches, \%itemtypes, 'ccl', undef); | 
        
        
          | 363 | 
              ok(MARC::Record::new_from_usmarc($results_hashref->{biblioserver}->{RECORDS}->[0])->title_proper() =~ m/^Efectos del ambiente/ && | 
          400 | 
              ok(MARC::Record::new_from_usmarc($results_hashref->{biblioserver}->{RECORDS}->[0])->title_proper() =~ m/^Efectos del ambiente/ && | 
        
  
    | 
      
            Lines 392-405
          sub run_marc21_search_tests {
      
      
        Link Here
      
     | 
  
        
          | 392 | 
                  MARC::Record::new_from_usmarc($results_hashref->{biblioserver}->{RECORDS}->[7])->title_proper() eq 'World health statistics 2009^ien' && | 
          429 | 
                  MARC::Record::new_from_usmarc($results_hashref->{biblioserver}->{RECORDS}->[7])->title_proper() eq 'World health statistics 2009^ien' && | 
        
        
          | 393 | 
                  MARC::Record::new_from_usmarc($results_hashref->{biblioserver}->{RECORDS}->[18])->title_proper() eq 'Manual de higiene industrial^ies' | 
          430 | 
                  MARC::Record::new_from_usmarc($results_hashref->{biblioserver}->{RECORDS}->[18])->title_proper() eq 'Manual de higiene industrial^ies' | 
        
        
          | 394 | 
                  , "Simple descending publication date sorting in getRecords matches old behavior");  | 
          431 | 
                  , "Simple descending publication date sorting in getRecords matches old behavior");  | 
        
            
               | 
               | 
              432 | 
              }  | 
            
        
          | 395 | 
           | 
          433 | 
           | 
        
            
               | 
               | 
              434 | 
              TODO: { | 
            
            
              | 435 | 
                  local $TODO = "Switch relevance search to MARCXML too";  | 
            
        
          | 396 | 
              ( undef, $results_hashref, $facets_loop ) =  | 
          436 | 
              ( undef, $results_hashref, $facets_loop ) =  | 
        
        
          | 397 | 
                  getRecords('books', 'books', [ 'relevance' ], [ 'biblioserver' ], '20', 0, undef, \%branches, \%itemtypes, undef, 1); | 
          437 | 
                  getRecords('books', 'books', [ 'relevance' ], [ 'biblioserver' ], '20', 0, undef, \%branches, \%itemtypes, undef, 1); | 
        
        
          | 398 | 
              $record = MARC::Record::new_from_usmarc($results_hashref->{biblioserver}->{RECORDS}->[0]); | 
          438 | 
              $record = MARC::Record::new_from_usmarc($results_hashref->{biblioserver}->{RECORDS}->[0]); | 
        
        
          | 399 | 
              is($record->title_proper(), 'books', "Scan returned requested item");  | 
          439 | 
              is($record->title_proper(), 'books', "Scan returned requested item");  | 
        
        
          | 400 | 
              is($record->subfield('100', 'a'), 2, "Scan returned correct number of records matching term"); | 
          440 | 
              is($record->subfield('100', 'a'), 2, "Scan returned correct number of records matching term"); | 
        
            
              | 401 | 
               | 
               | 
               | 
            
        
          | 402 | 
              # Time to test buildQuery and searchResults too.  | 
          441 | 
              # Time to test buildQuery and searchResults too.  | 
        
            
               | 
               | 
              442 | 
              }  | 
            
        
          | 403 | 
           | 
          443 | 
           | 
        
        
          | 404 | 
              my ( $query, $simple_query, $query_cgi,  | 
          444 | 
              my ( $query, $simple_query, $query_cgi,  | 
        
        
          | 405 | 
              $query_desc, $limit, $limit_cgi, $limit_desc,  | 
          445 | 
              $query_desc, $limit, $limit_cgi, $limit_desc,  | 
        
  
    | 
      
            Lines 543-549
          sub run_marc21_search_tests {
      
      
        Link Here
      
     | 
  
        
          | 543 | 
                  is(MARC::Record::new_from_usmarc($results_hashref->{biblioserver}->{RECORDS}->[0])->title_proper(), 'Salud y seguridad de los trabajadores del sector salud: manual para gerentes y administradores^ies', "Weighted query returns best match first"); | 
          583 | 
                  is(MARC::Record::new_from_usmarc($results_hashref->{biblioserver}->{RECORDS}->[0])->title_proper(), 'Salud y seguridad de los trabajadores del sector salud: manual para gerentes y administradores^ies', "Weighted query returns best match first"); | 
        
        
          | 544 | 
              } else { | 
          584 | 
              } else { | 
        
        
          | 545 | 
                  local $TODO = "Query weighting does not behave exactly the same in DOM vs. GRS";  | 
          585 | 
                  local $TODO = "Query weighting does not behave exactly the same in DOM vs. GRS";  | 
        
          
            
              | 546 | 
                      is(MARC::Record::new_from_usmarc($results_hashref->{biblioserver}->{RECORDS}->[0])->title_proper(), 'Salud y seguridad de los trabajadores del sector salud: manual para gerentes y administradores^ies', "Weighted query returns best match first"); | 
              586 | 
                      is(MARC::Record::new_from_xml($results_hashref->{biblioserver}->{RECORDS}->[0],'UTF-8')->title_proper(), 'Salud y seguridad de los trabajadores del sector salud: manual para gerentes y administradores^ies', "Weighted query returns best match first"); | 
            
        
          | 547 | 
              }  | 
          587 | 
              }  | 
        
        
          | 548 | 
           | 
          588 | 
           | 
        
        
          | 549 | 
              $QueryStemming = $QueryWeightFields = $QueryFuzzy = $QueryRemoveStopwords = 0;  | 
          589 | 
              $QueryStemming = $QueryWeightFields = $QueryFuzzy = $QueryRemoveStopwords = 0;  | 
        
            
              | 550 | 
              -   | 
               | 
               |