/[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 150 by dpavlin, Tue May 8 14:28:14 2007 UTC revision 151 by dpavlin, Sat Jun 9 10:27:03 2007 UTC
# Line 121  sub add { Line 121  sub add {
121          $self->invindexer->add_doc( $doc );          $self->invindexer->add_doc( $doc );
122    
123          $self->log->debug("added ", $i->id, " for user $uid to index");          $self->log->debug("added ", $i->id, " for user $uid to index");
124    
125            return 1;
126  }  }
127    
128  =head2 collection  =head2 collection
# Line 146  sub collection { Line 148  sub collection {
148                  invindex => Grep::Search::Schema->open( $self->index_path ), );                  invindex => Grep::Search::Schema->open( $self->index_path ), );
149          $self->log->debug("$searcher created");          $self->log->debug("$searcher created");
150    
151          my $full_q = "($q) AND _owner_id:" . Jifty->web->current_user->id;          my $full_q = "($q)";
152    
153            my $uid = Jifty->web->current_user->id;
154            $full_q .= ' AND _owner_id:' . $uid if ($uid);
155    
156          $self->log->debug("searching for '$q' using $full_q");          $self->log->debug("searching for '$q' using $full_q");
157          my $hits = $searcher->search(          my $hits = $searcher->search(
# Line 205  sub finish { Line 210  sub finish {
210    
211          undef $self;          undef $self;
212    
213          return;          return 1;
214  }  }
215    
216  =head2 snippet  =head2 snippet

Legend:
Removed from v.150  
changed lines
  Added in v.151

  ViewVC Help
Powered by ViewVC 1.1.26