Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class FieldCacheDocIdSet

    Base class for DocIdSet to be used with IFieldCache. The implementation of its iterator is very stupid and slow if the implementation of the MatchDoc(int) method is not optimized, as iterators simply increment the document id until MatchDoc(int) returns true. Because of this MatchDoc(int) must be as fast as possible and in no case do any I/O.

    Note

    This API is for internal purposes only and might change in incompatible ways in the next release.

    Inheritance
    object
    DocIdSet
    FieldCacheDocIdSet
    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.Search
    Assembly: Lucene.Net.dll
    Syntax
    public class FieldCacheDocIdSet : DocIdSet

    Constructors

    FieldCacheDocIdSet(int, IBits)

    Base class for DocIdSet to be used with IFieldCache. The implementation of its iterator is very stupid and slow if the implementation of the MatchDoc(int) method is not optimized, as iterators simply increment the document id until MatchDoc(int) returns true. Because of this MatchDoc(int) must be as fast as possible and in no case do any I/O.

    Note

    This API is for internal purposes only and might change in incompatible ways in the next release.

    Declaration
    protected FieldCacheDocIdSet(int maxDoc, IBits acceptDocs)
    Parameters
    Type Name Description
    int maxDoc
    IBits acceptDocs

    FieldCacheDocIdSet(int, IBits, Predicate<int>)

    Base class for DocIdSet to be used with IFieldCache. The implementation of its iterator is very stupid and slow if the implementation of the MatchDoc(int) method is not optimized, as iterators simply increment the document id until MatchDoc(int) returns true. Because of this MatchDoc(int) must be as fast as possible and in no case do any I/O.

    Note

    This API is for internal purposes only and might change in incompatible ways in the next release.

    Declaration
    public FieldCacheDocIdSet(int maxDoc, IBits acceptDocs, Predicate<int> matchDoc)
    Parameters
    Type Name Description
    int maxDoc
    IBits acceptDocs
    Predicate<int> matchDoc

    Fields

    m_acceptDocs

    Base class for DocIdSet to be used with IFieldCache. The implementation of its iterator is very stupid and slow if the implementation of the MatchDoc(int) method is not optimized, as iterators simply increment the document id until MatchDoc(int) returns true. Because of this MatchDoc(int) must be as fast as possible and in no case do any I/O.

    Note

    This API is for internal purposes only and might change in incompatible ways in the next release.

    Declaration
    protected readonly IBits m_acceptDocs
    Field Value
    Type Description
    IBits

    m_maxDoc

    Base class for DocIdSet to be used with IFieldCache. The implementation of its iterator is very stupid and slow if the implementation of the MatchDoc(int) method is not optimized, as iterators simply increment the document id until MatchDoc(int) returns true. Because of this MatchDoc(int) must be as fast as possible and in no case do any I/O.

    Note

    This API is for internal purposes only and might change in incompatible ways in the next release.

    Declaration
    protected readonly int m_maxDoc
    Field Value
    Type Description
    int

    Properties

    Bits

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

    Declaration
    public override sealed 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 is always cacheable (does not go back to the reader for iteration)

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

    Methods

    GetIterator()

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

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

    MatchDoc(int)

    This method checks, if a doc is a hit

    Declaration
    protected virtual bool MatchDoc(int doc)
    Parameters
    Type Name Description
    int doc
    Returns
    Type Description
    bool
    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.