Displaying 1 result from an estimated 1 matches for "index_data".
Did you mean:
index_date
2011 Apr 21
1
How to Retrieve content of the document?
...::Find;
my $DATABASE_DIR = '/home/rohit/Desktop/SET/DB';
my $db = Search::Xapian::WritableDatabase->new($DATABASE_DIR,
Search::Xapian::DB_CREATE_OR_OPEN) or
die "can't create write-able db object: $!\n";
my $dir = shift;
if (!$dir) {
print "usage: index_data.pl <dir>\n";
exit(1);
}
my $file;
my $doc;
my $line;
my @words;
my $tmp;
my $count = 0;
find(\&index, $dir);
sub index {
# only index regular text files
return unless -T $_;
$file = $_;
$doc = Search::Xapian::Document->new()
or die "can't create...