I agree isCurrent doesn't work right for an NRT reader. Right now, it will always return "true" because it's sharing the segmentInfos in use by the writer.
Similarly, getVersion will lie. I'll open an issue to track how to fix it. Mike On Mon, Oct 12, 2009 at 6:12 PM, Yonik Seeley <yo...@lucidimagination.com> wrote: > Good point on isCurrent - I think it should only be with respect to > the latest index commit point? and we should clarify that in the > javadoc. > > [...] >> // but what does the nrtReader say? >> // it does not have access to the most recent commit >> // state, as there's been a commit (with documents) >> // since it was opened. But the nrtReader *has* those >> // documents. > > I think we keep it simple - the nrtReader.isCurrent() would return > false after a commit is called. > Yes, isCurrent() is no longer such a great name. > > -Yonik > http://www.lucidimagination.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org