Details

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

      Description

      I think OpenBitSet is trying to satisfy too many audiences, and it's
      confusing/error-proned as a result. It has int/long variants of many
      methods. Some methods require in-bound access, others don't; of those
      others, some methods auto-grow the bits, some don't. OpenBitSet
      doesn't always know its numBits.

      I'd like to factor out a more "focused" bit set impl whose primary
      target usage is a cached Lucene Filter, ie a bit set indexed by docID
      (int, not long) whose size is known and fixed up front (backed by
      final long[]) and is always accessed in-bounds.

      1. LUCENE-3280.patch
        57 kB
        Michael McCandless
      2. LUCENE-3280.patch
        46 kB
        Michael McCandless

        Activity

        Hide
        Michael McCandless added a comment -

        Initial patch w/ some nocommits still but tests pass...

        Show
        Michael McCandless added a comment - Initial patch w/ some nocommits still but tests pass...
        Hide
        Yonik Seeley added a comment -

        I think FastBitSet should still have

          /** Expert: returns the long[] storing the bits */
          public long[] getBits() { return bits; }
        

        The whole reason I had to create OpenBitSet in the first place was that you couldn't do anything custom fast (on a word-for-word basis) because the bits were locked away from you.

        Show
        Yonik Seeley added a comment - I think FastBitSet should still have /** Expert: returns the long [] storing the bits */ public long [] getBits() { return bits; } The whole reason I had to create OpenBitSet in the first place was that you couldn't do anything custom fast (on a word-for-word basis) because the bits were locked away from you.
        Hide
        Michael McCandless added a comment -

        OK I'll add getBits().

        Show
        Michael McCandless added a comment - OK I'll add getBits().
        Hide
        Michael McCandless added a comment -

        New patch, renaming to FixedBitSet, adding test (adapted from TestOBS's), adding getBits, hashCode, equals.

        I think it's ready to commit!

        Show
        Michael McCandless added a comment - New patch, renaming to FixedBitSet, adding test (adapted from TestOBS's), adding getBits, hashCode, equals. I think it's ready to commit!

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development