# build a request for SearchAuthorities
my $query='at='.$authtypecode.' ';
map {$query.= " and he=\"".$_->[1]."\"" if ($_->[0]=~/[A-z]/)} $record->field($auth_tag_to_report)->subfields() if $record->field($auth_tag_to_report);
- my ($error,$results)=SimpleSearch($query,"authorityserver");
+ my ($error,$results)=SimpleSearch( $query, 0, 1, [ "authorityserver" ] );
# there is at least 1 result => return the 1st one
if (@$results>0) {
my $marcrecord = MARC::File::USMARC::decode($results->[0]);
my $self = shift;
my $query = qq(Match-heading,ext="$self->{'search_form'}");
$query .= $self->_query_limiters();
- my $results = SimpleSearch($query, "authorityserver");
+ my $results = SimpleSearch( $query, undef, undef, [ "authorityserver" ] );
return $results;
}
my $self = shift;
my $query = "Match-heading-see-from,ext='$self->{'search_form'}'";
$query .= $self->_query_limiters();
- my $results = SimpleSearch($query, "authorityserver");
+ my $results = SimpleSearch( $query, undef, undef, [ "authorityserver" ] );
return $results;
}
# Search if there is any authorities to link to.
my $query='at='.$data->{authtypecode}.' ';
map {$query.= ' and he,ext="'.$_->[1].'"' if ($_->[0]=~/[A-z]/)} $field->subfields();
- my ($error,$results)=SimpleSearch($query,"authorityserver");
+ my ($error,$results)=SimpleSearch( $query, undef, undef, [ "authorityserver" ] );
# there is only 1 result
if ( $error ) {
warn "BIBLIOADDSAUTHORITIES: $error";
},
);
- my $total; # the total results for the whole set
- my ( $error, $marcresults ) = SimpleSearch($query);
+ warn "fetching $size results for $query";
+ my ( $error, $marcresults ) = SimpleSearch( $query, 0, $size );
my $hits = scalar @$marcresults;
- $hits = $size if $hits > $size;
my @results;
for ( my $i = 0 ; $i < $hits ; $i++ ) {
my %resultsloop;