C# Класс Lucene.Net.Index.DirectoryReader

An IndexReader which reads indexes with multiple segments.
Наследование: IndexReader
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
internalDirectory Lucene.Net.Store.Directory
readOnly bool

Открытые методы

Метод Описание
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

Защищенные методы

Метод Описание
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

Приватные методы

Метод Описание
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

Описание методов

AcquireWriteLock() защищенный Метод

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
Результат void

Clone() публичный Метод

public Clone ( bool openReadOnly ) : IndexReader
openReadOnly bool
Результат IndexReader

Clone() публичный Метод

public Clone ( ) : Object
Результат Object

Directory() публичный Метод

Returns the directory this index resides in.
public Directory ( ) : Lucene.Net.Store.Directory
Результат Lucene.Net.Store.Directory

DoClose() защищенный Метод

protected DoClose ( ) : void
Результат void

DoCommit() защищенный Метод

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
Результат void

DoDelete() защищенный Метод

protected DoDelete ( int n ) : void
n int
Результат void

DoSetNorm() защищенный Метод

protected DoSetNorm ( int n, System field, byte value_Renamed ) : void
n int
field System
value_Renamed byte
Результат void

DoUndeleteAll() защищенный Метод

protected DoUndeleteAll ( ) : void
Результат void

DocFreq() публичный Метод

public DocFreq ( Lucene.Net.Index.Term t ) : int
t Lucene.Net.Index.Term
Результат int

Document() публичный Метод

public Document ( int n, Lucene.Net.Documents.FieldSelector fieldSelector ) : Lucene.Net.Documents.Document
n int
fieldSelector Lucene.Net.Documents.FieldSelector
Результат Lucene.Net.Documents.Document

GetFieldNames() публичный Метод

public GetFieldNames ( IndexReader fieldNames ) : ICollection
fieldNames IndexReader
Результат ICollection

GetSequentialSubReaders() публичный Метод

public GetSequentialSubReaders ( ) : Lucene.Net.Index.IndexReader[]
Результат Lucene.Net.Index.IndexReader[]

GetTermFreqVector() публичный Метод

public GetTermFreqVector ( int n, System field ) : ITermFreqVector
n int
field System
Результат ITermFreqVector

GetTermFreqVector() публичный Метод

public GetTermFreqVector ( int docNumber, System field, Lucene.Net.Index.TermVectorMapper mapper ) : void
docNumber int
field System
mapper Lucene.Net.Index.TermVectorMapper
Результат void

GetTermFreqVector() публичный Метод

public GetTermFreqVector ( int docNumber, Lucene.Net.Index.TermVectorMapper mapper ) : void
docNumber int
mapper Lucene.Net.Index.TermVectorMapper
Результат void

GetTermFreqVectors() публичный Метод

public GetTermFreqVectors ( int n ) : ITermFreqVector[]
n int
Результат ITermFreqVector[]

HasNorms() публичный Метод

public HasNorms ( System field ) : bool
field System
Результат bool

IsCurrent() публичный Метод

public IsCurrent ( ) : bool
Результат bool

IsDeleted() публичный Метод

public IsDeleted ( int n ) : bool
n int
Результат bool

IsOptimized() публичный Метод

Checks is the index is optimized (if it has a single segment and no deletions)
public IsOptimized ( ) : bool
Результат bool

ListCommits() публичный статический Метод

public static ListCommits ( Lucene.Net.Store.Directory dir ) : ICollection
dir Lucene.Net.Store.Directory
Результат ICollection

Norms() публичный Метод

public Norms ( System field ) : byte[]
field System
Результат byte[]

Norms() публичный Метод

public Norms ( System field, byte result, int offset ) : void
field System
result byte
offset int
Результат void

NumDocs() публичный Метод

public NumDocs ( ) : int
Результат int

Reopen() публичный Метод

public Reopen ( ) : IndexReader
Результат IndexReader

Reopen() публичный Метод

public Reopen ( IndexCommit commit ) : IndexReader
commit IndexCommit
Результат IndexReader

Reopen() публичный Метод

public Reopen ( bool openReadOnly ) : IndexReader
openReadOnly bool
Результат IndexReader

TermDocs() публичный Метод

public TermDocs ( ) : TermDocs
Результат TermDocs

TermPositions() публичный Метод

public TermPositions ( ) : TermPositions
Результат TermPositions

Terms() публичный Метод

public Terms ( ) : Lucene.Net.Index.TermEnum
Результат Lucene.Net.Index.TermEnum

Terms() публичный Метод

public Terms ( Lucene.Net.Index.Term term ) : Lucene.Net.Index.TermEnum
term Lucene.Net.Index.Term
Результат Lucene.Net.Index.TermEnum

Описание свойств

internalDirectory защищенное свойство

protected Lucene.Net.Store.Directory internalDirectory
Результат Lucene.Net.Store.Directory

readOnly защищенное свойство

protected bool readOnly
Результат bool