/[Grep]/bin/reindex.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /bin/reindex.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 110 - (hide annotations)
Wed Mar 14 20:02:19 2007 UTC (17 years, 1 month ago) by dpavlin
File MIME type: text/plain
File size: 485 byte(s)
another bunch of various tweaks, but Lucene still doesn't lock index right
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 dpavlin 110 my $search = Grep::Search->new();
22    
23 dpavlin 47 while ( my $i = $coll->next ) {
24    
25 dpavlin 110 $search->add( $i, $i->in_feed->owner->id );
26 dpavlin 47
27     print $i->id, ' ';
28     }
29    
30     print "\n";
31    
32 dpavlin 110 $search->finish;

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26