Lucene - Core
  1. Lucene - Core
  2. LUCENE-4496

Don't decode unnecessary freq blocks in 4.1 codec

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.1
    • Fix Version/s: 4.1, Trunk
    • Component/s: core/codecs
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      TermsEnum.docs() has an expert flag to specify you don't require frequencies. This is currently set by some things that don't need it: we should call ForUtil.skipBlock instead of ForUtil.readBlock in this case.

      1. LUCENE-4496.patch
        2 kB
        Robert Muir
      2. LUCENE-4496.patch
        6 kB
        Robert Muir
      3. LUCENE-4496.patch
        16 kB
        Robert Muir

        Activity

        Hide
        Robert Muir added a comment -

        All tests pass, not sure I trust they really test this case well or even how much it helps, but its a simple fix.

        Show
        Robert Muir added a comment - All tests pass, not sure I trust they really test this case well or even how much it helps, but its a simple fix.
        Hide
        Robert Muir added a comment -

        same trick for .pay blocks when they arent needed.

        Show
        Robert Muir added a comment - same trick for .pay blocks when they arent needed.
        Hide
        Michael McCandless added a comment -

        +1

        Show
        Michael McCandless added a comment - +1
        Hide
        Robert Muir added a comment -

        Same patch, adding a few comments and beefing up TestBlockPostingsFormat3 to also check the freqs case.

        I'll commit this shortly after running some more tests, and I think I want to now yank TestBlockPostingsFormat3 out of this package and let it run with any codec, it just tests these various "subset" cases and isnt specific to this PF.

        Show
        Robert Muir added a comment - Same patch, adding a few comments and beefing up TestBlockPostingsFormat3 to also check the freqs case. I'll commit this shortly after running some more tests, and I think I want to now yank TestBlockPostingsFormat3 out of this package and let it run with any codec, it just tests these various "subset" cases and isnt specific to this PF.
        Hide
        Robert Muir added a comment -

        I committed to trunk... will give it some time in jenkins before backporting.

        Show
        Robert Muir added a comment - I committed to trunk... will give it some time in jenkins before backporting.
        Hide
        Commit Tag Bot added a comment -

        [branch_4x commit] Robert Muir
        http://svn.apache.org/viewvc?view=revision&revision=1401160

        LUCENE-4496: don't decode unnecessary blocks in 4.1 codec

        Show
        Commit Tag Bot added a comment - [branch_4x commit] Robert Muir http://svn.apache.org/viewvc?view=revision&revision=1401160 LUCENE-4496 : don't decode unnecessary blocks in 4.1 codec

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development