lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shai Erera (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-3454) rename optimize to a less cool-sounding name
Date Mon, 07 Nov 2011 04:34:51 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-3454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13145222#comment-13145222
] 

Shai Erera commented on LUCENE-3454:
------------------------------------

Well ... I don't like forceMerge for two reasons: (1) it may not actually force anything and
(2) it takes a parameter maxNumSegments which is just one of the factors one would want to
consider when doing optimize/merge. For instance, when I do index optimization, I cap the
process by a time constraint and let it run until the time is exhausted. Given that today
I can either call maybeMerge() or optimize(), I call optimize(), and I like it that I don't
need to pass any 'fake' parameter, even though I'm aware that under the covers it does optimize(1).

What about expungeDeletes? Why is it not called maybeExpungeDeletes? Because by tweaking MP
settings I can make it leave some deletes in segments. And why isn't it called expungeDeletesThenMerge
or expungeDeletesNoMerge (ala the now gone addIndexesNoOptimize)? Don't get me wrong (before
anyone opens an issue to rename it too) - I like expungeDeletes! :)

I feel that we mask from the user what happens under the covers when he calls any of the 3
methods (maybMerge, optimize, expungeDeletes). maybeMerge relate to mergeFactor as a bounding
criteria (don't merge if there are aren't X segments at the same level), while optimize just
uses it to determine how many segments to merge at once, and expungeDeletes ignores it altogether.

So if MP determines so much what will happen when IndexWriter calls it, why hide it from the
method call? Instead of setting an MP once on IWC and hope that the settings I've done will
match any future call to one of these methods, why not allow the user to pass the desired
MP for the action he wants to perform? That way we can focus MP implementations on specific
tasks.
                
> rename optimize to a less cool-sounding name
> --------------------------------------------
>
>                 Key: LUCENE-3454
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3454
>             Project: Lucene - Java
>          Issue Type: Improvement
>    Affects Versions: 3.4, 4.0
>            Reporter: Robert Muir
>            Assignee: Michael McCandless
>         Attachments: LUCENE-3454.patch
>
>
> I think users see the name optimize and feel they must do this, because who wants a suboptimal
system? but this probably just results in wasted time and resources.
> maybe rename to collapseSegments or something?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message