You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by michael ravits <mi...@yahoo.com> on 2007/06/19 11:48:51 UTC

hi,

I am planning on reindexing from fresh on a daily basis, while keeping the search online.

What I do is:

1. <delete><query>*:*</query></delete>
2. <add>...
3. <commit />

Works ok. But I've noticed that the faq recommends issuing <optimize /> before reindexing. The problem is <optimize/> also seems to commit changes, so the index is empty until I reindex and the search can't be online.

How _not_ sending <optimize /> will affect performace/results?
Will sending <optimize /> after reindexing help?
Is there another solution?

thanks

       
---------------------------------
Get the Yahoo! toolbar and be alerted to new email wherever you're surfing. 

Re:

Posted by Nick Jenkin <nj...@gmail.com>.
I am doing a full index daily (3,000,000 documents) without using
optimize, no problems at all, if that helps. Also note that you don't
need to delete all your documents, if delete your documents search
won't return any results until you have re-added the documents!
You should do a regular commit between inserts (I do one every 10,000)
otherwise you might get out-of-memory errors.
-Nick

On 6/20/07, Chris Hostetter <ho...@fucit.org> wrote:
>
> : Works ok. But I've noticed that the faq recommends issuing <optimize />
> : before reindexing. The problem is <optimize/> also seems to commit
> : changes, so the index is empty until I reindex and the search can't be
> : online.
>
> please note what question that recomendation appears in...
>
>    "How can I rebuild my index from scratch if I change my schema?"
>
> If you are not changing your schema, then that answer does not apply to
> you.  deleting documents and reading them (without optimizing fist) is
> perfectly fine.
>
> : Will sending <optimize /> after reindexing help?
>
> if your index only changes in big batches then it's almost always
> beneficial to do an optimize after your indexing.
>
>
> -Hoss
>
>

Re:

Posted by Chris Hostetter <ho...@fucit.org>.
: Works ok. But I've noticed that the faq recommends issuing <optimize />
: before reindexing. The problem is <optimize/> also seems to commit
: changes, so the index is empty until I reindex and the search can't be
: online.

please note what question that recomendation appears in...

   "How can I rebuild my index from scratch if I change my schema?"

If you are not changing your schema, then that answer does not apply to
you.  deleting documents and reading them (without optimizing fist) is
perfectly fine.

: Will sending <optimize /> after reindexing help?

if your index only changes in big batches then it's almost always
beneficial to do an optimize after your indexing.


-Hoss


Re:

Posted by Mike Klaas <mi...@gmail.com>.
On 19-Jun-07, at 2:48 AM, michael ravits wrote:

> hi,
>
> I am planning on reindexing from fresh on a daily basis, while  
> keeping the search online.
>
> What I do is:
>
> 1. <delete><query>*:*</query></delete>
> 2. <add>...
> 3. <commit />
>
> Works ok. But I've noticed that the faq recommends issuing  
> <optimize /> before reindexing. The problem is <optimize/> also  
> seems to commit changes, so the index is empty until I reindex and  
> the search can't be online.
>
> How _not_ sending <optimize /> will affect performace/results?

Unclear; it would be best to measure it.  I suspect it might not  
affect performance at all.  <optimize/> is mostly necessary to ensure  
that certain kinds of backward-incompatible schema changes are  
applied--since this implies taking down Solr anyway, you don't have  
to worry about this.

> Will sending <optimize /> after reindexing help?
> Is there another solution?

It'll help searching but not affect indexing.

Don't worry about it unless you find that there is a performance  
problem.

-Mike