Details

    • Type: Test Test
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.1
    • Fix Version/s: 4.2, 6.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      We don't have test cases for this method and it looks broken with both Lucene40TermVectorsFormat and CompressiongTermVectorsFormat.

      1. LUCENE-4732_dueling.patch
        2 kB
        Robert Muir
      2. LUCENE-4732.patch
        6 kB
        Adrien Grand
      3. LUCENE-4732.patch
        3 kB
        Adrien Grand

        Activity

        Hide
        Adrien Grand added a comment -

        New patch: quick test and fix for both impls.

        Show
        Adrien Grand added a comment - New patch: quick test and fix for both impls.
        Hide
        Robert Muir added a comment -

        We don't have test cases for this method

        What is the problem with the checks in TestDuelingCodecs? Are the docs it indexes not large enough (maybe don't ever use vectors?)

        Show
        Robert Muir added a comment - We don't have test cases for this method What is the problem with the checks in TestDuelingCodecs? Are the docs it indexes not large enough (maybe don't ever use vectors?)
        Hide
        Adrien Grand added a comment -

        What is the problem with the checks in TestDuelingCodecs?

        I just checked the code: the problem is that it always seeks from a freshly instantiated terms enum. With Lucene 4.0, the problem appears when the current position is after the seeked term.

        Show
        Adrien Grand added a comment - What is the problem with the checks in TestDuelingCodecs? I just checked the code: the problem is that it always seeks from a freshly instantiated terms enum. With Lucene 4.0, the problem appears when the current position is after the seeked term.
        Hide
        Robert Muir added a comment -

        I just checked the code: the problem is that it always seeks from a freshly instantiated terms enum.

        I still dont get it... assertTermsSeeking both shuffles its terms and reuses its termsenums.

        Show
        Robert Muir added a comment - I just checked the code: the problem is that it always seeks from a freshly instantiated terms enum. I still dont get it... assertTermsSeeking both shuffles its terms and reuses its termsenums.
        Hide
        Adrien Grand added a comment -

        assertTermsSeeking both shuffles its terms and reuses its termsenums.

        The problem is that in the "for (BytesRef b : shuffledTests)" loop, it always calls "leftEnum = leftTerms.iterator(leftEnum);" before seeking, so the seek always goes forwards, never backward.

        Show
        Adrien Grand added a comment - assertTermsSeeking both shuffles its terms and reuses its termsenums. The problem is that in the "for (BytesRef b : shuffledTests)" loop, it always calls "leftEnum = leftTerms.iterator(leftEnum);" before seeking, so the seek always goes forwards, never backward.
        Hide
        Robert Muir added a comment -

        ah thanks... here's a patch to beef this up some.

        Show
        Robert Muir added a comment - ah thanks... here's a patch to beef this up some.
        Hide
        Adrien Grand added a comment -

        New patch that incorporates Robert's improvements and tests more corner cases.

        Show
        Adrien Grand added a comment - New patch that incorporates Robert's improvements and tests more corner cases.
        Hide
        Commit Tag Bot added a comment -

        [trunk commit] Adrien Grand
        http://svn.apache.org/viewvc?view=revision&revision=1440308

        LUCENE-4732: Fixed TermsEnum.seekCeil/seekExact on term vectors.

        Show
        Commit Tag Bot added a comment - [trunk commit] Adrien Grand http://svn.apache.org/viewvc?view=revision&revision=1440308 LUCENE-4732 : Fixed TermsEnum.seekCeil/seekExact on term vectors.
        Hide
        Commit Tag Bot added a comment -

        [branch_4x commit] Adrien Grand
        http://svn.apache.org/viewvc?view=revision&revision=1440309

        LUCENE-4732: Fixed TermsEnum.seekCeil/seekExact on term vectors (merged from r1440308).

        Show
        Commit Tag Bot added a comment - [branch_4x commit] Adrien Grand http://svn.apache.org/viewvc?view=revision&revision=1440309 LUCENE-4732 : Fixed TermsEnum.seekCeil/seekExact on term vectors (merged from r1440308).
        Hide
        Uwe Schindler added a comment -

        Closed after release.

        Show
        Uwe Schindler added a comment - Closed after release.

          People

          • Assignee:
            Adrien Grand
            Reporter:
            Adrien Grand
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development