Show / Hide Table of Contents

    Class BaseCompositeReader<R>

    Base class for implementing CompositeReaders based on an array of sub-readers. The implementing class has to add code for correctly refcounting and closing the sub-readers.

    User code will most likely use MultiReader to build a composite reader on a set of sub-readers (like several DirectoryReaders).

    For efficiency, in this API documents are often referred to via document numbers, non-negative integers which each name a unique document in the index. These document numbers are ephemeral -- they may change as documents are added to and deleted from an index. Clients should thus not rely on a given document having the same number between sessions.

    NOTE: IndexReader instances are completely thread safe, meaning multiple threads can call any of its methods, concurrently. If your application requires external synchronization, you should not synchronize on the IndexReader instance; use your own (non-Lucene) objects instead.

    This is a Lucene.NET INTERNAL API, use at your own risk
    Inheritance
    System.Object
    IndexReader
    CompositeReader
    BaseCompositeReader<R>
    DirectoryReader
    MultiReader
    ParallelCompositeReader
    Inherited Members
    CompositeReader.ToString()
    CompositeReader.Context
    IndexReader.AddReaderClosedListener(IndexReader.IReaderClosedListener)
    IndexReader.RemoveReaderClosedListener(IndexReader.IReaderClosedListener)
    IndexReader.RegisterParentReader(IndexReader)
    IndexReader.RefCount
    IndexReader.IncRef()
    IndexReader.TryIncRef()
    IndexReader.DecRef()
    IndexReader.EnsureOpen()
    IndexReader.Equals(Object)
    IndexReader.GetHashCode()
    IndexReader.Open(Directory)
    IndexReader.Open(Directory, Int32)
    IndexReader.Open(IndexWriter, Boolean)
    IndexReader.Open(IndexCommit)
    IndexReader.Open(IndexCommit, Int32)
    IndexReader.GetTermVector(Int32, String)
    IndexReader.NumDeletedDocs
    IndexReader.Document(Int32)
    IndexReader.Document(Int32, ISet<String>)
    IndexReader.HasDeletions
    IndexReader.Dispose()
    IndexReader.Dispose(Boolean)
    IndexReader.DoClose()
    IndexReader.Leaves
    IndexReader.CoreCacheKey
    IndexReader.CombinedCoreAndDeletesKey
    Namespace: Lucene.Net.Index
    Assembly: Lucene.Net.dll
    Syntax
    public abstract class BaseCompositeReader<R> : CompositeReader where R : IndexReader
    Type Parameters
    Name Description
    R

    Constructors

    | Improve this Doc View Source

    BaseCompositeReader(R[])

    Constructs a BaseCompositeReader<R> on the given subReaders.

    Declaration
    protected BaseCompositeReader(R[] subReaders)
    Parameters
    Type Name Description
    R[] subReaders

    the wrapped sub-readers. This array is returned by GetSequentialSubReaders() and used to resolve the correct subreader for docID-based methods. Please note: this array is not cloned and not protected for modification, the subclass is responsible to do this.

    Properties

    | Improve this Doc View Source

    MaxDoc

    Declaration
    public override sealed int MaxDoc { get; }
    Property Value
    Type Description
    System.Int32
    Overrides
    IndexReader.MaxDoc
    | Improve this Doc View Source

    NumDocs

    Declaration
    public override sealed int NumDocs { get; }
    Property Value
    Type Description
    System.Int32
    Overrides
    IndexReader.NumDocs

    Methods

    | Improve this Doc View Source

    DocFreq(Term)

    Declaration
    public override sealed int DocFreq(Term term)
    Parameters
    Type Name Description
    Term term
    Returns
    Type Description
    System.Int32
    Overrides
    IndexReader.DocFreq(Term)
    | Improve this Doc View Source

    Document(Int32, StoredFieldVisitor)

    Declaration
    public override sealed void Document(int docID, StoredFieldVisitor visitor)
    Parameters
    Type Name Description
    System.Int32 docID
    StoredFieldVisitor visitor
    Overrides
    IndexReader.Document(Int32, StoredFieldVisitor)
    | Improve this Doc View Source

    GetDocCount(String)

    Declaration
    public override sealed int GetDocCount(string field)
    Parameters
    Type Name Description
    System.String field
    Returns
    Type Description
    System.Int32
    Overrides
    IndexReader.GetDocCount(String)
    | Improve this Doc View Source

    GetSequentialSubReaders()

    Declaration
    protected override sealed IList<IndexReader> GetSequentialSubReaders()
    Returns
    Type Description
    IList<IndexReader>
    Overrides
    CompositeReader.GetSequentialSubReaders()
    | Improve this Doc View Source

    GetSumDocFreq(String)

    Declaration
    public override sealed long GetSumDocFreq(string field)
    Parameters
    Type Name Description
    System.String field
    Returns
    Type Description
    System.Int64
    Overrides
    IndexReader.GetSumDocFreq(String)
    | Improve this Doc View Source

    GetSumTotalTermFreq(String)

    Declaration
    public override sealed long GetSumTotalTermFreq(string field)
    Parameters
    Type Name Description
    System.String field
    Returns
    Type Description
    System.Int64
    Overrides
    IndexReader.GetSumTotalTermFreq(String)
    | Improve this Doc View Source

    GetTermVectors(Int32)

    Declaration
    public override sealed Fields GetTermVectors(int docID)
    Parameters
    Type Name Description
    System.Int32 docID
    Returns
    Type Description
    Fields
    Overrides
    IndexReader.GetTermVectors(Int32)
    | Improve this Doc View Source

    ReaderBase(Int32)

    Helper method for subclasses to get the docBase of the given sub-reader index.

    Declaration
    protected int ReaderBase(int readerIndex)
    Parameters
    Type Name Description
    System.Int32 readerIndex
    Returns
    Type Description
    System.Int32
    | Improve this Doc View Source

    ReaderIndex(Int32)

    Helper method for subclasses to get the corresponding reader for a doc ID

    Declaration
    protected int ReaderIndex(int docID)
    Parameters
    Type Name Description
    System.Int32 docID
    Returns
    Type Description
    System.Int32
    | Improve this Doc View Source

    TotalTermFreq(Term)

    Declaration
    public override sealed long TotalTermFreq(Term term)
    Parameters
    Type Name Description
    Term term
    Returns
    Type Description
    System.Int64
    Overrides
    IndexReader.TotalTermFreq(Term)

    See Also

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