Show / Hide Table of Contents

    Class MultiReader

    A CompositeReader which reads multiple indexes, appending their content. It can be used to create a view on several sub-readers (like DirectoryReader) and execute searches on it.

    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.

    Inheritance
    System.Object
    IndexReader
    CompositeReader
    BaseCompositeReader<IndexReader>
    MultiReader
    Inherited Members
    BaseCompositeReader<IndexReader>.GetTermVectors(Int32)
    BaseCompositeReader<IndexReader>.NumDocs
    BaseCompositeReader<IndexReader>.MaxDoc
    BaseCompositeReader<IndexReader>.Document(Int32, StoredFieldVisitor)
    BaseCompositeReader<IndexReader>.DocFreq(Term)
    BaseCompositeReader<IndexReader>.TotalTermFreq(Term)
    BaseCompositeReader<IndexReader>.GetSumDocFreq(String)
    BaseCompositeReader<IndexReader>.GetDocCount(String)
    BaseCompositeReader<IndexReader>.GetSumTotalTermFreq(String)
    BaseCompositeReader<IndexReader>.ReaderIndex(Int32)
    BaseCompositeReader<IndexReader>.ReaderBase(Int32)
    BaseCompositeReader<IndexReader>.GetSequentialSubReaders()
    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.Leaves
    IndexReader.CoreCacheKey
    IndexReader.CombinedCoreAndDeletesKey
    Namespace: Lucene.Net.Index
    Assembly: Lucene.Net.dll
    Syntax
    public class MultiReader : BaseCompositeReader<IndexReader>

    Constructors

    | Improve this Doc View Source

    MultiReader(IndexReader[])

    Construct a MultiReader aggregating the named set of (sub)readers.

    Note that all subreaders are closed if this Multireader is closed.

    Declaration
    public MultiReader(params IndexReader[] subReaders)
    Parameters
    Type Name Description
    IndexReader[] subReaders

    set of (sub)readers

    | Improve this Doc View Source

    MultiReader(IndexReader[], Boolean)

    Construct a MultiReader aggregating the named set of (sub)readers.

    Declaration
    public MultiReader(IndexReader[] subReaders, bool closeSubReaders)
    Parameters
    Type Name Description
    IndexReader[] subReaders

    set of (sub)readers; this array will be cloned.

    System.Boolean closeSubReaders

    indicates whether the subreaders should be disposed when this MultiReader is disposed

    Methods

    | Improve this Doc View Source

    DoClose()

    Declaration
    protected override void DoClose()
    Overrides
    IndexReader.DoClose()
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)