/[BackupPC]/trunk/lib/BackupPC/SearchLib.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/lib/BackupPC/SearchLib.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 303 by dpavlin, Sat Jan 28 16:45:46 2006 UTC revision 304 by dpavlin, Sat Jan 28 19:49:03 2006 UTC
# Line 251  sub getHyperEstraier_url($) { Line 251  sub getHyperEstraier_url($) {
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    
# Line 300  sub getFilesHyperEstraier($) { Line 300  sub getFilesHyperEstraier($) {
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
# Line 311  sub getFilesHyperEstraier($) { Line 311  sub getFilesHyperEstraier($) {
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                  }                  }
# Line 321  sub getFilesHyperEstraier($) { Line 321  sub getFilesHyperEstraier($) {
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) {

Legend:
Removed from v.303  
changed lines
  Added in v.304

  ViewVC Help
Powered by ViewVC 1.1.26