Show / Hide Table of Contents

    Class FilteredDocIdSet

    Abstract decorator class for a DocIdSet implementation that provides on-demand filtering/validation mechanism on a given DocIdSet.

    Technically, this same functionality could be achieved with ChainedFilter (under queries/), however the benefit of this class is it never materializes the full bitset for the filter. Instead, the Match(Int32) method is invoked on-demand, per docID visited during searching. If you know few docIDs will be visited, and the logic behind Match(Int32) is relatively costly, this may be a better way to filter than ChainedFilter.

    Inheritance
    System.Object
    DocIdSet
    FilteredDocIdSet
    BitsFilteredDocIdSet
    Inherited Members
    DocIdSet.NewAnonymous(Func<DocIdSetIterator>)
    DocIdSet.NewAnonymous(Func<DocIdSetIterator>, Func<IBits>)
    DocIdSet.NewAnonymous(Func<DocIdSetIterator>, Func<Boolean>)
    DocIdSet.NewAnonymous(Func<DocIdSetIterator>, Func<IBits>, Func<Boolean>)
    Namespace: Lucene.Net.Search
    Assembly: Lucene.Net.dll
    Syntax
    public abstract class FilteredDocIdSet : DocIdSet

    Constructors

    | Improve this Doc View Source

    FilteredDocIdSet(DocIdSet)

    Constructor.

    Declaration
    public FilteredDocIdSet(DocIdSet innerSet)
    Parameters
    Type Name Description
    DocIdSet innerSet

    Underlying DocIdSet

    Properties

    | Improve this Doc View Source

    Bits

    Declaration
    public override IBits Bits { get; }
    Property Value
    Type Description
    IBits
    Overrides
    DocIdSet.Bits
    | Improve this Doc View Source

    IsCacheable

    This DocIdSet implementation is cacheable if the inner set is cacheable.

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

    Methods

    | Improve this Doc View Source

    GetIterator()

    Implementation of the contract to build a DocIdSetIterator.

    Declaration
    public override DocIdSetIterator GetIterator()
    Returns
    Type Description
    DocIdSetIterator
    Overrides
    DocIdSet.GetIterator()
    See Also
    DocIdSetIterator
    FilteredDocIdSetIterator
    | Improve this Doc View Source

    Match(Int32)

    Validation method to determine whether a docid should be in the result set.

    Declaration
    protected abstract bool Match(int docid)
    Parameters
    Type Name Description
    System.Int32 docid

    docid to be tested

    Returns
    Type Description
    System.Boolean

    true if input docid should be in the result set, false otherwise.

    See Also

    DocIdSet
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)