You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Gergő Törcsvári <to...@gmail.com> on 2014/06/03 12:36:22 UTC
Fwd: Reader reopen
Hello,
If I have an AtomicReader, and an IndexSearcher can I reopen the index to
get the new documents?
Like there:
http://lucene.apache.org/core/3_0_3/api/all/org/apache/lucene/index/IndexReader.html#reopen%28%29
There is any workaround?
Thanks,
Gergő
P.S.: I accidentaly send this to general list too. Sorry for that.
Re: Reader reopen
Posted by Michael McCandless <lu...@mikemccandless.com>.
You can reopen non-NRT readers, too. It just means you have to call
IW.commit in order for the non-NRT reader to see the changes.
DR.openIfChanged accepts either kind of reader.
Mike McCandless
http://blog.mikemccandless.com
On Thu, Jun 5, 2014 at 4:24 AM, Gergő Törcsvári
<to...@gmail.com> wrote:
> Hy,
>
> Thanks the fast answear.
>
> So the only way to reopen a reader if I use a near realtime reader or if I
> know where is the indexes and what kind of reader I had before? (And
> manually close and open an another reader.)
>
> Gergő
>
>
> 2014-06-03 12:37 GMT+02:00 Michael McCandless <lu...@mikemccandless.com>:
>
>> Sure, just use DirectoryReader.openIfChanged.
>>
>> Mike McCandless
>>
>> http://blog.mikemccandless.com
>>
>>
>> On Tue, Jun 3, 2014 at 6:36 AM, Gergő Törcsvári
>> <to...@gmail.com> wrote:
>> > Hello,
>> >
>> > If I have an AtomicReader, and an IndexSearcher can I reopen the index to
>> > get the new documents?
>> > Like there:
>> >
>> http://lucene.apache.org/core/3_0_3/api/all/org/apache/lucene/index/IndexReader.html#reopen%28%29
>> > There is any workaround?
>> >
>> > Thanks,
>> > Gergő
>> >
>> > P.S.: I accidentaly send this to general list too. Sorry for that.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: Reader reopen
Posted by Gergő Törcsvári <to...@gmail.com>.
Hy,
Thanks the fast answear.
So the only way to reopen a reader if I use a near realtime reader or if I
know where is the indexes and what kind of reader I had before? (And
manually close and open an another reader.)
Gergő
2014-06-03 12:37 GMT+02:00 Michael McCandless <lu...@mikemccandless.com>:
> Sure, just use DirectoryReader.openIfChanged.
>
> Mike McCandless
>
> http://blog.mikemccandless.com
>
>
> On Tue, Jun 3, 2014 at 6:36 AM, Gergő Törcsvári
> <to...@gmail.com> wrote:
> > Hello,
> >
> > If I have an AtomicReader, and an IndexSearcher can I reopen the index to
> > get the new documents?
> > Like there:
> >
> http://lucene.apache.org/core/3_0_3/api/all/org/apache/lucene/index/IndexReader.html#reopen%28%29
> > There is any workaround?
> >
> > Thanks,
> > Gergő
> >
> > P.S.: I accidentaly send this to general list too. Sorry for that.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
Re: Reader reopen
Posted by Michael McCandless <lu...@mikemccandless.com>.
Sure, just use DirectoryReader.openIfChanged.
Mike McCandless
http://blog.mikemccandless.com
On Tue, Jun 3, 2014 at 6:36 AM, Gergő Törcsvári
<to...@gmail.com> wrote:
> Hello,
>
> If I have an AtomicReader, and an IndexSearcher can I reopen the index to
> get the new documents?
> Like there:
> http://lucene.apache.org/core/3_0_3/api/all/org/apache/lucene/index/IndexReader.html#reopen%28%29
> There is any workaround?
>
> Thanks,
> Gergő
>
> P.S.: I accidentaly send this to general list too. Sorry for that.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org