[Koha-bugs] [Bug 30522] SearchEngine::simple_search_compat should not limit to 100 records for ElasticSearch
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Wed Apr 13 16:09:42 CEST 2022
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30522
Marcel de Rooy <m.de.rooy at rijksmuseum.nl> changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|minor |normal
QA Contact|testopia at bugs.koha-communit |
|y.org |
CC| |nick at bywatersolutions.com,
| |tomascohen at gmail.com
Version|21.11 |master
Component|MARC Authority data support |Searching - Elasticsearch
Summary|Issue with |SearchEngine::simple_search
|merge_authorities script ? |_compat should not limit to
| |100 records for
| |ElasticSearch
--- Comment #5 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
(In reply to Bernard from comment #4)
> It's version 21.11.01.000
>
> I've just run your little script:
>
> use Modern::Perl;
> use Data::Dumper qw/Dumper/;
> use Koha::Authorities;
> my @biblionumbers = Koha::Authorities->linked_biblionumbers({ authid => 7307
> });
> print Dumper( scalar @biblionumbers );
>
> >>>
>
> $ perl /home2/kfc/kohaclone/Koha/bertest.pl
> $VAR1 = 100;
>
> There are 104 bib records linked to this authority
Found it!
You are using ElasticSearch, I used Zebra.
The cause is in the Koha/SearchEngine/ElasticSearch/Search.pm module:
sub simple_search_compat {
my ($self, $query, $offset, $max_results) = @_;
return ('No query entered', undef, undef) unless $query;
my %options;
$offset = 0 if not defined $offset or $offset < 0;
$options{offset} = $offset;
$max_results //= 100;
=> This sub expects a max_results parameter for Elastic while the Zebra one
does not require it. No max_results means there all results.
So we need to adjust that one somehow. CCing Nick and Tomas.
Good catch !
--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
More information about the Koha-bugs
mailing list