--- trunk/all2xml.pl 2003/11/24 21:54:19 178 +++ trunk/all2xml.pl 2003/11/25 20:19:03 181 @@ -102,20 +102,20 @@ } my @sorted_tags; - if ($cache->{tags_by_order}->{$type}) { - @sorted_tags = @{$cache->{tags_by_order}->{$type}}; + if ($cache->{tags_by_order}) { + @sorted_tags = @{$cache->{tags_by_order}}; } else { @sorted_tags = sort by_order keys %{$config->{indexer}}; - $cache->{tags_by_order}->{$type} = \@sorted_tags; + $cache->{tags_by_order} = \@sorted_tags; } # lookup key my $lookup_key; # cache for field in pages - $cache->{display_data} = (); - $cache->{swish_data} = (); - $cache->{swish_exact_data} = (); + delete $cache->{display_data}; + delete $cache->{swish_data}; + delete $cache->{swish_exact_data}; my @page_fields; # names of fields @@ -175,11 +175,10 @@ my ($s,$se,$d,$i,$il) = (1,0,1,0,0); $s = 0 if (lc($x->{type}) eq "display"); $d = 0 if (lc($x->{type}) eq "swish"); - $se = 1 if (lc($x->{type}) eq "swish_exact"); - ($s,$d,$i) = (0,0,1) if (lc($x->{type}) eq "index"); + ($s,$se,$d,$i) = (0,0,0,1) if (lc($x->{type}) eq "index"); + ($s,$se,$d,$i) = (0,1,0,0) if (lc($x->{type}) eq "swish_exact"); $il = 1 if (lc($x->{type}) =~ /^lookup/); - # what will separate last line from this one? if ($display_data && $x->{append} && $x->{append} eq "1") { $line_delimiter = ' '; @@ -566,6 +565,9 @@ # now read database print STDERR "using: $type...\n"; + # erase cache for tags by order in this database + delete $cache->{tags_by_order}; + if ($type_base eq "isis") { my $isis_db = $cfg -> val($database, 'isis_db') || die "$database doesn't have 'isis_db' defined!";