Parent Directory | Revision Log | Patch
revision 5 by dpavlin, Thu Apr 26 20:43:00 2007 UTC | revision 6 by dpavlin, Thu Apr 26 20:57:14 2007 UTC | |
---|---|---|
# | Line 30 language plperlu | Line 30 language plperlu |
30 | as $$ | as $$ |
31 | ||
32 | my $debug = 0; | my $debug = 0; |
33 | my $max_res = 100; | |
34 | ||
35 | my ( $server, $query ) = @_; | my ( $server, $query ) = @_; |
36 | ||
# | Line 76 my $cqf = q2cqf( $query ); | Line 77 my $cqf = q2cqf( $query ); |
77 | my $rs = $conn->search_pqf( $cqf ); | my $rs = $conn->search_pqf( $cqf ); |
78 | ||
79 | my $n = $rs->size(); | my $n = $rs->size(); |
80 | if ( $n > $max_res ) { | |
81 | warn "query returned $n results, fetching first $max_res\n"; | |
82 | $n = $max_res; | |
83 | } | |
84 | # fetch all results | # fetch all results |
85 | $rs->records(0, $n - 1, 0); | $rs->records(0, $n - 1, 0); |
86 |
|
ViewVC Help | |
Powered by ViewVC 1.1.26 |