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

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

revision 191 by dpavlin, Fri May 23 21:05:42 2008 UTC revision 192 by dpavlin, Fri May 23 21:52:06 2008 UTC
# Line 74  sub search { Line 74  sub search {
74    
75          my $q = shift or die "no q?";          my $q = shift or die "no q?";
76    
77            my $full_q = "($q)";
78            my $uid = Jifty->web->current_user->id;
79            $full_q .= ' AND _owner_id:' . $uid if (defined $uid);
80    
81          my $index_path = Jifty::Util->app_root . '/var/invindex';          my $index_path = Jifty::Util->app_root . '/var/invindex';
82          my $searcher = KinoSearch::Searcher->new(          my $searcher = KinoSearch::Searcher->new(
83                  invindex => Grep::Search::KinoSearch::Schema->open( $index_path ), );                  invindex => Grep::Search::KinoSearch::Schema->open( $index_path ), );
84          $self->log->debug("$searcher created");          $self->log->debug("$searcher created");
85    
         my $full_q = "($q)";  
   
         my $uid = Jifty->web->current_user->id;  
         $full_q .= ' AND _owner_id:' . $uid if (defined $uid);  
   
86          $self->log->debug("searching for '$q' using $full_q");          $self->log->debug("searching for '$q' using $full_q");
87    
88          my $query_parser = KinoSearch::QueryParser->new(          my $query_parser = KinoSearch::QueryParser->new(

Legend:
Removed from v.191  
changed lines
  Added in v.192

  ViewVC Help
Powered by ViewVC 1.1.26