<optimize />

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

<optimize />

Michael Ravits
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.
Reply | Threaded
Open this post in threaded view
|

Re: <optimize />

Mike Klaas
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
Reply | Threaded
Open this post in threaded view
|

Re: <optimize />

Chris Hostetter-3
In reply to this post by Michael Ravits

: 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

Reply | Threaded
Open this post in threaded view
|

Re: <optimize />

Nick Jenkin-2
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 <[hidden email]> 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
>
>