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

(-)a/C4/XSLT.pm (-1 / +6 lines)
Lines 283-291 sub XSLTParse4Display { Link Here
283
            if ( $biblio->components() ) {
283
            if ( $biblio->components() ) {
284
                my @componentPartRecordXML = ('<componentPartRecords>');
284
                my @componentPartRecordXML = ('<componentPartRecords>');
285
                for my $cb ( @{ $biblio->components() } ) {
285
                for my $cb ( @{ $biblio->components() } ) {
286
                    if( ref $cb eq 'MARC::Record'){
287
                        $cb = $cb->as_xml_record();
288
                    } else {
289
                        $cb = decode('utf8', $cb);
290
                    }
286
                    # Remove the xml header
291
                    # Remove the xml header
287
                    $cb =~ s/^<\?xml.*?\?>//;
292
                    $cb =~ s/^<\?xml.*?\?>//;
288
                    push @componentPartRecordXML, decode('utf8', $cb);
293
                    push @componentPartRecordXML,$cb;
289
                }
294
                }
290
                push @componentPartRecordXML, '</componentPartRecords>';
295
                push @componentPartRecordXML, '</componentPartRecords>';
291
                $partsxml = join "\n", @componentPartRecordXML;
296
                $partsxml = join "\n", @componentPartRecordXML;
(-)a/Koha/Biblio.pm (-3 / +2 lines)
Lines 523-534 sub components { Link Here
523
            $searchstr = "rcn='".$pf001->data()."'";
523
            $searchstr = "rcn='".$pf001->data()."'";
524
        } else {
524
        } else {
525
            # search for (773$w='Host001' and 003='Host003') or 773$w='Host003 Host001')
525
            # search for (773$w='Host001' and 003='Host003') or 773$w='Host003 Host001')
526
            $searchstr = "(rcn='".$pf001->data()."' and cni='".$pf003->data()."')";
526
            $searchstr = "(rcn='".$pf001->data()."' AND cni='".$pf003->data()."')";
527
            $searchstr .= " or rcn='".$pf003->data()." ".$pf001->data()."'";
527
            $searchstr .= " OR rcn='".$pf003->data()." ".$pf001->data()."'";
528
        }
528
        }
529
529
530
        my ( $errors, $results, $total_hits ) = $searcher->simple_search_compat( $searchstr, 0, undef );
530
        my ( $errors, $results, $total_hits ) = $searcher->simple_search_compat( $searchstr, 0, undef );
531
532
        $self->{_components} = $results if ( defined($results) && scalar(@$results) );
531
        $self->{_components} = $results if ( defined($results) && scalar(@$results) );
533
    } else {
532
    } else {
534
        warn "Record $self->id has no 001";
533
        warn "Record $self->id has no 001";
(-)a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm (+1 lines)
Lines 653-658 our %index_field_convert = ( Link Here
653
    'nt' => 'note',
653
    'nt' => 'note',
654
    'notes' => 'note',
654
    'notes' => 'note',
655
    'rcn' => 'record-control-number',
655
    'rcn' => 'record-control-number',
656
    'cni' => 'control-number-identifier',
656
    'su' => 'subject',
657
    'su' => 'subject',
657
    'su-to' => 'subject',
658
    'su-to' => 'subject',
658
    #'su-geo' => 'subject',
659
    #'su-geo' => 'subject',
(-)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