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

--- Comment #27 from David Cook <[email protected]> ---
(In reply to David Cook from comment #26)
> It looks like we only ever use the 1st result from FindDuplicate, but we
> return a copy of an array that (in theory) can contain up to 50 results. 
>
> --
> 
> my ( $error, $searchresults, undef ) =
> $searcher->simple_search_compat($query,0,50);
> 

I've just created 50+ duplicate records that have an apostrophe in the title,
and I've confirmed that FindDuplicate returns a maximum of 50 records (ie 100
array entries - 2 for each record). 

Looking at FindDuplicate, there's no reason why addbiblio.pl should consume
100% CPU when using that function. 

That suggests to me if there is an issue.. it's probably with
Koha::SearchEngine::Search::Zebra::Search's simple_search_compat(),
new_record_from_zebra(), or TransformMarcToKoha(). 

TransformMarcToKoha() does have a loop which gets run for every potential
result, but it's not too consuming at a glance, and it should max out at 50
iterations.

new_record_from_zebra() just creates a MARC::Record object. The one thing is
that it could return a null result which isn't checked in FindDuplicate... but
TransformMarcToKoha should carp() and return an empty hashref if it gets an
undefined record. 

simple_search_compat() actually just uses C4::Search::SimpleSearch(). While
there is some looping, it's all quite contained.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to