#include <expandweight.h>

Public Member Functions | |
| ExpandWeight (const Xapian::Database &db_, Xapian::doccount rsize_, bool use_exact_termfreq_, double expand_k_) | |
| Constructor. | |
| Xapian::weight | get_weight (TermList *merger, const std::string &term) const |
| Get the expand weight. | |
Private Attributes | |
| const Xapian::Database | db |
| The combined database. | |
| Xapian::doccount | dbsize |
| The number of documents in the whole database. | |
| Xapian::doclength | avlen |
| Average document length in the whole database. | |
| Xapian::doccount | rsize |
| The number of documents in the RSet. | |
| bool | use_exact_termfreq |
| Should we calculate the exact term frequency when generating an ESet? | |
| double | expand_k |
| Parameter k in the probabilistic expand weighting formula. | |
Definition at line 87 of file expandweight.h.
| Xapian::Internal::ExpandWeight::ExpandWeight | ( | const Xapian::Database & | db_, | |
| Xapian::doccount | rsize_, | |||
| bool | use_exact_termfreq_, | |||
| double | expand_k_ | |||
| ) | [inline] |
Constructor.
| db_ | The database. | |
| rsize_ | The number of documents in the RSet. | |
| use_exact_termfreq_ | When expanding over a combined database, should we use the exact termfreq (if false a cheaper approximation is used). | |
| expand_k_ | Parameter k in the probabilistic expand weighting formula. |
Definition at line 126 of file expandweight.h.
| Xapian::weight Xapian::Internal::ExpandWeight::get_weight | ( | TermList * | merger, | |
| const std::string & | term | |||
| ) | const |
Get the expand weight.
| merger | The tree of TermList objects. | |
| term | The current term name. |
Definition at line 38 of file expandweight.cc.
References Xapian::TermIterator::Internal::accumulate_stats(), AssertEqParanoid, AssertRel, avlen, db, Xapian::Internal::ExpandStats::dbsize, dbsize, expand_k, Xapian::Database::get_termfreq(), LOGCALL, LOGLINE, LOGVALUE, Xapian::Internal::ExpandStats::multiplier, RETURN, rsize, Xapian::Internal::ExpandStats::rtermfreq, Xapian::Internal::ExpandStats::termfreq, and use_exact_termfreq.
Referenced by Xapian::ESet::Internal::expand().
Average document length in the whole database.
Definition at line 95 of file expandweight.h.
Referenced by get_weight().
const Xapian::Database Xapian::Internal::ExpandWeight::db [private] |
The number of documents in the whole database.
Definition at line 92 of file expandweight.h.
Referenced by get_weight().
double Xapian::Internal::ExpandWeight::expand_k [private] |
Parameter k in the probabilistic expand weighting formula.
Definition at line 113 of file expandweight.h.
Referenced by get_weight().
The number of documents in the RSet.
Definition at line 98 of file expandweight.h.
Referenced by get_weight().
bool Xapian::Internal::ExpandWeight::use_exact_termfreq [private] |
Should we calculate the exact term frequency when generating an ESet?
This only has any effect if we're using a combined database.
If this member is true, the exact term frequency will be obtained from the Database object. If this member is false, then an approximation is used to estimate the term frequency based on the term frequencies in the sub-databases which we see while collating term statistics, and the relative sizes of the sub-databases.
Definition at line 110 of file expandweight.h.
Referenced by get_weight().