CLucene - a full-featured, c++ search engine
API Documentation
#include <BooleanScorer.h>
Classes | |
| class | Bucket |
| class | BucketTable |
| class | Collector |
| class | SubScorer |
Public Member Functions | |
| LUCENE_STATIC_CONSTANT (int32_t, BucketTable_SIZE=1024) | |
| BooleanScorer (Similarity *similarity) | |
| ~BooleanScorer () | |
| void | add (Scorer *scorer, const bool required, const bool prohibited) |
| 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. | |
| void | computeCoordFactors () |
Public Attributes | |
| int32_t | requiredMask |
| int32_t | prohibitedMask |
| float_t * | coordFactors |
| lucene::search::BooleanScorer::BooleanScorer | ( | Similarity * | similarity | ) |
| lucene::search::BooleanScorer::~BooleanScorer | ( | ) |
| void lucene::search::BooleanScorer::add | ( | Scorer * | scorer, | |
| const bool | required, | |||
| const bool | prohibited | |||
| ) |
| void lucene::search::BooleanScorer::computeCoordFactors | ( | ) |
| int32_t lucene::search::BooleanScorer::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::BooleanScorer::explain | ( | int32_t | doc, | |
| Explanation * | ret | |||
| ) | [virtual] |
Returns an explanation of the score for doc.
Implements lucene::search::Scorer.
| lucene::search::BooleanScorer::LUCENE_STATIC_CONSTANT | ( | int32_t | , | |
| BucketTable_SIZE | = 1024 | |||
| ) |
| bool lucene::search::BooleanScorer::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::BooleanScorer::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::BooleanScorer::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::BooleanScorer::toString | ( | ) | [virtual] |
Returns an string which explains the object.
Implements lucene::search::Scorer.