Details

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

      Description

      In working on LUCENE-3246, I found a few problems with
      BitVector.isSparse:

      • Its math can overflow int, such that if there are enough deleted
        docs and maxDoc() is largish, isSparse may incorrectly return true
      • It over-estimates the size of the sparse file, since when
        estimating number of bytes for the vInt dgaps it uses bits.length
        instead of bits.length divided by number of set bits (ie, the
        "average" gap between set bits)

      This is relatively harmless (just affects performance / size of .del
      file on disk, not correctness).

      1. LUCENE-3254.patch
        9 kB
        Michael McCandless

        Activity

        Hide
        Michael McCandless added a comment -

        Patch, fixing those two issues, and also 1) marking BV as
        @lucene.internal, 2) removing BV.subset (we don't use it), 3) adding a
        back-compat version header to the BV file (I need this for
        LUCENE-3246), and other small changes.

        Show
        Michael McCandless added a comment - Patch, fixing those two issues, and also 1) marking BV as @lucene.internal, 2) removing BV.subset (we don't use it), 3) adding a back-compat version header to the BV file (I need this for LUCENE-3246 ), and other small changes.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development