lucene in action_ index and search
•
Java
@H_ 404_ 0 @ here's something about Lucene in action
main(String[] args) (args.length != 2 IllegalArgumentException("Usage: java " + Indexer..getName() + "
" String indexDir = args[0 String dataDir = args[1 start = Indexer index = numIndexed = index.index(dataDir, } end = System.out.println("indexing " + numIndexed + " files took " + (end - start) + " millseconds!" @SuppressWarnings("deprecation" Indexer(String indexDir) Directory dir = FSDirectory.open( writer = IndexWriter(dir, StandardAnalyzer(Version.LUCENE_35), close() index(String dataDir,FileFilter filter) File[] files = (!f.isDirectory() && !f.isHidden() && f.exists() && f.canRead() && (filter == || indexFile(File f) System.out.println("Indexing " + Document doc =