Changeset 27329 for main/trunk/greenstone2/perllib/lucenebuilder.pm
- Timestamp:
- 2013-05-14T11:11:21+12:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/lucenebuilder.pm
r27301 r27329 47 47 no strict 'refs'; 48 48 use util; 49 use FileUtils; 49 50 50 51 sub BEGIN { … … 64 65 # If ENABLE_LUCENE was turned off during GS compilation, then we won't be able to 65 66 # continue. Check for existence of LuceneWrapper to see if Lucene was disabled. 66 my $lucene = & util::filename_cat($ENV{'GSDLHOME'},"bin","java","LuceneWrapper.jar");67 my $lucene = &FileUtils::filenameConcatenate($ENV{'GSDLHOME'},"bin","java","LuceneWrapper3.jar"); 67 68 if (! -f $lucene) { 68 69 die "***** ERROR: $lucene does not exist\n"; … … 74 75 75 76 # So where is lucene_passes.pl anyway? 76 my $lucene_passes_script = & util::filename_cat($scriptdir, "lucene_passes.pl");77 my $lucene_passes_script = &FileUtils::filenameConcatenate($scriptdir, "lucene_passes.pl"); 77 78 78 79 # So tack perl on the beginning to ensure execution … … 109 110 if (defined $buildcfg->{'indexfields'}) { 110 111 foreach $field (@{$buildcfg->{'indexfields'}}) { 111 $self->{'buildproc'}->{'indexfields'}->{$field} = 1; 112 # extraindexfields is only supposed to have extra ones in it, not those already specified in indexes. And this list has all indexes in it. But we do a check before including things from extraindexfields whether it was specified in indexes, so it all ok. 113 $self->{'buildproc'}->{'extraindexfields'}->{$field} = 1; 112 114 } 113 115 } … … 116 118 foreach $field (@{$buildcfg->{'indexfieldmap'}}) { 117 119 my ($f, $v) = $field =~ /^(.*)\-\>(.*)$/; 118 $self->{'buildproc'}->{'indexfieldmap'}->{$f} = $v; 119 $self->{'buildproc'}->{'indexfieldmap'}->{$v} = 1; 120 $self->{'buildproc'}->{'fieldnamemap'}->{$f} = $v; 121 $self->{'buildproc'}->{'fieldnamemap'}->{$v} = 1; 122 $self->{'buildproc'}->{'allindexfields'}->{$f} = 1; 120 123 } 121 124 } … … 151 154 152 155 # the text directory 153 my $text_dir = & util::filename_cat($self->{'build_dir'}, "text");154 my $build_dir = & util::filename_cat($self->{'build_dir'},"");155 & util::mk_all_dir($text_dir);156 my $text_dir = &FileUtils::filenameConcatenate($self->{'build_dir'}, "text"); 157 my $build_dir = &FileUtils::filenameConcatenate($self->{'build_dir'},""); 158 &FileUtils::makeAllDirectories ($text_dir); 156 159 157 160 my $osextra = ""; … … 209 212 $self->{'buildproc'}->set_index ($textindex); 210 213 $self->{'buildproc'}->set_indexing_text (0); 211 #$self->{'buildproc'}->set_indexfieldmap ($self->{'indexfieldmap'});212 214 $self->{'buildproc'}->set_levels ($levels); 213 215 $self->{'buildproc'}->set_db_level ($db_level); … … 306 308 # get the full index directory path and make sure it exists 307 309 my $indexdir = $self->{'index_mapping'}->{$index}; 308 & util::mk_all_dir (&util::filename_cat($build_dir, $indexdir));310 &FileUtils::makeAllDirectories (&FileUtils::filenameConcatenate($build_dir, $indexdir)); 309 311 310 312 # get any os specific stuff … … 433 435 434 436 # Get info database file path 435 my $text_directory_path = & util::filename_cat($self->{'build_dir'}, "text");437 my $text_directory_path = &FileUtils::filenameConcatenate($self->{'build_dir'}, "text"); 436 438 my $infodb_file_path = &dbutil::get_infodb_file_path($self->{'infodbtype'}, $self->{'collection'}, $text_directory_path); 437 439 … … 460 462 # don't expect to pipe anything to the database so we can do away with the 461 463 # complex output handle. 462 my $assocdir = & util::filename_cat($self->{'build_dir'}, "assoc");463 & util::mk_all_dir($assocdir);464 my $assocdir = &FileUtils::filenameConcatenate($self->{'build_dir'}, "assoc"); 465 &FileUtils::makeAllDirectories ($assocdir); 464 466 $self->{'buildproc'}->set_mode ('incinfodb'); # Very Important 465 467 $self->{'buildproc'}->set_assocdir ($assocdir);
Note:
See TracChangeset
for help on using the changeset viewer.