115 |
foreach my $ds (@ds) { |
foreach my $ds (@ds) { |
116 |
next if (! $ds->{'swish'}); |
next if (! $ds->{'swish'}); |
117 |
|
|
118 |
|
# strip all non word characters from beginning or end |
119 |
|
# of word |
120 |
|
my $words = join(" ",@{$ds->{'swish'}}); |
121 |
|
$words =~ s/^\W+//; |
122 |
|
$words =~ s/\W*\s+\W*/ /g; |
123 |
|
$words =~ s/\W+$//; |
124 |
|
|
125 |
$index->insert( |
$index->insert( |
126 |
index_name => $ds->{'tag'}, |
index_name => $ds->{'tag'}, |
127 |
path => $f, |
#path => $f, |
128 |
|
path => $webpac->mfn, |
129 |
headline => $headline, |
headline => $headline, |
130 |
words => join(" ",@{$ds->{'swish'}}) |
words => $words, |
131 |
); |
); |
132 |
} |
} |
133 |
|
|