Class ParallelAtomicReader
An AtomicReader which reads multiple, parallel indexes. Each index
added must have the same number of documents, 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.
Inheritance
ParallelAtomicReader
Assembly: Lucene.Net.dll
Syntax
public class ParallelAtomicReader : AtomicReader, IDisposable
Constructors
ParallelAtomicReader(params AtomicReader[])
Declaration
public ParallelAtomicReader(params AtomicReader[] readers)
Parameters
ParallelAtomicReader(bool, params AtomicReader[])
Declaration
public ParallelAtomicReader(bool closeSubReaders, params AtomicReader[] readers)
Parameters
ParallelAtomicReader(bool, AtomicReader[], AtomicReader[])
Expert: create a ParallelAtomicReader based on the provided
readers
and storedFieldsReaders
; when a document is
loaded, only storedFieldsReaders
will be used.
Declaration
public ParallelAtomicReader(bool closeSubReaders, AtomicReader[] readers, AtomicReader[] storedFieldsReaders)
Parameters
Properties
FieldInfos
Get the FieldInfos describing all fields in
this reader.
NOTE: the returned field numbers will likely not
correspond to the actual field numbers in the underlying
readers, and codec metadata (
GetAttribute(string)
will be unavailable.
Declaration
public override FieldInfos FieldInfos { get; }
Property Value
Overrides
Fields
Returns Fields for this reader.
this property may return null
if the reader has no
postings.
Declaration
public override Fields Fields { get; }
Property Value
Overrides
LiveDocs
Returns the IBits representing live (not
deleted) docs. A set bit indicates the doc ID has not
been deleted. If this method returns null
it means
there are no deleted documents (all documents are
live).
The returned instance has been safely published for
use by multiple threads without additional
synchronization.
Declaration
public override IBits LiveDocs { get; }
Property Value
Overrides
MaxDoc
Returns one greater than the largest possible document number.
this may be used to, e.g., determine how big to allocate an array which
will have an element for every document number in an index.
Declaration
public override int MaxDoc { get; }
Property Value
Overrides
NumDocs
Returns the number of documents in this index.
Declaration
public override int NumDocs { get; }
Property Value
Overrides
Methods
CheckIntegrity()
Checks consistency of this reader.
Note that this may be costly in terms of I/O, e.g.
may involve computing a checksum value against large data files.
Note
This API is for internal purposes only and might change in incompatible ways in the next release.
Declaration
public override void CheckIntegrity()
Overrides
DoClose()
Declaration
protected override void DoClose()
Overrides
Document(int, StoredFieldVisitor)
Expert: visits the fields of a stored document, for
custom processing/loading of each field. If you
simply want to load all fields, use
Document(int). If you want to load a subset, use
DocumentStoredFieldVisitor.
Declaration
public override void Document(int docID, StoredFieldVisitor visitor)
Parameters
Overrides
GetBinaryDocValues(string)
Returns BinaryDocValues for this field, or
null
if no BinaryDocValues were indexed for
this field. The returned instance should only be
used by a single thread.
Declaration
public override BinaryDocValues GetBinaryDocValues(string field)
Parameters
Type |
Name |
Description |
string |
field |
|
Returns
Overrides
GetDocsWithField(string)
Returns a IBits at the size of reader.MaxDoc
,
with turned on bits for each docid that does have a value for this field,
or null
if no DocValues were indexed for this field. The
returned instance should only be used by a single thread.
Declaration
public override IBits GetDocsWithField(string field)
Parameters
Type |
Name |
Description |
string |
field |
|
Returns
Overrides
GetNormValues(string)
Returns NumericDocValues representing norms
for this field, or null
if no NumericDocValues
were indexed. The returned instance should only be
used by a single thread.
Declaration
public override NumericDocValues GetNormValues(string field)
Parameters
Type |
Name |
Description |
string |
field |
|
Returns
Overrides
GetNumericDocValues(string)
Returns NumericDocValues for this field, or
null if no NumericDocValues were indexed for
this field. The returned instance should only be
used by a single thread.
Declaration
public override NumericDocValues GetNumericDocValues(string field)
Parameters
Type |
Name |
Description |
string |
field |
|
Returns
Overrides
GetSortedDocValues(string)
Returns SortedDocValues for this field, or
null
if no SortedDocValues were indexed for
this field. The returned instance should only be
used by a single thread.
Declaration
public override SortedDocValues GetSortedDocValues(string field)
Parameters
Type |
Name |
Description |
string |
field |
|
Returns
Overrides
GetSortedSetDocValues(string)
Declaration
public override SortedSetDocValues GetSortedSetDocValues(string field)
Parameters
Type |
Name |
Description |
string |
field |
|
Returns
Overrides
GetTermVectors(int)
Retrieve term vectors for this document, or null
if
term vectors were not indexed. The returned Fields
instance acts like a single-document inverted index
(the docID will be 0).
Declaration
public override Fields GetTermVectors(int docID)
Parameters
Type |
Name |
Description |
int |
docID |
|
Returns
Overrides
ToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
Type |
Description |
string |
A string that represents the current object.
|
Overrides
Implements