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


lucene::search::PhraseScorer Class Reference

#include <PhraseScorer.h>

Inheritance diagram for lucene::search::PhraseScorer:
lucene::search::Scorer lucene::debug::LuceneBase lucene::search::ExactPhraseScorer lucene::search::SloppyPhraseScorer

List of all members.

Public Member Functions

 PhraseScorer (Weight *weight, lucene::index::TermPositions **tps, int32_t *positions, Similarity *similarity, uint8_t *norms)
virtual ~PhraseScorer ()
int32_t doc () const
 Returns the current document number.
bool next ()
 Advance to the next document matching the query.
float_t score ()
 Returns the score of the current document.
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.

Protected Member Functions

virtual float_t phraseFreq ()=0
void pqToList ()
void firstToLast ()

Protected Attributes

uint8_t * norms
float_t value
PhraseQueuepq
PhrasePositionsfirst
PhrasePositionslast

Constructor & Destructor Documentation

lucene::search::PhraseScorer::PhraseScorer ( Weight weight,
lucene::index::TermPositions **  tps,
int32_t *  positions,
Similarity similarity,
uint8_t *  norms 
)
virtual lucene::search::PhraseScorer::~PhraseScorer (  )  [virtual]

Member Function Documentation

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

Returns the current document number.

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

Implements lucene::search::Scorer.

References lucene::search::PhrasePositions::doc.

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

Returns an explanation of the score for doc.

Implements lucene::search::Scorer.

void lucene::search::PhraseScorer::firstToLast (  )  [protected]
bool lucene::search::PhraseScorer::next (  )  [virtual]

Advance to the next document matching the query.

Returns true iff there is another match.

Implements lucene::search::Scorer.

virtual float_t lucene::search::PhraseScorer::phraseFreq (  )  [protected, pure virtual]
void lucene::search::PhraseScorer::pqToList (  )  [protected]
float_t lucene::search::PhraseScorer::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::PhraseScorer::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::PhraseScorer::toString (  )  [virtual]

Returns an string which explains the object.

Implements lucene::search::Scorer.


Member Data Documentation


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

clucene.sourceforge.net