lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Miller (Commented) (JIRA)" <>
Subject [jira] [Commented] (LUCENE-3454) rename optimize to a less cool-sounding name
Date Sun, 06 Nov 2011 22:31:51 GMT


Mark Miller commented on LUCENE-3454:

I'm not sure sure that is a strong case.

The ones that mention optimizing after loading all your data is practically what had been
often recommended for some time. Can't say the same about optimizing after every add.

However, up to most of Lucene 2, we still had JavaDoc that said:

If an index will not have more documents added for a while and optimal search performance
is desired, then the optimize method should be called before the index is closed.

Based on that, I'd likely think I should optimize after bulk loading up all my data like one
of those links asks about.

The optimize javadoc itself even simply said:

Requests an "optimize" operation on an index, priming the index for the fastest available
search. Traditionally this has meant merging all segments into a single segment as is done
in the default merge policy, but individaul merge policies may implement optimize in different

Since, much of this javadoc had gotten better. But it's no surprise that there are cases of
confusion out there? Most of those are from before this javadoc was fixed - and even then
the old code and javaodoc/advice are out there reverberating around on google.

The situation with the javadoc is much better today - someone shouldn't need to ask those
questions, or have those problems, but the *javadoc* used to be a trap in showing this great
optimize method and not properly explaining or warning about its use.

Creating method names for cowboy method calling coders that don't read javadoc seems like
the wrong approach to me.

Though I'm still +1 on renaming optimize to something more fitting.
> rename optimize to a less cool-sounding name
> --------------------------------------------
>                 Key: LUCENE-3454
>                 URL:
>             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:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message