5152535455565758596061
String term = args[x]; Document doc = new Document(); doc.addValue(0, term); doc.addTerm(term); db.addDocument(doc); } // make sure to commit the database so the documents get written to disk db.commit(); }