Xapian::Internal::ExpandWeight Class Reference

Class for calculating probabilistic ESet term weights. More...

#include <expandweight.h>

Collaboration diagram for Xapian::Internal::ExpandWeight:

Collaboration graph
[legend]

List of all members.

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.


Detailed Description

Class for calculating probabilistic ESet term weights.

Definition at line 87 of file expandweight.h.


Constructor & Destructor Documentation

Xapian::Internal::ExpandWeight::ExpandWeight ( const Xapian::Database db_,
Xapian::doccount  rsize_,
bool  use_exact_termfreq_,
double  expand_k_ 
) [inline]

Constructor.

Parameters:
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.


Member Function Documentation

Xapian::weight Xapian::Internal::ExpandWeight::get_weight ( TermList merger,
const std::string &  term 
) const


Member Data Documentation

Average document length in the whole database.

Definition at line 95 of file expandweight.h.

Referenced by get_weight().

The combined database.

Definition at line 89 of file expandweight.h.

Referenced by get_weight().

The number of documents in the whole database.

Definition at line 92 of file expandweight.h.

Referenced by get_weight().

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().

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().


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

Documentation for Xapian (version 1.2.8).
Generated on 14 Dec 2011 by Doxygen 1.5.9.