CLucene - a full-featured, c++ search engine
API Documentation


lucene::search::TermScorer Class Reference

#include <TermScorer.h>

Inheritance diagram for lucene::search::TermScorer:
lucene::search::Scorer lucene::debug::LuceneBase

List of all members.

Public Member Functions

 TermScorer (Weight *weight, lucene::index::TermDocs *td, Similarity *similarity, uint8_t *_norms)
 ~TermScorer ()
int32_t doc () const
 Returns the current document number.
bool next ()
 Advance to the next document matching the query.
bool skipTo (int32_t target)
 Skips to the first match beyond the current whose document number is greater than or equal to target.
void explain (int32_t doc, Explanation *ret)
 Returns an explanation of the score for doc.
TCHAR * toString ()
 Returns an string which explains the object.
float_t score ()
 Returns the score of the current document.

Constructor & Destructor Documentation

lucene::search::TermScorer::TermScorer ( Weight weight,
lucene::index::TermDocs td,
Similarity similarity,
uint8_t *  _norms 
)
lucene::search::TermScorer::~TermScorer (  ) 

Member Function Documentation

int32_t lucene::search::TermScorer::doc (  )  const [inline, virtual]

Returns the current document number.

Initially invalid, until next() is called the first time.

Implements lucene::search::Scorer.

void lucene::search::TermScorer::explain ( int32_t  doc,
Explanation ret 
) [virtual]

Returns an explanation of the score for doc.

Implements lucene::search::Scorer.

bool lucene::search::TermScorer::next (  )  [virtual]

Advance to the next document matching the query.

Returns true iff there is another match.

Implements lucene::search::Scorer.

float_t lucene::search::TermScorer::score (  )  [virtual]

Returns the score of the current document.

Initially invalid, until next() is called the first time.

Implements lucene::search::Scorer.

bool lucene::search::TermScorer::skipTo ( int32_t  target  )  [virtual]

Skips to the first match beyond the current whose document number is greater than or equal to target.

Returns true iff there is such a match.

Behaves as if written:

   boolean skipTo(int32_t target) {
     do {
       if (!next())
 	     return false;
     } while (target > doc());
     return true;
   }
 

Most implementations are considerably more efficient than that.

Implements lucene::search::Scorer.

TCHAR* lucene::search::TermScorer::toString (  )  [virtual]

Returns an string which explains the object.

Implements lucene::search::Scorer.


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

clucene.sourceforge.net