Parent Directory | Revision Log
use real full-text search engine (Lucene in this case) for Search action, added Grep::Search helper object
1 | dpavlin | 47 | #!/usr/bin/perl |
2 | |||
3 | # helper script to re-index full text index | ||
4 | |||
5 | use strict; | ||
6 | |||
7 | use lib 'lib'; | ||
8 | |||
9 | use Jifty; | ||
10 | use Lucene; | ||
11 | use Grep::Search; | ||
12 | use Data::Dump qw/dump/; | ||
13 | |||
14 | BEGIN { Jifty->new; }; | ||
15 | |||
16 | my $coll = Grep::Model::ItemCollection->new( results_are_readable => 1 ); | ||
17 | $coll->unlimit; | ||
18 | |||
19 | print "indexing ", $coll->count, " items "; | ||
20 | |||
21 | while ( my $i = $coll->next ) { | ||
22 | |||
23 | Grep::Search->add( $i ); | ||
24 | |||
25 | print $i->id, ' '; | ||
26 | } | ||
27 | |||
28 | print "\n"; | ||
29 | |||
30 | Grep::Search->finish; |
Name | Value |
---|---|
svn:executable | * |
ViewVC Help | |
Powered by ViewVC 1.1.26 |