Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-1402

CheckIndex API changed without backwards compaitibility

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.4, 2.9
    • Component/s: core/index
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      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.

        Attachments

        1. LUCENE-1402.patch
          24 kB
          Michael McCandless
        2. LUCENE-1402.patch
          20 kB
          Michael McCandless
        3. LUCENE-1402.patch
          10 kB
          Michael McCandless
        4. LUCENE-1402-uwe.patch
          21 kB
          Uwe Schindler

          Activity

            People

            • Assignee:
              mikemccand Michael McCandless
              Reporter:
              uschindler Uwe Schindler
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: