C# Class Lucene.Net.Index.ParallelReader

An IndexReader which reads multiple, parallel indexes. Each index added must have the same number of documents, but typically each contains different fields. Each document contains the union of the fields of all documents with the same document number. When searching, matches for a query term are from the first index added that has the field.

This is useful, e.g., with collections that have large fields which change rarely and small fields that change more frequently. The smaller fields may be re-indexed in a new index and both indexes may be searched together.

Warning: It is up to you to make sure all indexes are created and modified the same way. For example, if you add documents to one index, you need to add the same documents in the same order to the other indexes. Failure to do so will result in undefined behavior.

Inheritance: IndexReader
Afficher le fichier Open project: synhershko/lucene.net Class Usage Examples

Méthodes publiques

Méthode Description
Add ( IndexReader reader ) : void

Add an IndexReader.

Add ( IndexReader reader, bool ignoreStoredFields ) : void

Add an IndexReader whose stored fields will not be returned. This can accellerate search when stored fields are only needed from a subset of the IndexReaders.

of documents

of IndexReader.MaxDoc

Clone ( ) : Object
DocFreq ( Lucene.Net.Index.Term term ) : int
Document ( int n, Lucene.Net.Documents.FieldSelector fieldSelector ) : Lucene.Net.Documents.Document
GetFieldNames ( IndexReader fieldNames ) : System.Collections.Generic.ICollection
GetSubReaders ( ) : 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

Checks recursively if all subreaders are up to date.

IsDeleted ( int n ) : bool
IsOptimized ( ) : bool

Checks recursively if all subindexes are optimized

Norms ( System field ) : byte[]
Norms ( System field, byte result, int offset ) : void
NumDocs ( ) : int
ParallelReader ( ) : System

Construct a ParallelReader.

Note that all subreaders are closed if this ParallelReader is closed.

ParallelReader ( bool closeSubReaders ) : System

Construct a ParallelReader.

Reopen ( ) : IndexReader

Tries to reopen the subreaders.
If one or more subreaders could be re-opened (i. e. subReader.reopen() returned a new instance != subReader), then a new ParallelReader instance is returned, otherwise this instance is returned.

A re-opened instance might share one or more subreaders with the old instance. Index modification operations result in undefined behavior when performed before the old instance is closed. (see IndexReader.Reopen()).

If subreaders are shared, then the reference count of those readers is increased to ensure that the subreaders remain open until the last referring reader is closed.

TermDocs ( ) : TermDocs
TermDocs ( Lucene.Net.Index.Term term ) : TermDocs
TermPositions ( ) : TermPositions
TermPositions ( Lucene.Net.Index.Term term ) : TermPositions
Terms ( ) : Lucene.Net.Index.TermEnum
Terms ( Lucene.Net.Index.Term term ) : Lucene.Net.Index.TermEnum

Méthodes protégées

Méthode Description
DoClose ( ) : void
DoCommit ( string>.IDictionary commitUserData ) : void
DoDelete ( int n ) : void
DoReopen ( bool doClone ) : IndexReader
DoSetNorm ( int n, System field, byte value_Renamed ) : void
DoUndeleteAll ( ) : void

Method Details

Add() public méthode

Add an IndexReader.
public Add ( IndexReader reader ) : void
reader IndexReader
Résultat void

Add() public méthode

Add an IndexReader whose stored fields will not be returned. This can accellerate search when stored fields are only needed from a subset of the IndexReaders. of documents of IndexReader.MaxDoc
public Add ( IndexReader reader, bool ignoreStoredFields ) : void
reader IndexReader
ignoreStoredFields bool
Résultat void

Clone() public méthode

public Clone ( ) : Object
Résultat System.Object

DoClose() protected méthode

protected DoClose ( ) : void
Résultat void

DoCommit() protected méthode

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

DoReopen() protected méthode

protected DoReopen ( bool doClone ) : IndexReader
doClone bool
Résultat IndexReader

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 term ) : int
term 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 ) : System.Collections.Generic.ICollection
fieldNames IndexReader
Résultat System.Collections.Generic.ICollection

GetSubReaders() public méthode

public GetSubReaders ( ) : 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

Checks recursively if all subreaders are up to date.
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 recursively if all subindexes are optimized
public IsOptimized ( ) : bool
Résultat bool

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

ParallelReader() public méthode

Construct a ParallelReader.

Note that all subreaders are closed if this ParallelReader is closed.

public ParallelReader ( ) : System
Résultat System

ParallelReader() public méthode

Construct a ParallelReader.
public ParallelReader ( bool closeSubReaders ) : System
closeSubReaders bool indicates whether the subreaders should be closed /// when this ParallelReader is closed ///
Résultat System

Reopen() public méthode

Tries to reopen the subreaders.
If one or more subreaders could be re-opened (i. e. subReader.reopen() returned a new instance != subReader), then a new ParallelReader instance is returned, otherwise this instance is returned.

A re-opened instance might share one or more subreaders with the old instance. Index modification operations result in undefined behavior when performed before the old instance is closed. (see IndexReader.Reopen()).

If subreaders are shared, then the reference count of those readers is increased to ensure that the subreaders remain open until the last referring reader is closed.

public Reopen ( ) : IndexReader
Résultat IndexReader

TermDocs() public méthode

public TermDocs ( ) : TermDocs
Résultat TermDocs

TermDocs() public méthode

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

TermPositions() public méthode

public TermPositions ( ) : TermPositions
Résultat TermPositions

TermPositions() public méthode

public TermPositions ( Lucene.Net.Index.Term term ) : TermPositions
term Lucene.Net.Index.Term
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