Show / Hide Table of Contents

    Class CachingWrapperFilter

    Wraps another Filter's result and caches it. The purpose is to allow filters to simply filter, and then wrap with this class to add caching.

    Inheritance
    System.Object
    Filter
    CachingWrapperFilter
    Inherited Members
    Filter.NewAnonymous(Func<AtomicReaderContext, IBits, DocIdSet>)
    Namespace: Lucene.Net.Search
    Assembly: Lucene.Net.dll
    Syntax
    public class CachingWrapperFilter : Filter

    Constructors

    | Improve this Doc View Source

    CachingWrapperFilter(Filter)

    Wraps another filter's result and caches it.

    Declaration
    public CachingWrapperFilter(Filter filter)
    Parameters
    Type Name Description
    Filter filter

    Filter to cache results of

    Fields

    | Improve this Doc View Source

    EMPTY_DOCIDSET

    An empty DocIdSet instance

    Declaration
    protected static readonly DocIdSet EMPTY_DOCIDSET
    Field Value
    Type Description
    DocIdSet

    Properties

    | Improve this Doc View Source

    Filter

    Gets the contained filter.

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

    the contained filter.

    Methods

    | Improve this Doc View Source

    CacheImpl(DocIdSetIterator, AtomicReader)

    Default cache implementation: uses WAH8DocIdSet.

    Declaration
    protected virtual DocIdSet CacheImpl(DocIdSetIterator iterator, AtomicReader reader)
    Parameters
    Type Name Description
    DocIdSetIterator iterator
    AtomicReader reader
    Returns
    Type Description
    DocIdSet
    | Improve this Doc View Source

    DocIdSetToCache(DocIdSet, AtomicReader)

    Provide the DocIdSet to be cached, using the DocIdSet provided by the wrapped Filter.

    This implementation returns the given DocIdSet, if IsCacheable returns true, else it calls CacheImpl(DocIdSetIterator, AtomicReader)

    Note: this method returns EMPTY_DOCIDSET if the given docIdSet is null or if GetIterator() return null. The empty instance is use as a placeholder in the cache instead of the null value.

    Declaration
    protected virtual DocIdSet DocIdSetToCache(DocIdSet docIdSet, AtomicReader reader)
    Parameters
    Type Name Description
    DocIdSet docIdSet
    AtomicReader reader
    Returns
    Type Description
    DocIdSet
    | Improve this Doc View Source

    Equals(Object)

    Declaration
    public override bool Equals(object o)
    Parameters
    Type Name Description
    System.Object o
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    GetDocIdSet(AtomicReaderContext, IBits)

    Declaration
    public override DocIdSet GetDocIdSet(AtomicReaderContext context, IBits acceptDocs)
    Parameters
    Type Name Description
    AtomicReaderContext context
    IBits acceptDocs
    Returns
    Type Description
    DocIdSet
    Overrides
    Filter.GetDocIdSet(AtomicReaderContext, IBits)
    | Improve this Doc View Source

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32
    | Improve this Doc View Source

    GetSizeInBytes()

    Returns total byte size used by cached filters.

    Declaration
    public virtual long GetSizeInBytes()
    Returns
    Type Description
    System.Int64
    | Improve this Doc View Source

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)