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

(-)a/C4/XSLT.pm (-1 / +6 lines)
Lines 299-307 sub XSLTParse4Display { Link Here
299
            if ( $biblio->components() ) {
299
            if ( $biblio->components() ) {
300
                my @componentPartRecordXML = ('<componentPartRecords>');
300
                my @componentPartRecordXML = ('<componentPartRecords>');
301
                for my $cb ( @{ $biblio->components() } ) {
301
                for my $cb ( @{ $biblio->components() } ) {
302
                    if( ref $cb eq 'MARC::Record'){
303
                        $cb = $cb->as_xml_record();
304
                    } else {
305
                        $cb = decode('utf8', $cb);
306
                    }
302
                    # Remove the xml header
307
                    # Remove the xml header
303
                    $cb =~ s/^<\?xml.*?\?>//;
308
                    $cb =~ s/^<\?xml.*?\?>//;
304
                    push @componentPartRecordXML, decode('utf8', $cb);
309
                    push @componentPartRecordXML,$cb;
305
                }
310
                }
306
                push @componentPartRecordXML, '</componentPartRecords>';
311
                push @componentPartRecordXML, '</componentPartRecords>';
307
                $partsxml = join "\n", @componentPartRecordXML;
312
                $partsxml = join "\n", @componentPartRecordXML;
(-)a/Koha/Biblio.pm (-3 / +2 lines)
Lines 524-535 sub components { Link Here
524
            $searchstr = "rcn='".$pf001->data()."'";
524
            $searchstr = "rcn='".$pf001->data()."'";
525
        } else {
525
        } else {
526
            # search for (773$w='Host001' and 003='Host003') or 773$w='Host003 Host001')
526
            # search for (773$w='Host001' and 003='Host003') or 773$w='Host003 Host001')
527
            $searchstr = "(rcn='".$pf001->data()."' and cni='".$pf003->data()."')";
527
            $searchstr = "(rcn='".$pf001->data()."' AND cni='".$pf003->data()."')";
528
            $searchstr .= " or rcn='".$pf003->data()." ".$pf001->data()."'";
528
            $searchstr .= " OR rcn='".$pf003->data()." ".$pf001->data()."'";
529
        }
529
        }
530
530
531
        my ( $errors, $results, $total_hits ) = $searcher->simple_search_compat( $searchstr, 0, undef );
531
        my ( $errors, $results, $total_hits ) = $searcher->simple_search_compat( $searchstr, 0, undef );
532
533
        $self->{_components} = $results if ( defined($results) && scalar(@$results) );
532
        $self->{_components} = $results if ( defined($results) && scalar(@$results) );
534
    } else {
533
    } else {
535
        warn "Record $self->id has no 001";
534
        warn "Record $self->id has no 001";
(-)a/admin/searchengine/elasticsearch/mappings.yaml (-1 / +9 lines)
Lines 1636-1641 biblios: Link Here
1636
        sort: ~
1636
        sort: ~
1637
        suggestible: ''
1637
        suggestible: ''
1638
    type: ''
1638
    type: ''
1639
  control-number-identifier:
1640
    label: control-number-identifier
1641
    mappings:
1642
      - facet: ''
1643
        marc_field: 003
1644
        marc_type: marc21
1645
        sort: ~
1646
        suggestible: ''
1647
    type: ''
1639
  copydate:
1648
  copydate:
1640
    label: copydate
1649
    label: copydate
1641
    mappings:
1650
    mappings:
1642
- 

Return to bug 11175