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

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:

{quote}
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.
{quote}

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:

{quote}
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 ways.
{quote}

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: 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-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to