[Koha-bugs] [Bug 18822] Advanced editor - Rancor - searching broken under Elasticsearch

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Mar 12 17:26:21 CET 2018


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18822

--- Comment #13 from Nick Clemens <nick at bywatersolutions.com> ---
(In reply to Marcel de Rooy from comment #10)
> +        my $fixed_rec;
> +        eval { $fixed_rec = MARC::Record::new_from_xml( $set->{hits}->[$j],
> 'UTF-8' ) };
> +        $set->{hits}->[$j] = $fixed_rec unless $@;
> 
> No way to know what to expect ? Is it from internal or external ? Do we have
> properties of these external ones ?
> And can we check ref($set->{hits}->[$j]) to see if it is already
> MARC::Record ?

Aha, so...
We are searching the local database via z39.50 (not ES)
We pass the results to new_record_from_zebra
That sub assumes that if ES is enabled it will only be getting ES results (not
true)

I see two solutions:
1 - Add a param to new_record_from_zebra to tell it to convert records or not
2 - Move the test for ES outside the sub, always convert the records in the sub
and just don't call it if using ES

Opinion Marcel? or other suggestion

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list