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 | Properties | List of all members
Lucene.Net.Search.Scorer Class Referenceabstract

Expert: Common scoring functionality for different types of queries. More...

Inherits Lucene.Net.Search.DocIdSetIterator.

Inherited by Lucene.Net.Search.BooleanScorer, Lucene.Net.Search.BooleanScorer2, Lucene.Net.Search.BooleanScorer2.SingleMatchScorer, Lucene.Net.Search.BooleanScorer.BucketScorer, Lucene.Net.Search.ConjunctionScorer, Lucene.Net.Search.ConstantScoreQuery.ConstantScorer, Lucene.Net.Search.DisjunctionMaxScorer, Lucene.Net.Search.DisjunctionSumScorer, Lucene.Net.Search.FilteredQuery.AnonymousClassWeight.AnonymousClassScorer, Lucene.Net.Search.Function.CustomScoreQuery.CustomScorer, Lucene.Net.Search.Function.ValueSourceQuery.ValueSourceScorer, Lucene.Net.Search.MatchAllDocsQuery.MatchAllScorer, Lucene.Net.Search.PhraseScorer, Lucene.Net.Search.ReqExclScorer, Lucene.Net.Search.ReqOptSumScorer, Lucene.Net.Search.ScoreCachingWrappingScorer, Lucene.Net.Search.Spans.SpanScorer, Lucene.Net.Search.TermScorer, and Lucene.Net.Spatial.Util.FunctionQuery.AllScorer.

Public Member Functions

virtual void Score (Collector collector)
 Scores and collects all matching documents.
 
virtual bool Score (Collector collector, int max, int firstDocID)
 Expert: Collects matching documents in a range. Hook for optimization. Note, firstDocID is added to ensure that DocIdSetIterator.NextDoc() was called before this method.
 
abstract float Score ()
 Returns the score of the current document matching the query. Initially invalid, until DocIdSetIterator.NextDoc() or DocIdSetIterator.Advance(int) is called the first time, or when called from within Collector.Collect(int).
 
- Public Member Functions inherited from Lucene.Net.Search.DocIdSetIterator
abstract int DocID ()
 Returns the following:


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

 
abstract int Advance (int target)
 Advances to the first beyond the current whose document number is greater than or equal to target. Returns the current document number or NO_MORE_DOCS if there are no more docs in the set. Behaves as if written:
 

Properties

virtual Similarity Similarity [get]
 Returns the Similarity implementation used by this scorer.
 

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.
 

Detailed Description

Expert: Common scoring functionality for different types of queries.

A Scorer iterates over documents matching a query in increasing order of doc Id.

Document scores are computed using a given Similarity implementation.

NOTE: The values Float.Nan, Float.NEGATIVE_INFINITY and Float.POSITIVE_INFINITY are not valid scores. Certain collectors (eg TopScoreDocCollector ) will not properly collect hits with these scores.

Definition at line 41 of file Scorer.cs.

Member Function Documentation

virtual void Lucene.Net.Search.Scorer.Score ( Collector  collector)
virtual

Scores and collects all matching documents.

Parameters
collectorThe collector to which all matching documents are passed.

Reimplemented in Lucene.Net.Search.BooleanScorer, Lucene.Net.Search.BooleanScorer2, Lucene.Net.Search.DisjunctionSumScorer, Lucene.Net.Search.ScoreCachingWrappingScorer, and Lucene.Net.Search.TermScorer.

Definition at line 62 of file Scorer.cs.

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

Expert: Collects matching documents in a range. Hook for optimization. Note, firstDocID is added to ensure that DocIdSetIterator.NextDoc() was called before this method.

Parameters
collectorThe collector to which all matching documents are passed.
maxDo not score documents past this.
firstDocIDThe first document ID (ensures DocIdSetIterator.NextDoc() is called before this method.
Returns
true if more matching documents may remain.

Reimplemented in Lucene.Net.Search.BooleanScorer2, Lucene.Net.Search.BooleanScorer, Lucene.Net.Search.DisjunctionSumScorer, Lucene.Net.Search.TermScorer, and Lucene.Net.Search.ScoreCachingWrappingScorer.

Definition at line 87 of file Scorer.cs.

abstract float Lucene.Net.Search.Scorer.Score ( )
pure virtual

Property Documentation

virtual Similarity Lucene.Net.Search.Scorer.Similarity
get

Returns the Similarity implementation used by this scorer.

Definition at line 55 of file Scorer.cs.


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