/[webpac2]/Webpacus/lib/Webpacus/Model/WebPAC.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 /Webpacus/lib/Webpacus/Model/WebPAC.pm

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

revision 420 by dpavlin, Sun Mar 12 21:50:26 2006 UTC revision 421 by dpavlin, Sun Mar 12 22:34:53 2006 UTC
# Line 250  sub search { Line 250  sub search {
250          $log->debug( sprintf("search took %.6fs and returned $hits hits.", $times->{est}) );          $log->debug( sprintf("search took %.6fs and returned $hits hits.", $times->{est}) );
251    
252          $self->{hints} = $result->{hints};          $self->{hints} = $result->{hints};
253          $log->dumper($self->{hints}, 'original hints' );          #$log->dumper($self->{hints}, 'original hints' );
254    
255          #          #
256          # fetch results          # fetch results
# Line 355  sub hints { Line 355  sub hints {
355    
356          while (my ($key,$val) = each %{ $self->{hints} }) {          while (my ($key,$val) = each %{ $self->{hints} }) {
357    
358                    #$self->{log}->debug("current hint $key = $val");
359    
360                  if ($key =~ m/^(?:HITS*|TIME|DOCNUM|WORDNUM)$/) {                  if ($key =~ m/^(?:HITS*|TIME|DOCNUM|WORDNUM)$/) {
361                          $hints->{ lc($key) } = $val;                          $hints->{ lc($key) } = $val;
362                  } elsif ($key =~ m/^HINT#/) {                  } elsif ($key =~ m/^HINT#/) {
# Line 364  sub hints { Line 366  sub hints {
366                          my ($url,undef,undef,undef,undef,undef,$results) = split(/\t/,$val,7);                          my ($url,undef,undef,undef,undef,undef,$results) = split(/\t/,$val,7);
367                          if ($url =~ m#/node/(.+)$#) {                          if ($url =~ m#/node/(.+)$#) {
368                                  $hints->{node}->{$1} = $results;                                  $hints->{node}->{$1} = $results;
369                            } else {
370                                    $self->{log}->debug("url $url doesn't have /node/ in it!");
371                          }                          }
372                    } else {
373                            $self->{log}->debug("unknown hint $key = $val");
374                  }                  }
375    
376          }          }
377    
378          $self->{log}->dumper($hints, 'model hints' );          $self->{log}->dumper($hints, 'model hints' );

Legend:
Removed from v.420  
changed lines
  Added in v.421

  ViewVC Help
Powered by ViewVC 1.1.26