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.
Note
This API is for internal purposes only and might change in incompatible ways in the next release.
Inheritance
System.Object
BaseCompositeReader<R>
Implements
System.IDisposable
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Assembly: Lucene.Net.dll
Syntax
public abstract class BaseCompositeReader<R> : CompositeReader, IDisposable where R : IndexReader
Type Parameters
Constructors
|
Improve this Doc
View Source
BaseCompositeReader(R[])
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 sealed override int MaxDoc { get; }
Property Value
Type |
Description |
System.Int32 |
|
Overrides
|
Improve this Doc
View Source
NumDocs
Declaration
public sealed override int NumDocs { get; }
Property Value
Type |
Description |
System.Int32 |
|
Overrides
Methods
|
Improve this Doc
View Source
DocFreq(Term)
Declaration
public sealed override int DocFreq(Term term)
Parameters
Type |
Name |
Description |
Term |
term |
|
Returns
Type |
Description |
System.Int32 |
|
Overrides
|
Improve this Doc
View Source
Document(Int32, StoredFieldVisitor)
Declaration
public sealed override void Document(int docID, StoredFieldVisitor visitor)
Parameters
Overrides
|
Improve this Doc
View Source
GetDocCount(String)
Declaration
public sealed override int GetDocCount(string field)
Parameters
Type |
Name |
Description |
System.String |
field |
|
Returns
Type |
Description |
System.Int32 |
|
Overrides
|
Improve this Doc
View Source
GetSequentialSubReaders()
Declaration
protected sealed override IList<IndexReader> GetSequentialSubReaders()
Returns
Type |
Description |
System.Collections.Generic.IList<IndexReader> |
|
Overrides
|
Improve this Doc
View Source
GetSumDocFreq(String)
Declaration
public sealed override long GetSumDocFreq(string field)
Parameters
Type |
Name |
Description |
System.String |
field |
|
Returns
Type |
Description |
System.Int64 |
|
Overrides
|
Improve this Doc
View Source
GetSumTotalTermFreq(String)
Declaration
public sealed override long GetSumTotalTermFreq(string field)
Parameters
Type |
Name |
Description |
System.String |
field |
|
Returns
Type |
Description |
System.Int64 |
|
Overrides
|
Improve this Doc
View Source
GetTermVectors(Int32)
Declaration
public sealed override Fields GetTermVectors(int docID)
Parameters
Type |
Name |
Description |
System.Int32 |
docID |
|
Returns
Overrides
|
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 sealed override long TotalTermFreq(Term term)
Parameters
Type |
Name |
Description |
Term |
term |
|
Returns
Type |
Description |
System.Int64 |
|
Overrides
Implements
System.IDisposable
See Also