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() that does not check for dupDirs. It seems to work. 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