Ignore:
Timestamp:
2004-10-12T12:19:22+13:00 (20 years ago)
Author:
kjdon
Message:

some mods, not sure what they are. will tidy them up soon, but didn't want to leave the package uncompilable so committing this now

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/greenstone3-extensions/vishnu/src/vishnu/builder/LuceneWrapper.java

    r8189 r8290  
    6464   
    6565    public void startIndexing() {
    66 
    67     if( inputDir == null || outputDir == null ){
    68         usage();
    69         System.exit(0);
    70     }
    71 
    72     /* check if index dir exists */
    73     File in = new File(inputDir);
    74     if (!in.isDirectory()) {
    75         System.err.println("input directory ("+inputDir+") not a directory, exiting...");
    76         System.exit(0);
    77     }
    78 
    79     /**** check if output directory exists, if not create it ****/ 
    80         File f = new File(outputDir);
    81         if( !f.exists() ){
    82         try {
    83         f.mkdirs();
    84         } catch (Exception e) {
    85         System.err.println("Couldn't create output directory "+outputDir);
    86         System.err.println(e);
    87         System.exit(0);
    88         }
    89     }
     66    initialize();
    9067    try {
    9168        IndexWriter writer = new IndexWriter(outputDir, new StandardAnalyzer(), true);
    9269        // this is a bit of a hack putting import here
    93         indexFiles(writer, in, "import/");
     70        indexFiles(writer, new File(inputDir), "import/");
    9471        writer.optimize();
    9572        writer.close();
Note: See TracChangeset for help on using the changeset viewer.