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( |