Lucene - Core
  1. Lucene - Core
  2. LUCENE-1625

openReaderPassed not populated in CheckIndex.Status.SegmentInfoStatus

    Details

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

      Description

      When using CheckIndex programatically, the openReaderPassed flag on the SegmentInfoStatus is never populated (so it always comes back false)

      looking at the code, its clear that openReaderPassed is defined, but never used

      furthermore, it appears that not all information that is propagated to the "InfoStream" is available via SegmentIinfoStatus

      All of the following information should be able to be gather from public properties on the SegmentInfoStatus:
      test: open reader.........OK
      test: fields, norms.......OK [2 fields]
      test: terms, freq, prox...OK [101 terms; 133 terms/docs pairs; 133 tokens]
      test: stored fields.......OK [100 total field count; avg 1 fields per doc]
      test: term vectors........OK [0 total vector count; avg 0 term/freq vector fields per doc]

        Activity

        Hide
        Michael McCandless added a comment -

        OK I committed a fix for openReaderPassed. Thanks Tim!

        Could you (or, anyone, but since you seem to have the itch...) create a patch for the further details you'd like returned?

        Show
        Michael McCandless added a comment - OK I committed a fix for openReaderPassed. Thanks Tim! Could you (or, anyone, but since you seem to have the itch...) create a patch for the further details you'd like returned?
        Hide
        Tim Smith added a comment -

        I will work up a patch if i am able to find the time, currently, as a workaround, i am just setting the infostream to System.stderr when a "verbose" output is needed (which is acceptable for my current use)

        Show
        Tim Smith added a comment - I will work up a patch if i am able to find the time, currently, as a workaround, i am just setting the infostream to System.stderr when a "verbose" output is needed (which is acceptable for my current use)
        Hide
        Tim Smith added a comment -

        Attached patch for exposing all collected stats
        (created with svn diff > CheckIndex.patch (please correct me if this is not the right way (this is my first patch)))

        This patch breaks out the testing of field norms, terms, stored fields, and term vectors into their own methods
        it also creates a status object for each one of these tests to make the results transparent

        this status object exposes:

        • stats previously only available from infoStream
        • exception thrown if test fails (null if test was successful)

        each SegmentInfoStatus will have these status objects attached

        NOTE:
        This patch allows that if one of the above tests fails, it will attempt to keep testing (to find all failures)
        any failure will still result in the overall segment being rejected

        Show
        Tim Smith added a comment - Attached patch for exposing all collected stats (created with svn diff > CheckIndex.patch (please correct me if this is not the right way (this is my first patch))) This patch breaks out the testing of field norms, terms, stored fields, and term vectors into their own methods it also creates a status object for each one of these tests to make the results transparent this status object exposes: stats previously only available from infoStream exception thrown if test fails (null if test was successful) each SegmentInfoStatus will have these status objects attached NOTE: This patch allows that if one of the above tests fails, it will attempt to keep testing (to find all failures) any failure will still result in the overall segment being rejected
        Hide
        Michael McCandless added a comment -

        This patch is awesome, Tim; thanks! I will commit in a day or two.

        Show
        Michael McCandless added a comment - This patch is awesome, Tim; thanks! I will commit in a day or two.
        Hide
        Michael McCandless added a comment -

        Thanks Tim!

        Show
        Michael McCandless added a comment - Thanks Tim!

          People

          • Assignee:
            Michael McCandless
            Reporter:
            Tim Smith
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development