public static void initializeIndex ( String indexDir , String dataDir ) { File indexDir_f = new File ( indexDir ) ; File dataDir_f = new File ( dataDir ) ; long start = new Date ( ) . getTime ( ) ; try { int numIndexed = index ( indexDir_f , dataDir_f ) ; long end = new Date ( ) . getTime ( ) ; System . err . println ( "Indexing " + numIndexed + " files took " + ( end - start ) + " milliseconds" ) ; } catch ( IOException e ) { System . err . println ( "Unable to index " + indexDir_f + ": " + e . getMessage ( ) ) ; } }
Initializes an index given the index directory and data directory .