RE: IndexWriter.getReader() for existing index content

2010-01-07 Thread An Hong
hu, Jan 7, 2010 at 1:58 PM, An Hong wrote: > I've a requirement that when creating an IndexWriter on an existing index, I > need its getReader() to see the existing content.  I've modified getReader() > to on its first call to invoke a modified version of addIndexesNoOptimized()

IndexWriter.getReader() for existing index content

2010-01-07 Thread An Hong
Subsequent addDocument() calls and reopen() of the reader also seem to work correctly. This is with 2.9.1. I wonder if there's a problem with what I'm doing, or if there's a better way? Thanks, An Hong

Upgrading an old index to 2.4 format

2009-02-23 Thread An Hong
I've several existing indexes in 2.1 file format. If these indexes have multiple segments and have not been optimized, a call to IndexWriter.optimize() should create a newly merged segment of the latest 2.4 file format. Is this true? And, is there a way to force a file format upgrade on a 2.1

IndexWriter.rollback() logic

2009-02-23 Thread An Hong
A question about IndexWriter.rollback() logic. Its javadoc says that it "Close the IndexWriter without committing any of the changes that have occurred since it was opened." So if I do 1. Open IndexWriter 2. Add doc1 3. Commit (successfully) 4. Add doc2 5. PrepareCommit() 6. Rollback()

2.4.0 missing javadocs

2009-02-12 Thread An Hong
Hi, I wonder how come the API javadoc at http://lucene.apache.org/java/2_4_0/api/core/index.html is missing entries for classes like org.apache.lucene.index.DocumentsWriter, DocumentsWriterThreadState and many others. Doing "ant javadocs" locally does not generate the javadoc for these classes