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 crocket <cr...@gmail.com> on 2013/04/02 23:29:04 UTC

When should I commit IndexWriter and TaxonomyWriter if I use NRT readers?

Since I use NRT readers for Index and TaxonomyIndex, I don't have to commit
to see the changes.

Now, I don't know if indexes are ever committed.

If they don't commit automatically, I'd have to do it on a regular basis.

What should I do about committing?

Re: When should I commit IndexWriter and TaxonomyWriter if I use NRT readers?

Posted by Shai Erera <se...@gmail.com>.
It's the same decision that you need to make regarding IndexWriter.
You should commit when you want the data to be persistent. This can happen
on a timer-basis (e.g. every 10 minutes), or following some application
logic, e.g. finished crawling a website or indexing a chunk of documents.

NRT support allows you to search the index without committing, however you
need to commit in order to make index changes persistent.

Shai


On Wed, Apr 3, 2013 at 1:24 AM, Apostolis Xekoukoulotakis <
xekoukou@gmail.com> wrote:

> Maybe consider the data saved only after you have committed them.
> Acknowledge new data in batches after a commit?
>
>
> 2013/4/3 crocket <cr...@gmail.com>
>
> > Since I use NRT readers for Index and TaxonomyIndex, I don't have to
> commit
> > to see the changes.
> >
> > Now, I don't know if indexes are ever committed.
> >
> > If they don't commit automatically, I'd have to do it on a regular basis.
> >
> > What should I do about committing?
> >
>
>
>
> --
>
>
> Sincerely yours,
>
>      Apostolis Xekoukoulotakis
>

Re: When should I commit IndexWriter and TaxonomyWriter if I use NRT readers?

Posted by Apostolis Xekoukoulotakis <xe...@gmail.com>.
Maybe consider the data saved only after you have committed them.
Acknowledge new data in batches after a commit?


2013/4/3 crocket <cr...@gmail.com>

> Since I use NRT readers for Index and TaxonomyIndex, I don't have to commit
> to see the changes.
>
> Now, I don't know if indexes are ever committed.
>
> If they don't commit automatically, I'd have to do it on a regular basis.
>
> What should I do about committing?
>



-- 


Sincerely yours,

     Apostolis Xekoukoulotakis