Lucene - Core
  1. Lucene - Core
  2. LUCENE-3595

Refactor FieldCacheRangeFilter.FieldCacheDocIdSet to be separate class and fix the dangerous matchDoc() throws AIOOBE requirement

    Details

    • Type: Task Task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.6, 4.0-ALPHA
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      Followup from LUCENE-3593:
      The FieldCacheRangeFilter.FieldCacheDocIdSet class has a strange requirement on the abstract matchDoc(): It should throw AIOOBE if the docId is > maxDoc. This check should be done by caller as especially on trunk, e.g. FieldCacheTermsFilter does not seem to always throw this exception correctly (getOrd() is a method and no array in TermsIndex cache).

      Also in 3.x the Filter does not correctly respect deletions when a FieldCache based on a reopened reader is used.

      This issue will refactor this and fix the bugs and moves the docId check up to the iterator.

      1. LUCENE-3595-3x.patch
        22 kB
        Uwe Schindler
      2. LUCENE-3595-3x.patch
        22 kB
        Uwe Schindler
      3. LUCENE-3595-trunk.patch
        16 kB
        Uwe Schindler
      4. LUCENE-3595-trunk.patch
        16 kB
        Uwe Schindler

        Issue Links

          Activity

          Hide
          Uwe Schindler added a comment -

          Patch for trunk.

          Show
          Uwe Schindler added a comment - Patch for trunk.
          Hide
          Uwe Schindler added a comment -

          Previous patch had missing "else".

          Show
          Uwe Schindler added a comment - Previous patch had missing "else".
          Hide
          Uwe Schindler added a comment -

          Final patch for trunk, will commit now and backport.

          Show
          Uwe Schindler added a comment - Final patch for trunk, will commit now and backport.
          Hide
          Uwe Schindler added a comment -

          Committed trunk revision: 1206033
          Now backporting.

          Show
          Uwe Schindler added a comment - Committed trunk revision: 1206033 Now backporting.
          Hide
          Uwe Schindler added a comment -

          Patch for Lucene 3.x. This also fixes the TODO in LUCENE-3593 (respects deleted docs for the FixedBitSet case).

          Show
          Uwe Schindler added a comment - Patch for Lucene 3.x. This also fixes the TODO in LUCENE-3593 (respects deleted docs for the FixedBitSet case).
          Hide
          Uwe Schindler added a comment -

          Improvements. Ready to commit.

          Show
          Uwe Schindler added a comment - Improvements. Ready to commit.
          Hide
          Uwe Schindler added a comment -

          Committed 3.x revision: 1206040

          Show
          Uwe Schindler added a comment - Committed 3.x revision: 1206040
          Hide
          Uwe Schindler added a comment -

          I committed a change in trunk branch to do the acceptDocs check after the matchDoc() to be consistent with other implementations. This should also be faster as bit twiddling is only done when a match was found.

          At revision: 1206155

          Show
          Uwe Schindler added a comment - I committed a change in trunk branch to do the acceptDocs check after the matchDoc() to be consistent with other implementations. This should also be faster as bit twiddling is only done when a match was found. At revision: 1206155

            People

            • Assignee:
              Uwe Schindler
              Reporter:
              Uwe Schindler
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development