Class DocsWithFieldSet

  • All Implemented Interfaces:

    public final class DocsWithFieldSet
    extends DocIdSet
    Accumulator for documents that have a value for a field. This is optimized for the case that all documents have a value.
    • Constructor Detail

      • DocsWithFieldSet

        public DocsWithFieldSet()
        Creates an empty DocsWithFieldSet.
    • Method Detail

      • add

        public void add​(int docID)
        Add a document to the set
        docID - – document ID to be added
      • ramBytesUsed

        public long ramBytesUsed()
        Description copied from interface: Accountable
        Return the memory usage of this object in bytes. Negative values are illegal.
      • cardinality

        public int cardinality()
        Return the number of documents of this set.