Browse Source

Bug 18131: Followup - Use data if biblionumber_tag < 10

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
17.11.x
Nick Clemens 4 years ago
committed by Jonathan Druart
parent
commit
7c78e4c97e
  1. 4
      C4/Matcher.pm

4
C4/Matcher.pm

@ -675,7 +675,9 @@ sub get_matches {
if ( C4::Context->preference('SearchEngine') eq 'Elasticsearch' ) {
foreach my $matched ( @{$searchresults} ) {
my ( $biblionumber_tag, $biblionumber_subfield ) = C4::Biblio::GetMarcFromKohaField( "biblio.biblionumber", $marcframework_used );
my $id = $matched->field($biblionumber_tag)->subfield($biblionumber_subfield);
my $id = ( $biblionumber_tag > 10 ) ?
$matched->field($biblionumber_tag)->subfield($biblionumber_subfield) :
$matched->field($biblionumber_tag)->data();
$matches->{$id}->{score} += $matchpoint->{score};
$matches->{$id}->{record} = $matched;
}

Loading…
Cancel
Save