67 |
|
|
68 |
my @s_arr; # all queries are located here |
my @s_arr; # all queries are located here |
69 |
|
|
70 |
|
my @path_arr = $q->param('path'); |
71 |
|
my $full = $q->param('full'); |
72 |
|
|
73 |
for(my $i = 1; $i <=10; $i++) { |
for(my $i = 1; $i <=10; $i++) { |
74 |
|
|
75 |
return show_index($self, $i) if ($q->param("f".$i."_index")); |
return show_index($self, $i) if ($q->param("f".$i."_index")); |
118 |
|
|
119 |
}, |
}, |
120 |
#startnum => 0, |
#startnum => 0, |
121 |
maxhits => $MAX_HITS, |
maxhits => $MAX_HITS |
122 |
); |
); |
123 |
|
|
124 |
die $SWISH::errstr unless $sh; |
die $SWISH::errstr unless $sh; |
125 |
|
|
126 |
my $hits = $sh->query(join(" and ",@s_arr)) || 0; # FIX: and/or |
# construct swish query |
127 |
|
my $sw_q = join(" and ",@s_arr); |
128 |
|
if (@path_arr) { |
129 |
|
$sw_q .= "and (swishdocpath=\""; |
130 |
|
$sw_q .= join("\" or swishdocpath=\"",@path_arr); |
131 |
|
$sw_q .= "\")"; |
132 |
|
$tmpl->param('full',1); # show full records |
133 |
|
} |
134 |
|
|
135 |
|
my $hits = $sh->query($sw_q); |
136 |
|
|
137 |
$tmpl->param('hits',$hits); |
$tmpl->param('hits',$hits); |
138 |
$tmpl->param('search',join(" and ",@s_arr)); |
$tmpl->param('search',$sw_q); |
139 |
|
|
140 |
# create a Pager object |
# create a Pager object |
141 |
my $pager = HTML::Pager->new( |
my $pager = HTML::Pager->new( |