Changeset 27331

Show
Ignore:
Timestamp:
14.05.2013 11:19:43 (6 years ago)
Author:
kjdon
Message:

upgrading gs2 to use lucene 3 instead of lucene2

Location:
main/trunk/greenstone2/bin/script
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/bin/script/lucene_passes.pl

    r21323 r27331  
    3636use strict; 
    3737use util; 
    38  
     38use FileUtils; 
    3939 
    4040sub open_java_lucene 
     
    4242  my ($doc_tag_level,$full_builddir,$indexdir,$java_lucene_options) = @_; 
    4343 
    44   # Is there a collection-specific bin/java/LuceneWrapper.jar file? 
    45   my $bin_java = &util::filename_cat($ENV{'GSDLCOLLECTDIR'},"bin","java"); 
    46   my $classpath = &util::filename_cat($bin_java,"LuceneWrapper.jar"); 
     44  # Is there a collection-specific bin/java/LuceneWrapper3.jar file? 
     45  my $bin_java = &FileUtils::filenameConcatenate($ENV{'GSDLCOLLECTDIR'},"bin","java"); 
     46  my $classpath = &FileUtils::filenameConcatenate($bin_java,"LuceneWrapper3.jar"); 
    4747  if (!-f $classpath) 
    4848  { 
    4949      # No, so use the Greenstone one 
    50       $bin_java = &util::filename_cat($ENV{'GSDLHOME'},"bin","java"); 
    51       $classpath = &util::filename_cat($bin_java,"LuceneWrapper.jar"); 
     50      $bin_java = &FileUtils::filenameConcatenate($ENV{'GSDLHOME'},"bin","java"); 
     51      $classpath = &FileUtils::filenameConcatenate($bin_java,"LuceneWrapper3.jar"); 
    5252      if(!-f $classpath) { 
    5353      die "***** ERROR: $classpath does not exist\n";      
     
    5555  } 
    5656 
    57   my $java_lucene = "java -classpath \"$classpath\" org.greenstone.LuceneWrapper.GS2LuceneIndexer"; 
     57  my $java_lucene = "java -classpath \"$classpath\" org.greenstone.LuceneWrapper3.GS2LuceneIndexer"; 
    5858  my $java_cmd = "$java_lucene $java_lucene_options $doc_tag_level \"$full_builddir\" $indexdir"; 
    5959 
     
    7474    my $dir_sep = &util::get_os_dirsep(); 
    7575 
    76     my $full_output_filename = &util::filename_cat($full_textdir,$output_filename); 
     76    my $full_output_filename = &FileUtils::filenameConcatenate($full_textdir,$output_filename); 
    7777    my ($full_output_dir) = ($full_output_filename =~ m/^(.*$dir_sep)/x); 
    78     &util::mk_all_dir($full_output_dir); 
     78    &FileUtils::makeAllDirectories($full_output_dir); 
    7979 
    8080    open(DOCOUT,">$full_output_filename") 
     
    9393 
    9494    my $full_output_filename 
    95     = &util::filename_cat($full_textdir,$output_filename); 
     95    = &FileUtils::filenameConcatenate($full_textdir,$output_filename); 
    9696 
    9797    `gzip $full_output_filename`; 
     
    208208 
    209209  print STDERR "Monitoring for input!\n"; 
    210   my $full_textdir = &util::filename_cat($full_builddir,"text"); 
     210  my $full_textdir = &FileUtils::filenameConcatenate($full_builddir,"text"); 
    211211  monitor_xml_stream($mode, $full_textdir); 
    212212 
  • main/trunk/greenstone2/bin/script/lucene_query.pl

    r27069 r27331  
    6666 
    6767    my $java = &get_java_path(); 
    68     my $classpath = &util::filename_cat($ENV{'GSDLHOME'}, "bin", "java", "LuceneWrapper.jar"); 
    69     my $java_lucene = "\"$java\" -classpath \"$classpath\" org.greenstone.LuceneWrapper.GS2LuceneQuery"; 
     68    my $classpath = &util::filename_cat($ENV{'GSDLHOME'}, "bin", "java", "LuceneWrapper3.jar"); 
     69    my $java_lucene = "\"$java\" -classpath \"$classpath\" org.greenstone.LuceneWrapper3.GS2LuceneQuery"; 
    7070 
    7171    my $cmd = "| " . $java_lucene . " \"" . $full_indexdir . "\"";