--- zoom.sql	2007/04/26 20:43:00	5
+++ zoom.sql	2007/04/26 20:57:14	6
@@ -30,6 +30,7 @@
 as $$
 
 my $debug = 0;
+my $max_res = 100;
 
 my ( $server, $query ) = @_;
 
@@ -76,6 +77,10 @@
 my $rs = $conn->search_pqf( $cqf );
 
 my $n = $rs->size();
+if ( $n > $max_res ) {
+	warn "query returned $n results, fetching first $max_res\n";
+	$n = $max_res;
+}
 # fetch all results
 $rs->records(0, $n - 1, 0);
 
