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 526-537 sub components { Link Here
526
            $searchstr = "rcn='".$pf001->data()."'";
526
            $searchstr = "rcn='".$pf001->data()."'";
527
        } else {
527
        } else {
528
            # search for (773$w='Host001' and 003='Host003') or 773$w='Host003 Host001')
528
            # search for (773$w='Host001' and 003='Host003') or 773$w='Host003 Host001')
529
            $searchstr = "(rcn='".$pf001->data()."' and cni='".$pf003->data()."')";
529
            $searchstr = "(rcn='".$pf001->data()."' AND cni='".$pf003->data()."')";
530
            $searchstr .= " or rcn='".$pf003->data()." ".$pf001->data()."'";
530
            $searchstr .= " OR rcn='".$pf003->data()." ".$pf001->data()."'";
531
        }
531
        }
532
532
533
        my ( $errors, $results, $total_hits ) = $searcher->simple_search_compat( $searchstr, 0, undef );
533
        my ( $errors, $results, $total_hits ) = $searcher->simple_search_compat( $searchstr, 0, undef );
534
535
        $self->{_components} = $results if ( defined($results) && scalar(@$results) );
534
        $self->{_components} = $results if ( defined($results) && scalar(@$results) );
536
    } else {
535
    } else {
537
        warn "Record $self->id has no 001";
536
        warn "Record $self->id has no 001";
(-)a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm (+1 lines)
Lines 82-87 our %index_field_convert = ( Link Here
82
    'nt' => 'note',
82
    'nt' => 'note',
83
    'notes' => 'note',
83
    'notes' => 'note',
84
    'rcn' => 'record-control-number',
84
    'rcn' => 'record-control-number',
85
    'cni' => 'control-number-identifier',
85
    'su' => 'subject',
86
    'su' => 'subject',
86
    'su-to' => 'subject',
87
    'su-to' => 'subject',
87
    #'su-geo' => 'subject',
88
    #'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