Lucene.Net  3.0.3
Lucene.Net is a .NET port of the Java Lucene Indexing Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties
Public Member Functions | List of all members
Lucene.Net.Search.DisjunctionSumScorer Class Reference

A Scorer for OR like queries, counterpart of ConjunctionScorer. This Scorer implements DocIdSetIterator.Advance(int) and uses skipTo() on the given Scorers. More...

Inherits Lucene.Net.Search.Scorer.

Inherited by Lucene.Net.Search.BooleanScorer2.AnonymousClassDisjunctionSumScorer.

Public Member Functions

 DisjunctionSumScorer (System.Collections.Generic.IList< Scorer > subScorers, int minimumNrMatchers)
 Construct a DisjunctionScorer.
 
 DisjunctionSumScorer (System.Collections.Generic.IList< Scorer > subScorers)
 Construct a DisjunctionScorer, using one as the minimum number of matching subscorers.
 
override void Score (Collector collector)
 Scores and collects all matching documents.
 
override bool Score (Collector collector, int max, int firstDocID)
 Expert: Collects matching documents in a range. Hook for optimization. Note that NextDoc() must be called once before this method is called for the first time.
 
override int NextDoc ()
 Advances to the next document in the set and returns the doc it is currently on, or NO_MORE_DOCS if there are no more docs in the set.

 
override float Score ()
 Returns the score of the current document matching the query. Initially invalid, until NextDoc() is called the first time.
 
override int DocID ()
 Returns the following:


 
virtual int NrMatchers ()
 Returns the number of subscorers matching the current document. Initially invalid, until NextDoc() is called the first time.
 
override int Advance (int target)
 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.
 

Additional Inherited Members

- Static Public Attributes inherited from Lucene.Net.Search.DocIdSetIterator
static readonly int NO_MORE_DOCS = System.Int32.MaxValue
 When returned by NextDoc(), Advance(int) and DocID() it means there are no more docs in the iterator.
 
- Properties inherited from Lucene.Net.Search.Scorer
virtual Similarity Similarity [get]
 Returns the Similarity implementation used by this scorer.
 

Detailed Description

A Scorer for OR like queries, counterpart of ConjunctionScorer. This Scorer implements DocIdSetIterator.Advance(int) and uses skipTo() on the given Scorers.

Definition at line 28 of file DisjunctionSumScorer.cs.

Constructor & Destructor Documentation

Lucene.Net.Search.DisjunctionSumScorer.DisjunctionSumScorer ( System.Collections.Generic.IList< Scorer subScorers,
int  minimumNrMatchers 
)

Construct a DisjunctionScorer.

Parameters
subScorersA collection of at least two subscorers.
minimumNrMatchersThe 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.

Definition at line 72 of file DisjunctionSumScorer.cs.

Lucene.Net.Search.DisjunctionSumScorer.DisjunctionSumScorer ( System.Collections.Generic.IList< Scorer subScorers)

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

Definition at line 95 of file DisjunctionSumScorer.cs.

Member Function Documentation

override int Lucene.Net.Search.DisjunctionSumScorer.Advance ( int  target)
virtual

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.

Parameters
targetThe target document number.
Returns
the document whose number is greater than or equal to the given target, or -1 if none exist.

Implements Lucene.Net.Search.DocIdSetIterator.

Definition at line 251 of file DisjunctionSumScorer.cs.

override int Lucene.Net.Search.DisjunctionSumScorer.DocID ( )
virtual

Returns the following:

Implements Lucene.Net.Search.DocIdSetIterator.

Definition at line 228 of file DisjunctionSumScorer.cs.

override int Lucene.Net.Search.DisjunctionSumScorer.NextDoc ( )
virtual

Advances to the next document in the set and returns the doc it is currently on, or NO_MORE_DOCS if there are no more docs in the set.

NOTE: after the iterator has exhausted you should not call this method, as it may result in unpredicted behavior.

Implements Lucene.Net.Search.DocIdSetIterator.

Definition at line 153 of file DisjunctionSumScorer.cs.

virtual int Lucene.Net.Search.DisjunctionSumScorer.NrMatchers ( )
virtual

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

Definition at line 236 of file DisjunctionSumScorer.cs.

override void Lucene.Net.Search.DisjunctionSumScorer.Score ( Collector  collector)
virtual

Scores and collects all matching documents.

Parameters
collectorThe collector to which all matching documents are passed through.

Reimplemented from Lucene.Net.Search.Scorer.

Definition at line 118 of file DisjunctionSumScorer.cs.

override bool Lucene.Net.Search.DisjunctionSumScorer.Score ( Collector  collector,
int  max,
int  firstDocID 
)
virtual

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

Parameters
collectorThe collector to which all matching documents are passed through.
maxDo not score documents past this.
firstDocID
Returns
true if more matching documents may remain.

Reimplemented from Lucene.Net.Search.Scorer.

Definition at line 138 of file DisjunctionSumScorer.cs.

override float Lucene.Net.Search.DisjunctionSumScorer.Score ( )
virtual

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

Implements Lucene.Net.Search.Scorer.

Definition at line 223 of file DisjunctionSumScorer.cs.


The documentation for this class was generated from the following file: