Lucene - Core
  1. Lucene - Core
  2. LUCENE-4248

Producers to the Codec API don't always follow the spec

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0-BETA, Trunk
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      We added AssertingCodec etc and have lots of tests that consumers of the codec api follow a strict set of rules: but nothing checks the producers feeding these apis (IndexWriter, codec merge implementations, etc).

      We should beef up AssertingCodec to validate these things: this way the API is being followed.

      Simple examples of things include checking that producers are feeding terms to the consumers consistent with their comparator, that they aren't providing bogus or out of band statistics, and that they are invoking the right methods consistently (e.g. not forgetting to call finishDoc or something that might confuse someones codec).

      This is also nice since now we have quite a few tests (TestCodecs, TestPostingsFormat, etc) that feed these APIs directly, it could find some test bugs.

      1. LUCENE-4248.patch
        4 kB
        Robert Muir
      2. LUCENE-4248.patch
        8 kB
        Robert Muir
      3. LUCENE-4248.patch
        9 kB
        Robert Muir
      4. LUCENE-4248.patch
        12 kB
        Robert Muir

        Activity

        Robert Muir created issue -
        Robert Muir made changes -
        Field Original Value New Value
        Attachment LUCENE-4248.patch [ 12537588 ]
        Robert Muir made changes -
        Attachment LUCENE-4248.patch [ 12537593 ]
        Robert Muir made changes -
        Attachment LUCENE-4248.patch [ 12537595 ]
        Robert Muir made changes -
        Attachment LUCENE-4248.patch [ 12537607 ]
        Robert Muir made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 4.0 [ 12322456 ]
        Fix Version/s 5.0 [ 12321663 ]
        Resolution Fixed [ 1 ]
        Uwe Schindler made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Robert Muir
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development