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 |
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( |
210 |
|
|
211 |
undef $self; |
undef $self; |
212 |
|
|
213 |
return; |
return 1; |
214 |
} |
} |
215 |
|
|
216 |
=head2 snippet |
=head2 snippet |