CLucene - a full-featured, c++ search engine
API Documentation
#include <PhraseScorer.h>
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 |
| PhraseQueue * | pq |
| PhrasePositions * | first |
| PhrasePositions * | last |
| lucene::search::PhraseScorer::PhraseScorer | ( | Weight * | weight, | |
| lucene::index::TermPositions ** | tps, | |||
| int32_t * | positions, | |||
| Similarity * | similarity, | |||
| uint8_t * | norms | |||
| ) |
| virtual lucene::search::PhraseScorer::~PhraseScorer | ( | ) | [virtual] |
| 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] |
Implemented in lucene::search::ExactPhraseScorer, and lucene::search::SloppyPhraseScorer.
| 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.
PhrasePositions* lucene::search::PhraseScorer::first [protected] |
PhrasePositions* lucene::search::PhraseScorer::last [protected] |
uint8_t* lucene::search::PhraseScorer::norms [protected] |
PhraseQueue* lucene::search::PhraseScorer::pq [protected] |
float_t lucene::search::PhraseScorer::value [protected] |