lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (LUCENE-1401) Deprecation of autoCommit in 2.4 leads to compile problems, when autoCommit should be false
Date Thu, 25 Sep 2008 12:09:46 GMT

     [ https://issues.apache.org/jira/browse/LUCENE-1401?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Michael McCandless resolved LUCENE-1401.
----------------------------------------

    Resolution: Fixed

Committed revision 698932 on trunk (2.9) and 698933 on 2.4.  Thanks Uwe!

> Deprecation of autoCommit in 2.4 leads to compile problems, when autoCommit should be
false
> -------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-1401
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1401
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Index
>    Affects Versions: 2.4, 2.9
>            Reporter: Uwe Schindler
>            Assignee: Michael McCandless
>            Priority: Trivial
>             Fix For: 2.4, 2.9
>
>         Attachments: LUCENE-1401.patch
>
>
> I am currently changing my code to be most compatible with 2.4. I switched on deprecation
warnings and got a warning about the autoCommit parameter in IndexWriter constructors.
> My code *should* use autoCommit=false, so I want to use the new semantics. The default
of IndexWriter is still autoCommit=true. My problem now: How to disable autoCommit whithout
deprecation warnings?
> Maybe, the "old" constructors, that are deprecated should use autoCommit=true. But there
are new constructors with this "IndexWriter.MaxFieldLength mfl" in it, that appear new in
2.4 but are deprecated:
> IndexWriter(Directory d, boolean autoCommit, Analyzer a, boolean create, IndexDeletionPolicy
deletionPolicy, IndexWriter.MaxFieldLength mfl) 
>           Deprecated. This will be removed in 3.0, when autoCommit will be hardwired
to false. Use IndexWriter(Directory,Analyzer,boolean,IndexDeletionPolicy,MaxFieldLength) instead,
and call commit() when needed.
> What the hell is meant by this, a new constructor that is deprecated? And the hint is
wrong. If I use the other constructor in the warning, I get autoCommit=true.
> There is something completely wrong.
> It should be clear, which constructors set autoCommit=true, which set it per default
to false (perhaps new ones), and the Deprecated text is wrong, if autoCommit does not default
to false.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


Mime
View raw message