Changeset 5768
- Timestamp:
- 2003-10-30T11:48:52+13:00 (20 years ago)
- Location:
- trunk/gsdl/perllib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/mgbuilder.pm
r5225 r5768 80 80 'no_text'=>$no_text, 81 81 'failhandle'=>$failhandle, 82 'notbuilt'=> []# indexes not built82 'notbuilt'=>{} # indexes not built 83 83 }, $class; 84 84 … … 305 305 foreach $checkstr (@{$self->{'collect_cfg'}->{'dontbuild'}}) { 306 306 if ($index =~ /^$checkstr$/) { 307 push (@{$self->{'notbuilt'}}, $self->{'index_mapping'}->{$index}); 307 #push (@{$self->{'notbuilt'}}, $self->{'index_mapping'}->{$index}); 308 $self->{'notbuilt'}->{$index} = 1; 308 309 return 0; 309 310 } … … 583 584 $self->print_stats(); 584 585 586 # now we check to see if the required files have been produced - if not we quit building this index so the whole process doesn't crap out. 587 # we check on the .id file - index dictionary 588 my $dict_file = "$fullindexprefix.id"; 589 if (!-e $dict_file) { 590 print $outhandle "mgbuilder::build_index - Couldn't create index $index\n"; 591 $self->{'notbuilt'}->{$index}=1; 592 return; 593 } 585 594 if (!$self->{'debug'}) { 586 595 # create the perfect hash function … … 825 834 826 835 # store the mapping between the index names and the directory names 836 # the index map is used to determine what indexes there are, so any that are not built should not be put into the map. 827 837 my @indexmap = (); 828 838 foreach $index (@{$self->{'index_mapping'}->{'indexmaporder'}}) { 829 push (@indexmap, "$index\-\>$self->{'index_mapping'}->{'indexmap'}->{$index}"); 839 if (not defined ($self->{'notbuilt'}->{$index})) { 840 push (@indexmap, "$index\-\>$self->{'index_mapping'}->{'indexmap'}->{$index}"); 841 } 830 842 } 831 843 $build_cfg->{'indexmap'} = \@indexmap; … … 845 857 $build_cfg->{'languagemap'} = \@languagemap if scalar (@languagemap); 846 858 847 $build_cfg->{'notbuilt'} = $self->{'notbuilt'} if scalar @{$self->{'notbuilt'}}; 848 859 #$build_cfg->{'notbuilt'} = $self->{'notbuilt'} if scalar @{$self->{'notbuilt'}}; 860 my @notbuilt = (); 861 foreach $nb (keys %{$self->{'notbuilt'}}) { 862 push (@notbuilt, $nb); 863 } 864 $build_cfg->{'notbuilt'} = \@notbuilt if scalar (@notbuilt); 849 865 $build_cfg->{'maxnumeric'} = 4; 850 866 if (defined($self->{'collect_cfg'}->{'maxnumeric'}) && -
trunk/gsdl/perllib/mgppbuilder.pm
r5643 r5768 126 126 'outhandle'=>$outhandle, 127 127 'no_text'=>$no_text, 128 'notbuilt'=> [], # indexes not built128 'notbuilt'=>{}, # indexes not built 129 129 'indexfieldmap'=>\%static_indexfield_map 130 130 }, $class; … … 396 396 foreach $checkstr (@{$self->{'collect_cfg'}->{'dontbuild'}}) { 397 397 if ($index =~ /^$checkstr$/) { 398 push (@{$self->{'notbuilt'}}, $self->{'index_mapping'}->{$index}); 398 #push (@{$self->{'notbuilt'}}, $self->{'index_mapping'}->{$index}); 399 $self->{'notbuilt'}->{$index} = 1; 399 400 return 0; 400 401 } … … 680 681 681 682 $self->print_stats(); 683 684 # now we check to see if the required files have been produced - if not we quit building this index so the whole process doesn't crap out. 685 # we check on the .id file - index dictionary 686 my $dict_file = "$fullindexprefix.id"; 687 if (!-e $dict_file) { 688 print $outhandle "mgppbuilder::build_index - Couldn't create index $index\n"; 689 $self->{'notbuilt'}->{$index}=1; 690 return; 691 } 682 692 683 693 if (!$self->{'debug'}) { … … 1059 1069 my @indexmap = (); 1060 1070 foreach $index (@{$self->{'index_mapping'}->{'indexmaporder'}}) { 1061 push (@indexmap, "$index\-\>$self->{'index_mapping'}->{'indexmap'}->{$index}"); 1071 if (not defined ($self->{'notbuilt'}->{$index})) { 1072 push (@indexmap, "$index\-\>$self->{'index_mapping'}->{'indexmap'}->{$index}"); 1073 } 1062 1074 } 1063 1075 $build_cfg->{'indexmap'} = \@indexmap; … … 1077 1089 $build_cfg->{'languagemap'} = \@languagemap if scalar (@languagemap); 1078 1090 1079 $build_cfg->{'notbuilt'} = $self->{'notbuilt'}; 1091 #$build_cfg->{'notbuilt'} = $self->{'notbuilt'}; 1092 my @notbuilt = (); 1093 foreach $nb (keys %{$self->{'notbuilt'}}) { 1094 push (@notbuilt, $nb); 1095 } 1096 $build_cfg->{'notbuilt'} = \@notbuilt if scalar (@notbuilt); 1080 1097 1081 1098 # write out the build information
Note:
See TracChangeset
for help on using the changeset viewer.