Optimize will do just what you suggest, although there's a
parameter whose name escapes me controlling how many
segments the index is reduced to so this is configurable.

It's also possible, but kind of unlikely, that the original indexing
process would produce only one segment. You could tell which was
the case tell this easily enough by just looking at your index
directory during the build. My bet would be the optimize step..

Best
Erick

On Thu, Feb 10, 2011 at 8:10 PM, Tri Nguyen <tringuye...@yahoo.com> wrote:
> Does optimize merge all segments into 1 segment on the master after the build?
>
> Or after the build, there's only 1 segment.
>
> thanks,
>
> Tri
>
>
>
>
> ________________________________
> From: Erick Erickson <erickerick...@gmail.com>
> To: solr-user@lucene.apache.org
> Sent: Thu, February 10, 2011 5:08:44 PM
> Subject: Re: running optimize on master
>
> Optimizing isn't necessary in your scenario, as you don't delete
> documents and rebuild the whole thing each time anyway.
>
> As for faster searches, this has been largely been made obsolete
> by recent changes in how indexes are built in the first place. Especially
> as you can build your index in an hour, it's likely not big enough to
> benefit from optimizing even under the old scenario....
>
> So, unless you have some evidence that your queries are performing
> poorly, I would just leave the optimize step off.
>
> Best
> Erick
>
>
> On Thu, Feb 10, 2011 at 7:09 PM, Tri Nguyen <tringuye...@yahoo.com> wrote:
>> Hi,
>>
>> I've read running optimize is similar to running defrag on a hard disk.
>>Deleted
>> docs are removed and segments are reorganized for faster searching.
>>
>> I have a couple questions.
>>
>> Is optimize necessary if  I never delete documents?  I build the index every
>> hour but we don't delete in between builds.
>>
>> Secondly, what kind of reorganizing of segments is done to make searches
>>faster?
>>
>> Thanks,
>>
>> Tri
>

Reply via email to