Class MatchAllBitSet

java.lang.Object
org.apache.lucene.util.BitSet
org.elasticsearch.lucene.util.MatchAllBitSet
All Implemented Interfaces:
org.apache.lucene.util.Accountable, org.apache.lucene.util.Bits

public final class MatchAllBitSet extends org.apache.lucene.util.BitSet
An optimized implementation of BitSet that matches all documents to reduce memory usage.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.apache.lucene.util.Bits

    org.apache.lucene.util.Bits.MatchAllBits, org.apache.lucene.util.Bits.MatchNoBits
  • Field Summary

    Fields inherited from interface org.apache.lucene.util.Accountable

    NULL_ACCOUNTABLE

    Fields inherited from interface org.apache.lucene.util.Bits

    EMPTY_ARRAY
  • Constructor Summary

    Constructors
    Constructor
    Description
    MatchAllBitSet(int numBits)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    int
     
    void
    clear(int i)
     
    void
    clear(int startIndex, int endIndex)
     
    boolean
    get(int index)
     
    boolean
    getAndSet(int i)
     
    int
     
    int
    nextSetBit(int index)
     
    void
    or(org.apache.lucene.search.DocIdSetIterator iter)
     
    int
    prevSetBit(int index)
     
    long
     
    void
    set(int i)
     

    Methods inherited from class org.apache.lucene.util.BitSet

    checkUnpositioned, clear, of

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.apache.lucene.util.Accountable

    getChildResources
  • Constructor Details

    • MatchAllBitSet

      public MatchAllBitSet(int numBits)
  • Method Details

    • set

      public void set(int i)
      Specified by:
      set in class org.apache.lucene.util.BitSet
    • getAndSet

      public boolean getAndSet(int i)
      Specified by:
      getAndSet in class org.apache.lucene.util.BitSet
    • clear

      public void clear(int i)
      Specified by:
      clear in class org.apache.lucene.util.BitSet
    • clear

      public void clear(int startIndex, int endIndex)
      Specified by:
      clear in class org.apache.lucene.util.BitSet
    • cardinality

      public int cardinality()
      Specified by:
      cardinality in class org.apache.lucene.util.BitSet
    • approximateCardinality

      public int approximateCardinality()
      Specified by:
      approximateCardinality in class org.apache.lucene.util.BitSet
    • prevSetBit

      public int prevSetBit(int index)
      Specified by:
      prevSetBit in class org.apache.lucene.util.BitSet
    • nextSetBit

      public int nextSetBit(int index)
      Specified by:
      nextSetBit in class org.apache.lucene.util.BitSet
    • ramBytesUsed

      public long ramBytesUsed()
    • get

      public boolean get(int index)
    • length

      public int length()
    • or

      public void or(org.apache.lucene.search.DocIdSetIterator iter) throws IOException
      Overrides:
      or in class org.apache.lucene.util.BitSet
      Throws:
      IOException