C# Class Lucene.Net.Index.AtomicReader

{@code 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: {@link 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: IndexReader
Exibir arquivo Open project: paulirwin/lucene.net Class Usage Examples

Public Methods

Method Description
CheckIntegrity ( ) : void

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 ( Lucene.Net.Index.Term term ) : int
GetBinaryDocValues ( string field ) : Lucene.Net.Index.BinaryDocValues

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.

GetDocCount ( string field ) : int
GetDocsWithField ( string field ) : Bits

Returns a Bits 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

GetNormValues ( string field ) : Lucene.Net.Index.NumericDocValues

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.

GetNumericDocValues ( string field ) : Lucene.Net.Index.NumericDocValues

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 field ) : Lucene.Net.Index.SortedDocValues

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.

GetSortedSetDocValues ( string field ) : Lucene.Net.Index.SortedSetDocValues

Returns SortedSetDocValues for this field, or null if no SortedSetDocValues were indexed for this field. The returned instance should only be used by a single thread.

GetSumDocFreq ( string field ) : long
GetSumTotalTermFreq ( string field ) : long
HasNorms ( string field ) : bool

Returns true if there are norms stored for this field.

TermDocsEnum ( Lucene.Net.Index.Term term ) : Lucene.Net.Index.DocsEnum

Returns DocsEnum for the specified term. this will return null if either the field or term does not exist.

TermPositionsEnum ( Lucene.Net.Index.Term term ) : Lucene.Net.Index.DocsAndPositionsEnum

Returns DocsAndPositionsEnum for the specified term. this will return null if the field or term does not exist or positions weren't indexed.

Terms ( string field ) : Lucene.Net.Index.Terms

this may return null if the field does not exist.

TotalTermFreq ( Lucene.Net.Index.Term term ) : long

Returns the number of documents containing the term t. this method returns 0 if the term or field does not exists. this method does not take into account deleted documents that have not yet been merged away.

Protected Methods

Method Description
AtomicReader ( ) : System.Diagnostics

Sole constructor. (For invocation by subclass constructors, typically implicit.)

Private Methods

Method Description
InitializeInstanceFields ( ) : void

Method Details

AtomicReader() protected method

Sole constructor. (For invocation by subclass constructors, typically implicit.)
protected AtomicReader ( ) : System.Diagnostics
return System.Diagnostics

CheckIntegrity() public abstract method

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

public abstract CheckIntegrity ( ) : void
return void

DocFreq() public final method

public final DocFreq ( Lucene.Net.Index.Term term ) : int
term Lucene.Net.Index.Term
return int

GetBinaryDocValues() public abstract method

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.
public abstract GetBinaryDocValues ( string field ) : Lucene.Net.Index.BinaryDocValues
field string
return Lucene.Net.Index.BinaryDocValues

GetDocCount() public final method

public final GetDocCount ( string field ) : int
field string
return int

GetDocsWithField() public abstract method

Returns a Bits 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
public abstract GetDocsWithField ( string field ) : Bits
field string
return Bits

GetNormValues() public abstract method

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.
public abstract GetNormValues ( string field ) : Lucene.Net.Index.NumericDocValues
field string
return Lucene.Net.Index.NumericDocValues

GetNumericDocValues() public abstract method

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.
public abstract GetNumericDocValues ( string field ) : Lucene.Net.Index.NumericDocValues
field string
return Lucene.Net.Index.NumericDocValues

GetSortedDocValues() public abstract method

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.
public abstract GetSortedDocValues ( string field ) : Lucene.Net.Index.SortedDocValues
field string
return Lucene.Net.Index.SortedDocValues

GetSortedSetDocValues() public abstract method

Returns SortedSetDocValues for this field, or null if no SortedSetDocValues were indexed for this field. The returned instance should only be used by a single thread.
public abstract GetSortedSetDocValues ( string field ) : Lucene.Net.Index.SortedSetDocValues
field string
return Lucene.Net.Index.SortedSetDocValues

GetSumDocFreq() public final method

public final GetSumDocFreq ( string field ) : long
field string
return long

GetSumTotalTermFreq() public final method

public final GetSumTotalTermFreq ( string field ) : long
field string
return long

HasNorms() public method

Returns true if there are norms stored for this field.
public HasNorms ( string field ) : bool
field string
return bool

TermDocsEnum() public method

Returns DocsEnum for the specified term. this will return null if either the field or term does not exist.
public TermDocsEnum ( Lucene.Net.Index.Term term ) : Lucene.Net.Index.DocsEnum
term Lucene.Net.Index.Term
return Lucene.Net.Index.DocsEnum

TermPositionsEnum() public method

Returns DocsAndPositionsEnum for the specified term. this will return null if the field or term does not exist or positions weren't indexed.
public TermPositionsEnum ( Lucene.Net.Index.Term term ) : Lucene.Net.Index.DocsAndPositionsEnum
term Lucene.Net.Index.Term
return Lucene.Net.Index.DocsAndPositionsEnum

Terms() public method

this may return null if the field does not exist.
public Terms ( string field ) : Lucene.Net.Index.Terms
field string
return Lucene.Net.Index.Terms

TotalTermFreq() public final method

Returns the number of documents containing the term t. this method returns 0 if the term or field does not exists. this method does not take into account deleted documents that have not yet been merged away.
public final TotalTermFreq ( Lucene.Net.Index.Term term ) : long
term Lucene.Net.Index.Term
return long