C# Class Lucene.Net.Search.DisjunctionSumScorer

A Scorer for OR like queries, counterpart of ConjunctionScorer. This Scorer implements DocIdSetIterator.SkipTo(int) and uses skipTo() on the given Scorers.
Inheritance: Lucene.Net.Search.Scorer
Afficher le fichier Open project: synhershko/lucene.net Class Usage Examples

Protected Properties

Свойство Type Description
nrMatchers int
subScorers System.Collections.Generic.IList

Méthodes publiques

Méthode Description
Advance ( int target ) : int

Advances to the first match beyond the current whose document number is greater than or equal to a given target.
The implementation uses the skipTo() method on the subscorers.

DisjunctionSumScorer ( System subScorers ) : System

Construct a DisjunctionScorer, using one as the minimum number of matching subscorers.

DisjunctionSumScorer ( System subScorers, int minimumNrMatchers ) : System

Construct a DisjunctionScorer.

DocID ( ) : int
NextDoc ( ) : int
NrMatchers ( ) : int

Returns the number of subscorers matching the current document. Initially invalid, until Next() is called the first time.

Score ( Collector collector, int max, int firstDocID ) : bool

Expert: Collects matching documents in a range. Hook for optimization. Note that Next() must be called once before this method is called for the first time.

Score ( ) : float

Returns the score of the current document matching the query. Initially invalid, until Next() is called the first time.

Score ( Collector collector ) : void

Scores and collects all matching documents.

Méthodes protégées

Méthode Description
AdvanceAfterCurrent ( ) : bool

Advance all subscorers after the current document determined by the top of the scorerDocQueue. Repeat until at least the minimum number of subscorers match on the same document and all subscorers are after that document or are exhausted.
On entry the scorerDocQueue has at least minimumNrMatchers available. At least the scorer with the minimum document number will be advanced.

Private Methods

Méthode Description
InitScorerDocQueue ( ) : void

Called the first time next() or skipTo() is called to initialize scorerDocQueue.

Method Details

Advance() public méthode

Advances to the first match beyond the current whose document number is greater than or equal to a given target.
The implementation uses the skipTo() method on the subscorers.
public Advance ( int target ) : int
target int The target document number. ///
Résultat int

AdvanceAfterCurrent() protected méthode

Advance all subscorers after the current document determined by the top of the scorerDocQueue. Repeat until at least the minimum number of subscorers match on the same document and all subscorers are after that document or are exhausted.
On entry the scorerDocQueue has at least minimumNrMatchers available. At least the scorer with the minimum document number will be advanced.
protected AdvanceAfterCurrent ( ) : bool
Résultat bool

DisjunctionSumScorer() public méthode

Construct a DisjunctionScorer, using one as the minimum number of matching subscorers.
public DisjunctionSumScorer ( System subScorers ) : System
subScorers System
Résultat System

DisjunctionSumScorer() public méthode

Construct a DisjunctionScorer.
public DisjunctionSumScorer ( System subScorers, int minimumNrMatchers ) : System
subScorers System A collection of at least two subscorers. ///
minimumNrMatchers int The positive minimum number of subscorers that should /// match to match this query. ///
When minimumNrMatchers is bigger than /// the number of subScorers, /// no matches will be produced. ///
When minimumNrMatchers equals the number of subScorers, /// it more efficient to use ConjunctionScorer. ///
Résultat System

DocID() public méthode

public DocID ( ) : int
Résultat int

NextDoc() public méthode

public NextDoc ( ) : int
Résultat int

NrMatchers() public méthode

Returns the number of subscorers matching the current document. Initially invalid, until Next() is called the first time.
public NrMatchers ( ) : int
Résultat int

Score() public méthode

Expert: Collects matching documents in a range. Hook for optimization. Note that Next() must be called once before this method is called for the first time.
public Score ( Collector collector, int max, int firstDocID ) : bool
collector Collector The collector to which all matching documents are passed through. ///
max int Do not score documents past this. ///
firstDocID int
Résultat bool

Score() public méthode

Returns the score of the current document matching the query. Initially invalid, until Next() is called the first time.
public Score ( ) : float
Résultat float

Score() public méthode

Scores and collects all matching documents.
public Score ( Collector collector ) : void
collector Collector The collector to which all matching documents are passed through. ///
When this method is used the method should not be used. ///
Résultat void

Property Details

nrMatchers protected_oe property

The number of subscorers that provide the current match.
protected int nrMatchers
Résultat int

subScorers protected_oe property

The subscorers.
protected System.Collections.Generic.IList subScorers
Résultat System.Collections.Generic.IList