/[Grep]/lib/Grep/Search.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 /lib/Grep/Search.pm

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

revision 109 by dpavlin, Wed Mar 14 18:46:37 2007 UTC revision 118 by dpavlin, Sun Apr 1 11:53:22 2007 UTC
# Line 2  package Grep::Search; Line 2  package Grep::Search;
2    
3  use strict;  use strict;
4  use warnings;  use warnings;
5  use base qw( Class::Accessor Jifty::Object );  use base qw( Class::Accessor );
6  Grep::Search->mk_accessors( qw( analyzer store writer create index_path ) );  Grep::Search->mk_accessors( qw( analyzer store writer create index_path ) );
7    
8  use Data::Dump qw/dump/;  use Data::Dump qw/dump/;
# Line 23  Grep::Search - full text search Line 23  Grep::Search - full text search
23    
24  =cut  =cut
25    
26    sub log { Jifty->web->log }
27    
28  sub new {  sub new {
29          my $class = shift;                  my $class = shift;        
30          my $self = $class->SUPER::new(@_);          my $self = $class->SUPER::new(@_);
# Line 48  sub new { Line 50  sub new {
50          return $self;          return $self;
51  }  }
52    
   
53  =head2 add  =head2 add
54    
55    $search->add( $record, $owner_id );    $search->add( $record, $owner_id );
# Line 181  sub collection { Line 182  sub collection {
182          undef $hits;          undef $hits;
183          undef $query;          undef $query;
184          undef $parser;          undef $parser;
         $searcher->close;  
185          undef $searcher;          undef $searcher;
186    
187            $self->log->debug("finished Lucene search");
188    
189          return $collection;          return $collection;
190  }  }
191    
# Line 200  sub finish { Line 202  sub finish {
202                  $self->writer->close;                  $self->writer->close;
203          }          }
204    
205  #       $self->writer( undef );          $self->log->debug("finish");
206  #       $self->store( undef );  
207  #       $self->create( undef );          undef $self;
 #       $self->analyzer( undef );  
208    
209          return;          return;
210  }  }

Legend:
Removed from v.109  
changed lines
  Added in v.118

  ViewVC Help
Powered by ViewVC 1.1.26