Show / Hide Table of Contents

    Class ParallelCompositeReader

    A CompositeReader which reads multiple, parallel indexes. Each index added must have the same number of documents, and exactly the same hierarchical subreader structure, but typically each contains different fields. Deletions are taken from the first reader. Each document contains the union of the fields of all documents with the same document number. When searching, matches for a query term are from the first index added that has the field.

    This is useful, e.g., with collections that have large fields which change rarely and small fields that change more frequently. The smaller fields may be re-indexed in a new index and both indexes may be searched together.

    Warning: It is up to you to make sure all indexes are created and modified the same way. For example, if you add documents to one index, you need to add the same documents in the same order to the other indexes. Failure to do so will result in undefined behavior. A good strategy to create suitable indexes with IndexWriter is to use LogDocMergePolicy, as this one does not reorder documents during merging (like TieredMergePolicy) and triggers merges by number of documents per segment. If you use different MergePolicys it might happen that the segment structure of your index is no longer predictable.

    Inheritance
    System.Object
    IndexReader
    CompositeReader
    BaseCompositeReader<IndexReader>
    ParallelCompositeReader
    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 ParallelCompositeReader : BaseCompositeReader<IndexReader>

    Constructors

    | Improve this Doc View Source

    ParallelCompositeReader(CompositeReader[])

    Create a ParallelCompositeReader based on the provided readers; auto-disposes the given readers on Dispose().

    Declaration
    public ParallelCompositeReader(params CompositeReader[] readers)
    Parameters
    Type Name Description
    CompositeReader[] readers
    | Improve this Doc View Source

    ParallelCompositeReader(Boolean, CompositeReader[])

    Create a ParallelCompositeReader based on the provided readers.

    Declaration
    public ParallelCompositeReader(bool closeSubReaders, params CompositeReader[] readers)
    Parameters
    Type Name Description
    System.Boolean closeSubReaders
    CompositeReader[] readers
    | Improve this Doc View Source

    ParallelCompositeReader(Boolean, CompositeReader[], CompositeReader[])

    Expert: create a ParallelCompositeReader based on the provided readers and storedFieldReaders; when a document is loaded, only storedFieldReaders will be used.

    Declaration
    public ParallelCompositeReader(bool closeSubReaders, CompositeReader[] readers, CompositeReader[] storedFieldReaders)
    Parameters
    Type Name Description
    System.Boolean closeSubReaders
    CompositeReader[] readers
    CompositeReader[] storedFieldReaders

    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)