--- trunk2/all2all.pl 2004/09/05 21:25:10 409 +++ trunk2/all2all.pl 2004/09/05 21:40:57 410 @@ -13,10 +13,11 @@ use lib './lib'; use WebPAC; use WebPAC::jsFind; +use WebPAC::Index; my $webpac = new WebPAC( code_page => 'ISO-8859-2', -# limit_mfn => 100, + limit_mfn => 100, # debug => 1, ) || die; @@ -27,6 +28,8 @@ keys => 80, ) || die; +my $thes; + $|=1; my $maxmfn = $webpac->open_isis( @@ -91,6 +94,18 @@ ); } + # save into sorted index (thesaurus) + foreach my $ds (@ds) { + next if (! $ds->{'index'}); + + $thes->{$ds->{'tag'}} ||= new WebPAC::Index; + + $thes->{$ds->{'tag'}}->insert( + path => $f, + headline => $headline, + ); + } + # print Dumper(\@ds); } @@ -98,6 +113,9 @@ if ($log->is_debug) { $log->debug("lookup hash: ",Dumper($webpac->{'lookup'})); $log->debug("data hash: ",Dumper($webpac->{'data'})); + foreach my $t (keys %{$thes}) { + $log->debug("thesaurus $t hash: ",Dumper($thes->{$t})); + } } $index->close;