/[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 93 by dpavlin, Tue Nov 22 12:57:15 2005 UTC revision 94 by dpavlin, Tue Nov 22 12:57:20 2005 UTC
# Line 43  sub new { Line 43  sub new {
43          $self->config($config);          $self->config($config);
44    
45          my $log = $c->log;          my $log = $c->log;
46            $self->{log} = $log;
47    
48          my $est_cfg = $c->config->{hyperestraier};          my $est_cfg = $c->config->{hyperestraier};
49          $est_cfg->{'log'} = $log;          $est_cfg->{'log'} = $log;
# Line 51  sub new { Line 52  sub new {
52    
53          $self->{est} = new WebPAC::Search::Estraier( %{ $est_cfg } );          $self->{est} = new WebPAC::Search::Estraier( %{ $est_cfg } );
54    
 #       $c->stash->{est}->search(  
 #               query => $c->req->params->{Title},  
 #               max => 100,  
 #       );  
   
55          return $self;          return $self;
56    
57  }  }
# Line 63  sub new { Line 59  sub new {
59  sub search {  sub search {
60          my ( $self, $query ) = @_;          my ( $self, $query ) = @_;
61    
62            $self->{log}->debug("search got query: $query<--");
63    
64          my @results = $self->{est}->search(          my @results = $self->{est}->search(
65                  query => $query,                  query => $query,
66                  attr => [ '@uri' ],                  attr => [ '@uri' ],
67                  max => 100,                  max => 100,
68          );          );
69    
70          return \@results;          return @results;
71  }  }
72    
73    

Legend:
Removed from v.93  
changed lines
  Added in v.94

  ViewVC Help
Powered by ViewVC 1.1.26