On 10/27/10, Seth Rosen <s...@architexa.com> wrote: > Yakob, > Here is a snippet of an example of IndexWriter from the lucene source that > you might find helpful. > > >> IndexWriter writer = new IndexWriter(FSDirectory.open(INDEX_DIR), new >> StandardAnalyzer(Version.LUCENE_CURRENT), true, >> IndexWriter.MaxFieldLength.LIMITED);
// the above code should change true into false so that the index will still be open right? // I mean surely the index shouldn't be close > > System.out.println("Indexing to directory '" +INDEX_DIR+ "'..."); > // what confuse me is how can add a new directory path containing new Documents to a // lucene class. so that lucene will index those new documents and add it to an existing // index. > indexDocs(writer, docDir); > > System.out.println("Optimizing..."); > > writer.optimize(); > > writer.close(); > > > Seth Rosen > www.architexa.com > Understand & Document Code In Seconds > s...@architexa.com <vin...@architexa.com> > > > -- http://jacobian.web.id --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org