lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shai Erera <ser...@gmail.com>
Subject Re: IndexReader.doOpenIfChanged javadocs
Date Thu, 03 Nov 2011 06:40:15 GMT
Thanks Mike.

I will add this javadoc text:

  /**
   * If the index has changed since it was opened, open and return a new
reader;
   * else, return {@code null}.
   *
   * @see #openIfChanged(IndexReader)
   */

I'll add similar text to the other doOpenIfChanged variants.

Shai

On Wed, Nov 2, 2011 at 3:59 PM, Michael McCandless <
lucene@mikemccandless.com> wrote:

> Good point Shai!
>
> Yes, it must return null if there were no changes; else it must return
> a new reader (!= this).
>
> Thanks.
>
> Mike McCandless
>
> http://blog.mikemccandless.com
>
> On Wed, Nov 2, 2011 at 9:56 AM, Shai Erera <serera@gmail.com> wrote:
> > Hi
> >
> > While migrating code which overrode IndexReader.reopen to override
> > IR.doOpenIfChanged, I ran into an issue that stemmed from the fact that
> > apparently doOpenIfChanged needs to return null if the IR wasn't
> reopened.
> > It'd help if it was documented :).
> >
> > Is that the only contract of the method? I'd like to add some javadocs,
> so
> > please let me know if that's all that needs to be documented.
> >
> > Shai
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>

Mime
View raw message