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

Shai Erera commented on LUCENE-5871:
------------------------------------

Version is currently used to decide whether to throw an exception in case IW 
has uncommitted or in-flight merges when you call close(), or silently discard 
them. I think that users who go to 5.0 will need to read the CHANGES carefully 
anyway, and adapt to the new way (close() only closes, not commit). I think we 
added it as convenience for users who upgrade and don't read CHANGES. But as 
you say, those users probably also pass Version.CURRENT, which means they 
silently lose those changes, so I now wonder if we should have this 
"convenience" in the code at all. And if we do decide to keep it, I suggest 
deprecating it in trunk, so it can be removed in e.g. 6.0.

> Simplify or remove use of Version in IndexWriterConfig
> ------------------------------------------------------
>
>                 Key: LUCENE-5871
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5871
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Ryan Ernst
>
> {{IndexWriter}} currently uses Version from {{IndexWriterConfig}} to 
> determine the semantics of {{close()}}.  This is a trapdoor for users, as 
> they often default to just sending Version.LUCENE_CURRENT since they don't 
> understand what it will be used for.  Instead, we should make the semantics 
> of close a direction option in IWC.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

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

Reply via email to