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
Datei anzeigen Open project: synhershko/lucene.net Class Usage Examples

Protected Properties

Property Type Description
nrMatchers int
subScorers System.Collections.Generic.IList

Public Methods

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

Protected Methods

Method 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

Method Description
InitScorerDocQueue ( ) : void

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

Method Details

Advance() public method

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. ///
return int

AdvanceAfterCurrent() protected method

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
return bool

DisjunctionSumScorer() public method

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

DisjunctionSumScorer() public method

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. ///
return System

DocID() public method

public DocID ( ) : int
return int

NextDoc() public method

public NextDoc ( ) : int
return int

NrMatchers() public method

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

Score() public method

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
return bool

Score() public method

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

Score() public method

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. ///
return void

Property Details

nrMatchers protected_oe property

The number of subscorers that provide the current match.
protected int nrMatchers
return int

subScorers protected_oe property

The subscorers.
protected System.Collections.Generic.IList subScorers
return System.Collections.Generic.IList