Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class DocIdBitSet

    Simple DocIdSet and DocIdSetIterator backed by a BitSet

    Inheritance
    object
    DocIdSet
    DocIdBitSet
    Implements
    IBits
    Inherited Members
    DocIdSet.NewAnonymous(Func<DocIdSetIterator>)
    DocIdSet.NewAnonymous(Func<DocIdSetIterator>, Func<IBits>)
    DocIdSet.NewAnonymous(Func<DocIdSetIterator>, Func<bool>)
    DocIdSet.NewAnonymous(Func<DocIdSetIterator>, Func<IBits>, Func<bool>)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Lucene.Net.Util
    Assembly: Lucene.Net.dll
    Syntax
    public class DocIdBitSet : DocIdSet, IBits

    Constructors

    DocIdBitSet(BitSet)

    Simple DocIdSet and DocIdSetIterator backed by a BitSet

    Declaration
    public DocIdBitSet(BitSet bitSet)
    Parameters
    Type Name Description
    BitSet bitSet

    Properties

    BitSet

    Returns the underlying BitSet.

    Declaration
    public virtual BitSet BitSet { get; }
    Property Value
    Type Description
    BitSet

    Bits

    Optionally provides a IBits interface for random access to matching documents.

    Declaration
    public override IBits Bits { get; }
    Property Value
    Type Description
    IBits

    null, if this DocIdSet does not support random access. In contrast to GetIterator(), a return value of nulldoes not imply that no documents match the filter! The default implementation does not provide random access, so you only need to implement this method if your DocIdSet can guarantee random access to every docid in O(1) time without external disk access (as IBits interface cannot throw IOException). This is generally true for bit sets like FixedBitSet, which return itself if they are used as DocIdSet.

    Overrides
    DocIdSet.Bits

    IsCacheable

    This DocIdSet implementation is cacheable.

    Declaration
    public override bool IsCacheable { get; }
    Property Value
    Type Description
    bool
    Overrides
    DocIdSet.IsCacheable

    Length

    Returns the number of bits in this set

    Declaration
    public int Length { get; }
    Property Value
    Type Description
    int

    Methods

    Get(int)

    Returns the value of the bit with the specified index.

    Declaration
    public bool Get(int index)
    Parameters
    Type Name Description
    int index

    Index, should be non-negative and < Length. The result of passing negative or out of bounds values is undefined by this interface, just don't do it!

    Returns
    Type Description
    bool

    true if the bit is set, false otherwise.

    GetIterator()

    Provides a DocIdSetIterator to access the set. This implementation can return null if there are no docs that match.

    Declaration
    public override DocIdSetIterator GetIterator()
    Returns
    Type Description
    DocIdSetIterator
    Overrides
    DocIdSet.GetIterator()

    Implements

    IBits
    Back to top Copyright © 2024 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.