Class AtomicReader
AtomicReader is an abstract class, providing an interface for accessing an index. Search of an index is done entirely through this abstract interface, so that any subclass which implements it is searchable. IndexReaders implemented by this subclass do not consist of several sub-readers, they are atomic. They support retrieval of stored fields, doc values, terms, and postings.
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.
Inherited Members
Assembly: DistributedLucene.Net.dll
Syntax
public abstract class AtomicReader : IndexReader, IIdentifiableSurrogate
Constructors
Name | Description |
---|---|
AtomicReader() | Sole constructor. (For invocation by subclass constructors, typically implicit.) |
Properties
Name | Description |
---|---|
AtomicContext | LUCENENET specific propety that allows access to the context as AtomicReaderContext, which prevents the need to cast. |
Context | |
FieldInfos | Get the FieldInfos describing all fields in this reader. @lucene.experimental |
Fields | Returns Fields for this reader.
this property may return |
LiveDocs | Returns the IBits representing live (not
deleted) docs. A set bit indicates the doc ID has not
been deleted. If this method returns The returned instance has been safely published for use by multiple threads without additional synchronization. |
Methods
Name | Description |
---|---|
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. @lucene.internal |
DocFreq(Term) | |
GetBinaryDocValues(String) | Returns BinaryDocValues for this field, or
|
GetDocCount(String) | |
GetDocsWithField(String) | Returns a IBits at the size of |
GetNormValues(String) | Returns NumericDocValues representing norms
for this field, or |
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. |
GetSortedDocValues(String) | Returns SortedDocValues for this field, or
|
GetSortedSetDocValues(String) | Returns SortedSetDocValues for this field, or
|
GetSumDocFreq(String) | |
GetSumTotalTermFreq(String) | |
GetTermDocsEnum(Term) | Returns DocsEnum for the specified term.
This will return |
GetTermPositionsEnum(Term) | ReturnsDocsAndPositionsEnum for the specified
term.This will return |
GetTerms(String) | This may return |
HasNorms(String) | Returns true if there are norms stored for this |
TotalTermFreq(Term) | Returns the number of documents containing the |