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

(-)a/C4/XSLT.pm (-1 / +6 lines)
Lines 296-304 sub XSLTParse4Display { Link Here
296
            if ( $biblio->components() ) {
296
            if ( $biblio->components() ) {
297
                my @componentPartRecordXML = ('<componentPartRecords>');
297
                my @componentPartRecordXML = ('<componentPartRecords>');
298
                for my $cb ( @{ $biblio->components() } ) {
298
                for my $cb ( @{ $biblio->components() } ) {
299
                    if( ref $cb eq 'MARC::Record'){
300
                        $cb = $cb->as_xml_record();
301
                    } else {
302
                        $cb = decode('utf8', $cb);
303
                    }
299
                    # Remove the xml header
304
                    # Remove the xml header
300
                    $cb =~ s/^<\?xml.*?\?>//;
305
                    $cb =~ s/^<\?xml.*?\?>//;
301
                    push @componentPartRecordXML, decode('utf8', $cb);
306
                    push @componentPartRecordXML,$cb;
302
                }
307
                }
303
                push @componentPartRecordXML, '</componentPartRecords>';
308
                push @componentPartRecordXML, '</componentPartRecords>';
304
                $partsxml = join "\n", @componentPartRecordXML;
309
                $partsxml = join "\n", @componentPartRecordXML;
(-)a/Koha/Biblio.pm (-3 / +2 lines)
Lines 505-516 sub components { Link Here
505
            $searchstr = "rcn='".$pf001->data()."'";
505
            $searchstr = "rcn='".$pf001->data()."'";
506
        } else {
506
        } else {
507
            # search for (773$w='Host001' and 003='Host003') or 773$w='Host003 Host001')
507
            # search for (773$w='Host001' and 003='Host003') or 773$w='Host003 Host001')
508
            $searchstr = "(rcn='".$pf001->data()."' and cni='".$pf003->data()."')";
508
            $searchstr = "(rcn='".$pf001->data()."' AND cni='".$pf003->data()."')";
509
            $searchstr .= " or rcn='".$pf003->data()." ".$pf001->data()."'";
509
            $searchstr .= " OR rcn='".$pf003->data()." ".$pf001->data()."'";
510
        }
510
        }
511
511
512
        my ( $errors, $results, $total_hits ) = $searcher->simple_search_compat( $searchstr, 0, undef );
512
        my ( $errors, $results, $total_hits ) = $searcher->simple_search_compat( $searchstr, 0, undef );
513
514
        $self->{_components} = $results if ( defined($results) && scalar(@$results) );
513
        $self->{_components} = $results if ( defined($results) && scalar(@$results) );
515
    } else {
514
    } else {
516
        warn "Record $self->id has no 001";
515
        warn "Record $self->id has no 001";
(-)a/admin/searchengine/elasticsearch/mappings.yaml (-1 / +9 lines)
Lines 1251-1256 biblios: Link Here
1251
        sort: ~
1251
        sort: ~
1252
        suggestible: ''
1252
        suggestible: ''
1253
    type: ''
1253
    type: ''
1254
  control-number-identifier:
1255
    label: control-number-identifier
1256
    mappings:
1257
      - facet: ''
1258
        marc_field: 003
1259
        marc_type: marc21
1260
        sort: ~
1261
        suggestible: ''
1262
    type: ''
1254
  copydate:
1263
  copydate:
1255
    label: copydate
1264
    label: copydate
1256
    mappings:
1265
    mappings:
1257
- 

Return to bug 11175