C# Class Lucene.Net.Index.DirectoryReader

An IndexReader which reads indexes with multiple segments.
Inheritance: IndexReader
Afficher le fichier Open project: synhershko/lucene.net Class Usage Examples

Protected Properties

Свойство Type Description
internalDirectory Lucene.Net.Store.Directory
readOnly bool

Méthodes publiques

Méthode Description
Clone ( bool openReadOnly ) : IndexReader
Clone ( ) : Object
Directory ( ) : Lucene.Net.Store.Directory

Returns the directory this index resides in.

DocFreq ( Lucene.Net.Index.Term t ) : int
Document ( int n, Lucene.Net.Documents.FieldSelector fieldSelector ) : Lucene.Net.Documents.Document
GetFieldNames ( IndexReader fieldNames ) : ICollection
GetSequentialSubReaders ( ) : Lucene.Net.Index.IndexReader[]
GetTermFreqVector ( int n, System field ) : ITermFreqVector
GetTermFreqVector ( int docNumber, System field, Lucene.Net.Index.TermVectorMapper mapper ) : void
GetTermFreqVector ( int docNumber, Lucene.Net.Index.TermVectorMapper mapper ) : void
GetTermFreqVectors ( int n ) : ITermFreqVector[]
HasNorms ( System field ) : bool
IsCurrent ( ) : bool
IsDeleted ( int n ) : bool
IsOptimized ( ) : bool

Checks is the index is optimized (if it has a single segment and no deletions)

ListCommits ( Lucene.Net.Store.Directory dir ) : ICollection
Norms ( System field ) : byte[]
Norms ( System field, byte result, int offset ) : void
NumDocs ( ) : int
Reopen ( ) : IndexReader
Reopen ( IndexCommit commit ) : IndexReader
Reopen ( bool openReadOnly ) : IndexReader
TermDocs ( ) : TermDocs
TermPositions ( ) : TermPositions
Terms ( ) : Lucene.Net.Index.TermEnum
Terms ( Lucene.Net.Index.Term term ) : Lucene.Net.Index.TermEnum

Méthodes protégées

Méthode Description
AcquireWriteLock ( ) : void

Tries to acquire the WriteLock on this directory. this method is only valid if this IndexReader is directory owner.

if another writer has this index open (write.lock could not be obtained)

DoClose ( ) : void
DoCommit ( string>.IDictionary commitUserData ) : void

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 ( int n ) : void
DoSetNorm ( int n, System field, byte value_Renamed ) : void
DoUndeleteAll ( ) : void

Private Methods

Méthode Description
DirectoryReader ( IndexWriter writer, SegmentInfos infos, int termInfosIndexDivisor ) : System
DirectoryReader ( Lucene.Net.Store.Directory directory, SegmentInfos sis, IndexDeletionPolicy deletionPolicy, bool readOnly, int termInfosIndexDivisor ) : System

Construct reading the named set of readers.

DirectoryReader ( Lucene.Net.Store.Directory directory, SegmentInfos infos, Lucene.Net.Index.SegmentReader oldReaders, int oldStarts, byte[]>.IEnumerable oldNormsCache, bool readOnly, bool doClone, int termInfosIndexDivisor ) : System

This constructor is only used for Reopen()

DoReopen ( SegmentInfos infos, bool doClone, bool openReadOnly ) : DirectoryReader
DoReopen ( bool openReadOnly, IndexCommit commit ) : IndexReader
DoReopenFromWriter ( bool openReadOnly, IndexCommit commit ) : IndexReader
DoReopenNoWriter ( bool openReadOnly, IndexCommit commit ) : IndexReader
GetFieldNames ( IndexReader fieldNames, IndexReader subReaders ) : ICollection
Initialize ( Lucene.Net.Index.SegmentReader subReaders ) : void
Open ( Lucene.Net.Store.Directory directory, IndexDeletionPolicy deletionPolicy, IndexCommit commit, bool readOnly, int termInfosIndexDivisor ) : IndexReader
ReaderIndex ( int n ) : int
ReaderIndex ( int n, int starts, int numSubReaders ) : int
RollbackCommit ( ) : void
StartCommit ( ) : void

Method Details

AcquireWriteLock() protected méthode

Tries to acquire the WriteLock on this directory. this method is only valid if this IndexReader is directory owner. if another writer has this index open (write.lock could not be obtained)
protected AcquireWriteLock ( ) : void
Résultat void

Clone() public méthode

public Clone ( bool openReadOnly ) : IndexReader
openReadOnly bool
Résultat IndexReader

Clone() public méthode

public Clone ( ) : Object
Résultat Object

Directory() public méthode

Returns the directory this index resides in.
public Directory ( ) : Lucene.Net.Store.Directory
Résultat Lucene.Net.Store.Directory

DoClose() protected méthode

protected DoClose ( ) : void
Résultat void

DoCommit() protected méthode

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).

protected DoCommit ( string>.IDictionary commitUserData ) : void
commitUserData string>.IDictionary
Résultat void

DoDelete() protected méthode

protected DoDelete ( int n ) : void
n int
Résultat void

DoSetNorm() protected méthode

protected DoSetNorm ( int n, System field, byte value_Renamed ) : void
n int
field System
value_Renamed byte
Résultat void

DoUndeleteAll() protected méthode

protected DoUndeleteAll ( ) : void
Résultat void

DocFreq() public méthode

public DocFreq ( Lucene.Net.Index.Term t ) : int
t Lucene.Net.Index.Term
Résultat int

Document() public méthode

public Document ( int n, Lucene.Net.Documents.FieldSelector fieldSelector ) : Lucene.Net.Documents.Document
n int
fieldSelector Lucene.Net.Documents.FieldSelector
Résultat Lucene.Net.Documents.Document

GetFieldNames() public méthode

public GetFieldNames ( IndexReader fieldNames ) : ICollection
fieldNames IndexReader
Résultat ICollection

GetSequentialSubReaders() public méthode

public GetSequentialSubReaders ( ) : Lucene.Net.Index.IndexReader[]
Résultat Lucene.Net.Index.IndexReader[]

GetTermFreqVector() public méthode

public GetTermFreqVector ( int n, System field ) : ITermFreqVector
n int
field System
Résultat ITermFreqVector

GetTermFreqVector() public méthode

public GetTermFreqVector ( int docNumber, System field, Lucene.Net.Index.TermVectorMapper mapper ) : void
docNumber int
field System
mapper Lucene.Net.Index.TermVectorMapper
Résultat void

GetTermFreqVector() public méthode

public GetTermFreqVector ( int docNumber, Lucene.Net.Index.TermVectorMapper mapper ) : void
docNumber int
mapper Lucene.Net.Index.TermVectorMapper
Résultat void

GetTermFreqVectors() public méthode

public GetTermFreqVectors ( int n ) : ITermFreqVector[]
n int
Résultat ITermFreqVector[]

HasNorms() public méthode

public HasNorms ( System field ) : bool
field System
Résultat bool

IsCurrent() public méthode

public IsCurrent ( ) : bool
Résultat bool

IsDeleted() public méthode

public IsDeleted ( int n ) : bool
n int
Résultat bool

IsOptimized() public méthode

Checks is the index is optimized (if it has a single segment and no deletions)
public IsOptimized ( ) : bool
Résultat bool

ListCommits() public static méthode

public static ListCommits ( Lucene.Net.Store.Directory dir ) : ICollection
dir Lucene.Net.Store.Directory
Résultat ICollection

Norms() public méthode

public Norms ( System field ) : byte[]
field System
Résultat byte[]

Norms() public méthode

public Norms ( System field, byte result, int offset ) : void
field System
result byte
offset int
Résultat void

NumDocs() public méthode

public NumDocs ( ) : int
Résultat int

Reopen() public méthode

public Reopen ( ) : IndexReader
Résultat IndexReader

Reopen() public méthode

public Reopen ( IndexCommit commit ) : IndexReader
commit IndexCommit
Résultat IndexReader

Reopen() public méthode

public Reopen ( bool openReadOnly ) : IndexReader
openReadOnly bool
Résultat IndexReader

TermDocs() public méthode

public TermDocs ( ) : TermDocs
Résultat TermDocs

TermPositions() public méthode

public TermPositions ( ) : TermPositions
Résultat TermPositions

Terms() public méthode

public Terms ( ) : Lucene.Net.Index.TermEnum
Résultat Lucene.Net.Index.TermEnum

Terms() public méthode

public Terms ( Lucene.Net.Index.Term term ) : Lucene.Net.Index.TermEnum
term Lucene.Net.Index.Term
Résultat Lucene.Net.Index.TermEnum

Property Details

internalDirectory protected_oe property

protected Lucene.Net.Store.Directory internalDirectory
Résultat Lucene.Net.Store.Directory

readOnly protected_oe property

protected bool readOnly
Résultat bool