CLucene - a full-featured, c++ search engine
API Documentation
#include <Scorer.h>
Public Member Functions | |
| virtual | ~Scorer () |
| Similarity * | getSimilarity () const |
| Returns the Similarity implementation used by this scorer. | |
| virtual void | score (HitCollector *hc) |
| Scores all documents and passes them to a collector. | |
| virtual bool | score (HitCollector *results, const int32_t maxDoc) |
| virtual bool | next ()=0 |
| Advance to the next document matching the query. | |
| virtual int32_t | doc () const =0 |
| Returns the current document number. | |
| virtual float_t | score ()=0 |
| Returns the score of the current document. | |
| virtual bool | skipTo (int32_t target)=0 |
| Skips to the first match beyond the current whose document number is greater than or equal to target. | |
| virtual void | explain (int32_t doc, Explanation *ret)=0 |
Returns an explanation of the score for doc. | |
| virtual TCHAR * | toString ()=0 |
| Returns an string which explains the object. | |
Protected Member Functions | |
| Scorer (Similarity *similarity) | |
| Constructs a Scorer. | |
| lucene::search::Scorer::Scorer | ( | Similarity * | similarity | ) | [protected] |
Constructs a Scorer.
| virtual lucene::search::Scorer::~Scorer | ( | ) | [virtual] |
| Similarity* lucene::search::Scorer::getSimilarity | ( | ) | const |
Returns the Similarity implementation used by this scorer.
| virtual void lucene::search::Scorer::score | ( | HitCollector * | hc | ) | [virtual] |
Scores all documents and passes them to a collector.
| virtual bool lucene::search::Scorer::score | ( | HitCollector * | results, | |
| const int32_t | maxDoc | |||
| ) | [virtual] |
| virtual bool lucene::search::Scorer::next | ( | ) | [pure virtual] |
Advance to the next document matching the query.
Returns true iff there is another match.
| virtual int32_t lucene::search::Scorer::doc | ( | ) | const [pure virtual] |
| virtual float_t lucene::search::Scorer::score | ( | ) | [pure virtual] |
| virtual bool lucene::search::Scorer::skipTo | ( | int32_t | target | ) | [pure 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.
| virtual void lucene::search::Scorer::explain | ( | int32_t | doc, | |
| Explanation * | ret | |||
| ) | [pure virtual] |
Returns an explanation of the score for doc.
| virtual TCHAR* lucene::search::Scorer::toString | ( | ) | [pure virtual] |
Returns an string which explains the object.