Changeset 4192
- Timestamp:
- 2003-04-18T14:23:57+12:00 (21 years ago)
- Location:
- trunk/gsdl/perllib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/colcfg.pm
r2772 r4192 43 43 # {'textcompress'}->string 44 44 # {'buildtype'}->string 45 # {'maxnumeric'}->string 45 46 46 47 # {'maintainer'}->array of strings … … 72 73 q/textcompress|buildtype|no_text|keepold|gzip/ . 73 74 q/verbosity|allclassifications|OIDtype|maxdocs|/ . 74 q/groupsize|sortmeta|debug|mode|create_images)$/, 75 q/groupsize|sortmeta|debug|mode|create_images|/ . 76 q/maxnumeric)$/, 75 77 q/(maintainer|languages|indexsubcollections|/ . 76 78 q/indexes|dontbuild|dontgdbm|mirror|phind|levels)$/, … … 86 88 q/^(creator|public|defaultindex|importdir|/ . 87 89 q/archivedir|cachedir|builddir|removeold|/ . 88 q/textcompress|buildtype|collectdir|no_text|allclassifications)$/, 90 q/textcompress|buildtype|collectdir|no_text|/ . 91 q/allclassifications|maxnumeric)$/, 89 92 q/^(maintainer|languages|indexsubcollections|/ . 90 93 q/indexes|dontbuild|dontgdbm|levels)$/, … … 104 107 # {'numwords'}->string 105 108 # {'numbytes'}->string 109 # {'maxnumeric'}->string 106 110 # {'indexfields'}->array of strings 107 111 # {'indexfieldmap'}->array of strings in the form "field->FI" … … 112 116 113 117 return &cfgread::read_cfg_file ($filename, 114 q/^(builddate|buildtype|numdocs|numwords|numbytes )$/,118 q/^(builddate|buildtype|numdocs|numwords|numbytes|maxnumeric)$/, 115 119 q/^(metadata|languages|indexfields|indexfieldmap|indexmap)$/); 116 120 } … … 120 124 121 125 &cfgread::write_cfg_file($filename, $data, 122 q/^(builddate|buildtype|numdocs|numwords|numbytes )$/,126 q/^(builddate|buildtype|numdocs|numwords|numbytes|maxnumeric)$/, 123 127 q/^(metadata|languages|indexfieldsindexfieldmap|indexmap)$/); 124 128 } -
trunk/gsdl/perllib/mgbuilder.pm
r3115 r4192 202 202 my $outhandle = $self->{'outhandle'}; 203 203 204 my $maxnumeric = 4; 205 if (defined($self->{'collect_cfg'}->{'maxnumeric'}) && 206 $self->{'collect_cfg'}->{'maxnumeric'} =~ /^\d+$/) { 207 $maxnumeric = $self->{'collect_cfg'}->{'maxnumeric'}; 208 } 209 204 210 &util::mk_all_dir (&util::filename_cat($self->{'build_dir'}, "text")); 205 211 my $basefilename = "text/$self->{'collection'}"; … … 224 230 } else { 225 231 if (!-e "$mg_passes_exe" || 226 !open (PIPEOUT, "| mg_passes$exe -f \"$fulltextprefix\" -b $maxdocsize -T1 $osextra")) {232 !open (PIPEOUT, "| mg_passes$exe -f \"$fulltextprefix\" -b $maxdocsize -T1 -M $maxnumeric $osextra")) { 227 233 die "mgbuilder::compress_text - couldn't run $mg_passes_exe\n"; 228 234 } … … 264 270 # -b $maxdocsize sets the maximum document size to be 12 meg 265 271 if (!-e "$mg_passes_exe" || 266 !open ($handle, "| mg_passes$exe -f \"$fulltextprefix\" -b $maxdocsize -T2 $osextra")) {272 !open ($handle, "| mg_passes$exe -f \"$fulltextprefix\" -b $maxdocsize -T2 -M $maxnumeric $osextra")) { 267 273 die "mgbuilder::compress_text - couldn't run $mg_passes_exe\n"; 268 274 } … … 475 481 &util::filename_cat ($exedir, "mg_stem_idx$exe"); 476 482 483 my $maxnumeric = 4; 484 if (defined($self->{'collect_cfg'}->{'maxnumeric'}) && 485 $self->{'collect_cfg'}->{'maxnumeric'} =~ /^\d+$/) { 486 $maxnumeric = $self->{'collect_cfg'}->{'maxnumeric'}; 487 } 488 477 489 my $osextra = ""; 478 490 if ($ENV{'GSDLOS'} =~ /^windows$/i) { … … 538 550 if (!-e "$mg_passes_exe" || 539 551 !open (PIPEOUT, "| mg_passes$exe -f \"$fullindexprefix\" -b $maxdocsize " . 540 "-$index_level -m 32 -s 0 -G -t 10 -N1 $osextra")) {552 "-$index_level -m 32 -s 0 -G -t 10 -N1 -M $maxnumeric $osextra")) { 541 553 die "mgbuilder::build_index - couldn't run $mg_passes_exe\n"; 542 554 } … … 567 579 if (!-e "$mg_passes_exe" || 568 580 !open ($handle, "| mg_passes$exe -f \"$fullindexprefix\" -b $maxdocsize " . 569 "-$index_level -c 3 -G -t 10 -N2 $osextra")) {581 "-$index_level -c 3 -G -t 10 -N2 -M $maxnumeric $osextra")) { 570 582 die "mgbuilder::build_index - couldn't run $mg_passes_exe\n"; 571 583 } … … 822 834 $build_cfg->{'notbuilt'} = $self->{'notbuilt'} if scalar @{$self->{'notbuilt'}}; 823 835 836 $build_cfg->{'maxnumeric'} = 4; 837 if (defined($self->{'collect_cfg'}->{'maxnumeric'}) && 838 $self->{'collect_cfg'}->{'maxnumeric'} =~ /^\d+$/) { 839 $build_cfg->{'maxnumeric'} = $self->{'collect_cfg'}->{'maxnumeric'}; 840 } 841 824 842 # write out the build information 825 843 &cfgread::write_cfg_file("$self->{'build_dir'}/build.cfg", $build_cfg, 826 '^(builddate|numdocs|numbytes|numwords|numsections )$',844 '^(builddate|numdocs|numbytes|numwords|numsections|maxnumeric)$', 827 845 '^(indexmap|subcollectionmap|languagemap|notbuilt)$'); 828 846
Note:
See TracChangeset
for help on using the changeset viewer.