Hmm, IW.getReader normally does include the existing index.

Ie, if you open an IndexWriter with "create=false" on an existing
index, and then call getReader(), the returned reader will search that
full index.  Is this not what you're seeing?

Mike

On Thu, Jan 7, 2010 at 1:58 PM, An Hong <an.h...@i365.com> 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()
> 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
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-dev-h...@lucene.apache.org

Reply via email to