102 |
} |
} |
103 |
|
|
104 |
my @sorted_tags; |
my @sorted_tags; |
105 |
if ($cache->{tags_by_order}->{$type}) { |
if ($cache->{tags_by_order}) { |
106 |
@sorted_tags = @{$cache->{tags_by_order}->{$type}}; |
@sorted_tags = @{$cache->{tags_by_order}}; |
107 |
} else { |
} else { |
108 |
@sorted_tags = sort by_order keys %{$config->{indexer}}; |
@sorted_tags = sort by_order keys %{$config->{indexer}}; |
109 |
$cache->{tags_by_order}->{$type} = \@sorted_tags; |
$cache->{tags_by_order} = \@sorted_tags; |
110 |
} |
} |
111 |
|
|
112 |
# lookup key |
# lookup key |
113 |
my $lookup_key; |
my $lookup_key; |
114 |
|
|
115 |
# cache for field in pages |
# cache for field in pages |
116 |
$cache->{display_data} = (); |
delete $cache->{display_data}; |
117 |
$cache->{swish_data} = (); |
delete $cache->{swish_data}; |
118 |
$cache->{swish_exact_data} = (); |
delete $cache->{swish_exact_data}; |
119 |
my @page_fields; # names of fields |
my @page_fields; # names of fields |
120 |
|
|
121 |
|
|
175 |
my ($s,$se,$d,$i,$il) = (1,0,1,0,0); |
my ($s,$se,$d,$i,$il) = (1,0,1,0,0); |
176 |
$s = 0 if (lc($x->{type}) eq "display"); |
$s = 0 if (lc($x->{type}) eq "display"); |
177 |
$d = 0 if (lc($x->{type}) eq "swish"); |
$d = 0 if (lc($x->{type}) eq "swish"); |
178 |
$se = 1 if (lc($x->{type}) eq "swish_exact"); |
($s,$se,$d,$i) = (0,0,0,1) if (lc($x->{type}) eq "index"); |
179 |
($s,$d,$i) = (0,0,1) if (lc($x->{type}) eq "index"); |
($s,$se,$d,$i) = (0,1,0,0) if (lc($x->{type}) eq "swish_exact"); |
180 |
$il = 1 if (lc($x->{type}) =~ /^lookup/); |
$il = 1 if (lc($x->{type}) =~ /^lookup/); |
181 |
|
|
|
|
|
182 |
# what will separate last line from this one? |
# what will separate last line from this one? |
183 |
if ($display_data && $x->{append} && $x->{append} eq "1") { |
if ($display_data && $x->{append} && $x->{append} eq "1") { |
184 |
$line_delimiter = ' '; |
$line_delimiter = ' '; |
565 |
# now read database |
# now read database |
566 |
print STDERR "using: $type...\n"; |
print STDERR "using: $type...\n"; |
567 |
|
|
568 |
|
# erase cache for tags by order in this database |
569 |
|
delete $cache->{tags_by_order}; |
570 |
|
|
571 |
if ($type_base eq "isis") { |
if ($type_base eq "isis") { |
572 |
|
|
573 |
my $isis_db = $cfg -> val($database, 'isis_db') || die "$database doesn't have 'isis_db' defined!"; |
my $isis_db = $cfg -> val($database, 'isis_db') || die "$database doesn't have 'isis_db' defined!"; |