251 |
|
|
252 |
return unless $use_hest; |
return unless $use_hest; |
253 |
|
|
254 |
use Search::Estraier; |
use Search::Estraier 0.04; |
255 |
die "direct access to Hyper Estraier datatase is no longer supported. Please use estmaster\n" |
die "direct access to Hyper Estraier datatase is no longer supported. Please use estmaster\n" |
256 |
unless ($use_hest =~ m#^http://#); |
unless ($use_hest =~ m#^http://#); |
257 |
|
|
300 |
|
|
301 |
$cond->add_attr("shareid NUMEQ $shareid") if ($shareid); |
$cond->add_attr("shareid NUMEQ $shareid") if ($shareid); |
302 |
|
|
303 |
# $cond->set_max( $offset + $on_page ); |
$cond->set_max( $offset + $on_page ); |
304 |
$cond->set_options( SURE => 1 ); |
$cond->set_options( 'SURE' ); |
305 |
$cond->set_order( getSort('search', 'est', $param->{'sort'} ) ); |
$cond->set_order( getSort('search', 'est', $param->{'sort'} ) ); |
306 |
|
|
307 |
# get the result of search |
# get the result of search |
311 |
if ($hest_node_url) { |
if ($hest_node_url) { |
312 |
$result = $db->search($cond, 0); |
$result = $db->search($cond, 0); |
313 |
if ($result) { |
if ($result) { |
314 |
$hits = $result->doc_num; |
$hits = $result->hits; |
315 |
} else { |
} else { |
316 |
$hits = 0; |
$hits = 0; |
317 |
} |
} |
321 |
|
|
322 |
# for each document in result |
# for each document in result |
323 |
for my $i ($offset .. ($offset + $on_page - 1)) { |
for my $i ($offset .. ($offset + $on_page - 1)) { |
324 |
last if ($i >= $hits); |
last if ($i >= $result->doc_num); |
325 |
|
|
326 |
my $doc; |
my $doc; |
327 |
if ($hest_node_url) { |
if ($hest_node_url) { |