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

(-)a/C4/XSLT.pm (-1 / +6 lines)
Lines 282-290 sub XSLTParse4Display { Link Here
282
            if ( $biblio->components() ) {
282
            if ( $biblio->components() ) {
283
                my @componentPartRecordXML = ('<componentPartRecords>');
283
                my @componentPartRecordXML = ('<componentPartRecords>');
284
                for my $cb ( @{ $biblio->components() } ) {
284
                for my $cb ( @{ $biblio->components() } ) {
285
                    if( ref $cb eq 'MARC::Record'){
286
                        $cb = $cb->as_xml_record();
287
                    } else {
288
                        $cb = decode('utf8', $cb);
289
                    }
285
                    # Remove the xml header
290
                    # Remove the xml header
286
                    $cb =~ s/^<\?xml.*?\?>//;
291
                    $cb =~ s/^<\?xml.*?\?>//;
287
                    push @componentPartRecordXML, decode('utf8', $cb);
292
                    push @componentPartRecordXML,$cb;
288
                }
293
                }
289
                push @componentPartRecordXML, '</componentPartRecords>';
294
                push @componentPartRecordXML, '</componentPartRecords>';
290
                $partsxml = join "\n", @componentPartRecordXML;
295
                $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 1621-1626 biblios: Link Here
1621
        sort: ~
1621
        sort: ~
1622
        suggestible: ''
1622
        suggestible: ''
1623
    type: ''
1623
    type: ''
1624
  control-number-identifier:
1625
    label: control-number-identifier
1626
    mappings:
1627
      - facet: ''
1628
        marc_field: 003
1629
        marc_type: marc21
1630
        sort: ~
1631
        suggestible: ''
1632
    type: ''
1624
  copydate:
1633
  copydate:
1625
    label: copydate
1634
    label: copydate
1626
    mappings:
1635
    mappings:
1627
- 

Return to bug 11175