xapian-core  1.4.25
Public Member Functions | List of all members
Xapian::Internal::TradEWeight Class Reference

This class implements the TradWeight scheme for query expansion. More...

#include <expandweight.h>

+ Inheritance diagram for Xapian::Internal::TradEWeight:
+ Collaboration diagram for Xapian::Internal::TradEWeight:

Public Member Functions

 TradEWeight (const Xapian::Database &db_, Xapian::doccount rsize_, bool use_exact_termfreq_, double expand_k_)
 Constructor. More...
 
double get_weight () const
 Calculate the weight. More...
 
- Public Member Functions inherited from Xapian::Internal::ExpandWeight
 ExpandWeight (const Xapian::Database &db_, Xapian::doccount rsize_, bool use_exact_termfreq_, bool want_collection_freq_)
 Constructor. More...
 
 ExpandWeight (const Xapian::Database &db_, Xapian::doccount rsize_, bool use_exact_termfreq_, bool want_collection_freq_, double expand_k_)
 Constructor. More...
 
void collect_stats (TermList *merger, const std::string &term)
 Get the term statistics. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Xapian::Internal::ExpandWeight
double get_avlen () const
 Return the average length of the database. More...
 
Xapian::doccount get_rsize () const
 Return the number of documents in the RSet. More...
 
Xapian::termcount get_collection_freq () const
 Return the collection frequency of the term. More...
 
Xapian::totallength get_collection_len () const
 Return the length of the collection. More...
 
Xapian::doccount get_dbsize () const
 Return the size of the database. More...
 
- Protected Attributes inherited from Xapian::Internal::ExpandWeight
ExpandStats stats
 An ExpandStats object to accumulate statistics. More...
 

Detailed Description

This class implements the TradWeight scheme for query expansion.

It is the default scheme for query expansion.

Definition at line 222 of file expandweight.h.

Constructor & Destructor Documentation

◆ TradEWeight()

Xapian::Internal::TradEWeight::TradEWeight ( 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_The parameter for TradWeight query expansion.

All the parameters are passed to the parent ExpandWeight object.

Definition at line 235 of file expandweight.h.

Member Function Documentation

◆ get_weight()

double Xapian::Internal::TradEWeight::get_weight ( ) const
virtual

Calculate the weight.

Implements Xapian::Internal::ExpandWeight.

Definition at line 32 of file tradeweight.cc.


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