1 |
# -*- Mode: Perl -*- |
# -*- Mode: Perl -*- |
2 |
# $Basename: index_mail $ |
# $Basename: index_mail $ |
3 |
# $Revision: 1.1 $ |
# $Revision: 1.2 $ |
4 |
# Author : Ulrich Pfeifer |
# Author : Ulrich Pfeifer |
5 |
# Created On : Fri Apr 7 13:45:50 2000 |
# Created On : Fri Apr 7 13:45:50 2000 |
6 |
# Last Modified By: Ulrich Pfeifer |
# Last Modified By: Ulrich Pfeifer |
7 |
# Last Modified On: Fri Dec 29 16:07:43 2000 |
# Last Modified On: Fri Dec 29 17:07:26 2000 |
8 |
# Language : CPerl |
# Language : CPerl |
9 |
# |
# |
10 |
# (C) Copyright 2000, UUNET Deutschland GmbH, Germany |
# (C) Copyright 2000, UUNET Deutschland GmbH, Germany |
78 |
or die "Couldn't tie to file: $!\n"; |
or die "Couldn't tie to file: $!\n"; |
79 |
|
|
80 |
my $tb = $db->create_table(name => $OPT{table}, |
my $tb = $db->create_table(name => $OPT{table}, |
81 |
attr => ['docid', 'headline', 'text'], |
attr => ['from', 'to', 'subject', 'article', 'docid', 'headline'], |
82 |
layout => $layout, |
layout => $layout, |
83 |
access => $access, |
access => $access, |
84 |
invindex => |
invindex => |
95 |
my $record = $layout->split($value); |
my $record = $layout->split($value); |
96 |
my $headline = $record->{subject}; |
my $headline = $record->{subject}; |
97 |
$headline =~ s/\s+/ /sg; |
$headline =~ s/\s+/ /sg; |
98 |
printf "%s\n", substr($headline,0,80); |
#printf "%s\n", substr($headline,0,80); |
99 |
$tb->insert('docid' => $did, |
$tb->insert('docid' => $did, |
100 |
headline => $headline, |
headline => $headline, |
101 |
%{$record}); |
%{$record}); |
102 |
|
print $did,"\n" if $did =~ / 0 0/; |
103 |
} |
} |
104 |
$tb->set(top=>1); |
$tb->set(top=>1); |
105 |
$tb->close(); |
$tb->close(); |