Apache Lucene.Net 2.4.0 Class Library API

SegmentReader Members

SegmentReader overview

Public Static Methods

GetOverloaded.  

Public Instance Constructors

SegmentReader Constructor Initializes a new instance of the SegmentReader class.

Public Instance Properties

ProxStream_ForNUnitTest 

Public Instance Methods

Close (inherited from IndexReader) Closes files associated with this index. Also saves any new deletions to disk. No other methods should be called after this has been called.
Commit (inherited from IndexReader) Commit changes resulting from delete, undeleteAll, or setNorm operations If an exception is hit, then either no changes or all changes will have been committed to the index (transactional semantics).
DecRef 
DeleteDocument (inherited from IndexReader)Deletes the document numbered
docNum
. Once a document is deleted it will not appear in TermDocs or TermPostitions enumerations. Attempts to read its field with the {@link #document} method will result in an error. The presence of this document may still be reflected in the {@link #docFreq} statistic, though this will be corrected eventually as the index is further modified.
DeleteDocuments (inherited from IndexReader)Deletes all documents that have a given
term
indexed. This is useful if one uses a document field to hold a unique ID string for the document. Then to delete such a document, one merely constructs a term with the appropriate field and the unique ID string as its text and passes it to this method. See {@link #DeleteDocument(int)} for information about when this deletion will become effective.
Directory (inherited from DirectoryIndexReader)Returns the directory this index resides in.
DocFreq 
DocumentOverloaded.  
Document (inherited from IndexReader)Overloaded. Returns the stored fields of the
n
th
Document
in this index.
EnsureOpen (inherited from IndexReader) 
Equals (inherited from Object)Determines whether the specified Object is equal to the current Object.
FieldInfosReturns the field infos of this segment
Flush (inherited from IndexReader)
foo 
GetFieldNames 
GetHashCode (inherited from Object)Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetIndexCommit (inherited from DirectoryIndexReader) 
GetRefCount (inherited from IndexReader) 
GetTermFreqVectorOverloaded. Return a term frequency vector for the specified document and field. The vector returned contains term numbers and frequencies for all terms in the specified field of this document, if the field had storeTermVector flag set. If the flag was not set, the method returns null.
GetTermFreqVectorsReturn an array of term frequency vectors for the specified document. The array contains a vector for each vectorized field in the document. Each vector vector contains term numbers and frequencies for all terms in a given vectorized field. If no such fields existed, the method returns null.
GetTermInfosIndexDivisor 
GetType (inherited from Object)Gets the Type of the current instance.
GetVersion (inherited from DirectoryIndexReader) Version number when this IndexReader was opened.
HasDeletions 
HasNorms 
IncRef Increments the RC of this reader, as well as of all norms this reader is using
IsCurrent (inherited from DirectoryIndexReader) Check whether this IndexReader is still using the current (i.e., most recently committed) version of the index. If a writer has committed any changes to the index since this reader was opened, this will return
false
, in which case you must open a new IndexReader in order to see the changes. See the description of the
autoCommit
flag which controls when the {@link IndexWriter} actually commits changes to the index.
IsDeleted 
IsOptimized (inherited from DirectoryIndexReader) Checks is the index is optimized (if it has a single segment and no deletions)
MaxDoc 
NormsOverloaded.  
NormsClosedOverloaded.  
NumDeletedDocs (inherited from IndexReader) Returns the number of deleted docs.
NumDocs 
Reopen (inherited from DirectoryIndexReader) 
SetDeletionPolicy (inherited from DirectoryIndexReader) 
SetNorm (inherited from IndexReader)Overloaded. Expert: Resets the normalization factor for the named field of the named document. The norm represents the product of the field's {@link Lucene.Net.Documents.Fieldable#SetBoost(float) boost} and its {@link Similarity#LengthNorm(String, int) length normalization}. Thus, to preserve the length normalization values when resetting this, one should base the new value upon the old.
SetTermInfosIndexDivisor 
TermDocsOverloaded.  
TermDocs (inherited from IndexReader)Overloaded. Returns an unpositioned {@link TermDocs} enumerator.
TermPositionsOverloaded.  
TermPositions (inherited from IndexReader)Overloaded. Returns an unpositioned {@link TermPositions} enumerator.
TermsOverloaded.  
ToString (inherited from Object)Returns a String that represents the current Object.
UndeleteAll (inherited from IndexReader)Undeletes all documents currently marked as deleted in this index.

Protected Instance Methods

Finalize (inherited from DirectoryIndexReader)Release the write lock, if needed.
MemberwiseClone (inherited from Object)Creates a shallow copy of the current Object.

Protected Internal Instance Fields

closeDirectory (inherited from DirectoryIndexReader) 
directory (inherited from DirectoryIndexReader) 
hasChanges (inherited from IndexReader) 

Protected Internal Instance Methods

AcquireWriteLock (inherited from DirectoryIndexReader) Tries to acquire the WriteLock on this directory. this method is only valid if this IndexReader is directory owner.
CommitChanges 
DoClose 
DoCommit (inherited from DirectoryIndexReader) Commit changes resulting from delete, undeleteAll, or setNorm operations If an exception is hit, then either no changes or all changes will have been committed to the index (transactional semantics).
DoDelete 
DoReopen 
DoSetNorm 
DoUndeleteAll 
GetNorms 

See Also

SegmentReader Class | Lucene.Net.Index Namespace