You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Uwe Schindler (JIRA)" <ji...@apache.org> on 2008/09/23 21:39:44 UTC

[jira] Issue Comment Edited: (LUCENE-1402) CheckIndex API changed without backwards compaitibility

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

thetaphi edited comment on LUCENE-1402 at 9/23/08 12:38 PM:
-----------------------------------------------------------------

I hope you did not start to do a patch. I created one, that contains all the comments and fixes also some bugs:
- the parameter fix in static method remove
- if infoStream/out==null NPE's at different positions
- main() does not set output stream, so main() does not show any messages

It is not completely tested, but it compiles correct and works for me (using the API, not main()). 
So it needs intensive testing, but should be OK.

Maybe rename method fix() to fixIndex() in comparison to checkIndex().

      was (Author: thetaphi):
    I hope you did not start to do a patch. I created one, that contains all the comments and fixes also some bugs:
- the parameter fix in static method remove
- if infoStream/out==null NPE's at different positions

It is not completely tested, but it compiles correct and works for me (using the API, not main()). 
So it needs intensive testing, but should be OK.

Maybe rename method fix() to fixIndex() in comparison to checkIndex().
  
> 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-uwe.patch, 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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org