# left and right truncation, otherwise an exact phrase
push @query_parts, { match_phrase => { $wh => $val }};
} elsif ($op eq 'start') {
+ # startswith search
push @query_parts, { wildcard => { "$wh.phrase" => lc "$val*" }};
} else {
# regular wordlist stuff
- # TODO truncation
push @query_parts, { match => { $wh => $val }};
}
}
# die Dumper(\@marclist, \@and_or,
# \@excluding, \@operator, \@value, $authtypecode, $orderby, $query);
# The searchengine API expects pages to start at page 1
- $startfrom = defined($startfrom) ? $startfrom+1 : undef;
+ $startfrom = $startfrom // 0;
my ( $results, $total ) =
- $searcher->search_auth_compat( $search_query, $startfrom, $resultsperpage );
+ $searcher->search_auth_compat( $search_query, $startfrom+1, $resultsperpage );
( $template, $loggedinuser, $cookie ) = get_template_and_user(
{
template_name => "opac-authoritiessearchresultlist.tt",