catch (IOException ie) { logger.error("IO Error: Could not read spell train file " + ie.getMessage()); }
catch (ClassNotFoundException ce) { logger.error("Class error: " + ce.getMessage()); }
}
//*-- Create the databases, if necessary
DbTools dbt = Constants.getDbt();
boolean createFlag = true; boolean dupFlag = false;
if (freshCrawl)
{
//*-- initialize and create a new database for the list of extracted files and a secondary
//*-- database for the file signature
dbt.dropDB(Constants.EXT_FILES_DB);
dbt.createDB(Constants.EXT_FILES_DB, createFlag, dupFlag);
logger.info("Created py. database " + Constants.EXT_FILES_DB);
dbt.dropSecDB(Constants.EXT_FILES_SECDB);
SecKeyDoc skd = new SecKeyDoc( new IndexableDoc().getBdbBinding() );
if (dbt.createSecDB(Constants.EXT_FILES_SECDB, false, skd))
logger.info("Created sec. database " + Constants.EXT_FILES_SECDB);
dbt.closeSecDB(); dbt.closeDB();
//*-- create the messages database
dbt.dropDB(Constants.EXT_MESSAGES_DB);
dbt.createDB(Constants.EXT_MESSAGES_DB, createFlag, dupFlag);
logger.info("Created py. database " + Constants.EXT_MESSAGES_DB);
dbt.closeDB();
}
//*-- initialize the timer hash
timers = Constants.getTIMERS();