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.TermScorer Class Reference

Expert: A Scorer for documents matching a Term. More...

Inherits Lucene.Net.Search.Scorer.

Public Member Functions

 TermScorer (Weight weight, TermDocs td, Similarity similarity, byte[] norms)
 Construct a TermScorer.
 
override void Score (Collector c)
 Scores and collects all matching documents.
 
override bool Score (Collector c, int end, 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.
 
override int DocID ()
 Returns the following:


 
override int NextDoc ()
 Advances to the next document matching the query.
The iterator over the matching documents is buffered using TermDocs.Read(int[],int[]).
 
override 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).
 
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 TermDocs.SkipTo(int).
 
override System.String ToString ()
 Returns a string representation of this TermScorer.
 

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

Expert: A Scorer for documents matching a Term.

Definition at line 26 of file TermScorer.cs.

Constructor & Destructor Documentation

Lucene.Net.Search.TermScorer.TermScorer ( Weight  weight,
TermDocs  td,
Similarity  similarity,
byte[]  norms 
)

Construct a TermScorer.

Parameters
weightThe weight of the Term in the query.
tdAn iterator over the documents matching the Term.
similarityThe Similarity implementation to be used for score computations.
normsThe field norms of the document fields for the Term.

Definition at line 57 of file TermScorer.cs.

Member Function Documentation

override int Lucene.Net.Search.TermScorer.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 TermDocs.SkipTo(int).

Parameters
targetThe target document number.
Returns
the matching document or -1 if none exist.

Implements Lucene.Net.Search.DocIdSetIterator.

Definition at line 151 of file TermScorer.cs.

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

Returns the following:

Implements Lucene.Net.Search.DocIdSetIterator.

Definition at line 101 of file TermScorer.cs.

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

Advances to the next document matching the query.
The iterator over the matching documents is buffered using TermDocs.Read(int[],int[]).

Returns
the document matching the query or -1 if there are no more documents.

Implements Lucene.Net.Search.DocIdSetIterator.

Definition at line 113 of file TermScorer.cs.

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

Scores and collects all matching documents.

Parameters
collectorThe collector to which all matching documents are passed.

Reimplemented from Lucene.Net.Search.Scorer.

Definition at line 68 of file TermScorer.cs.

override bool Lucene.Net.Search.TermScorer.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 from Lucene.Net.Search.Scorer.

Definition at line 74 of file TermScorer.cs.

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

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

Implements Lucene.Net.Search.Scorer.

Definition at line 133 of file TermScorer.cs.

override System.String Lucene.Net.Search.TermScorer.ToString ( )

Returns a string representation of this TermScorer.

Definition at line 179 of file TermScorer.cs.


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