[
https://issues.apache.org/jira/browse/LUCENE-1402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12633814#action_12633814
]
Uwe Schindler commented on LUCENE-1402:
---------------------------------------
In principle, by making each Checkindex an instance, you would also not need
the CheckIndexStatus class, the variables could be members of CheckIndex, the
usage would be:
- instantiate CheckIndex with Directory
- boolean ok=check
- if (!ok) fix()
- close checkindex instance
For backwards compatibility, the main() and two static methods could do exactly
this. For more detailed status info, look into instance variables.
> CheckIndex API changed without backwards compaitibility
> -------------------------------------------------------
>
> Key: LUCENE-1402
> URL: https://issues.apache.org/jira/browse/LUCENE-1402
> Project: Lucene - Java
> Issue Type: Bug
> Components: Index
> Affects Versions: 2.4
> Reporter: Uwe Schindler
> Assignee: Michael McCandless
> Priority: Minor
> Attachments: LUCENE-1402.patch
>
>
> The API of CheckIndex changed. The Check function returns a CheckIndexStatus
> and not boolean. And JavaDocs notes the boolean return value.
> I am not sure if it works, but it would be good to have the check method that
> returns boolean available @Deprecated, i.e.
> @Deprecated public static CheckIndexStatus check(Directory dir, boolean
> doFix) throws IOException {
> final CheckIndexStatus stat=this.check(dir,doFix);
> return stat.clean;
> }
> I am not sure, if it can be done with the same method name, but it prevents
> drop-in-replacements of Lucene to work.
--
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]