On 11/27/2012 1:30 PM, Yonik Seeley wrote:
Expunging a single delete from a segment involves re-writing the entire segment, so it's just as bad as optimize (assuming most segments have a deletion). You might as well get the benefit of the optimize as well.

I have had the same thought here. What I would probably do is run the expungeDeletes commit on approximately the same interval as I currently do an optimize, and then do an optimize on a much longer interval. If I get lucky enough to expunge deletes from only very small segments, I come out ahead. If not, I'm no worse off than I am now.

If I were to entirely eliminate optimization, then I would likely be in a situation where I've got 20-60 segments all the time, none of which would take very long to rewrite. This is my mergePolicy config:

  <mergePolicy class="org.apache.lucene.index.TieredMergePolicy">
    <int name="maxMergeAtOnce">35</int>
    <int name="segmentsPerTier">35</int>
    <int name="maxMergeAtOnceExplicit">105</int>
  </mergePolicy>

Thanks,
Shawn

Reply via email to