#include <weightinternal.h>

Public Member Functions | |
| Internal () | |
| Internal & | operator+= (const Internal &inc) |
| Add in the supplied statistics from a sub-database. | |
| void | mark_wanted_terms (const Xapian::Query::Internal &query) |
| Mark the terms we need to collate stats for. | |
| void | accumulate_stats (const Xapian::Database::Internal &sub_db, const Xapian::RSet &rset) |
| Accumulate the rtermfreqs for terms marked by mark_wanted_terms(). | |
| Xapian::doccount | get_termfreq (const std::string &term) const |
| Get the term-frequency of the given term. | |
| Xapian::doccount | get_reltermfreq (const std::string &term) const |
| Get the relevant term-frequency for the given term. | |
| Xapian::doclength | get_average_length () const |
| void | set_bounds_from_db (const Xapian::Database &db_) |
| Set the "bounds" stats from Database db. | |
| std::string | get_description () const |
| Return a std::string describing this object. | |
Public Attributes | |
| totlen_t | total_length |
| Total length of all documents in the collection. | |
| Xapian::doccount | collection_size |
| Number of documents in the collection. | |
| Xapian::doccount | rset_size |
| Number of relevant documents in the collection. | |
| Xapian::Database | db |
| Database to get the bounds on doclength and wdf from. | |
| std::map< std::string, TermFreqs > | termfreqs |
| Map of term frequencies and relevant term frequencies for the collection. | |
Definition at line 59 of file weightinternal.h.
| Xapian::Weight::Internal::Internal | ( | ) | [inline] |
Definition at line 77 of file weightinternal.h.
| void Xapian::Weight::Internal::accumulate_stats | ( | const Xapian::Database::Internal & | sub_db, | |
| const Xapian::RSet & | rset | |||
| ) |
Accumulate the rtermfreqs for terms marked by mark_wanted_terms().
Definition at line 77 of file weightinternal.cc.
References Assert, AssertEq, collection_size, Xapian::Database::Internal::get_doccount(), Xapian::Database::Internal::get_termfreq(), Xapian::Database::Internal::get_total_length(), Xapian::RSet::internal, Xapian::Database::Internal::open_term_list(), rset_size, Xapian::RSet::size(), termfreqs, and total_length.
Referenced by LocalSubMatch::prepare_match().
| Xapian::doclength Xapian::Weight::Internal::get_average_length | ( | ) | const [inline] |
Definition at line 112 of file weightinternal.h.
References collection_size, rare, and total_length.
Referenced by Xapian::Weight::init_().
| string Xapian::Weight::Internal::get_description | ( | ) | const |
Return a std::string describing this object.
Definition at line 124 of file weightinternal.cc.
References collection_size, rset_size, Xapian::Internal::str(), and total_length.
| Xapian::doccount Xapian::Weight::Internal::get_reltermfreq | ( | const std::string & | term | ) | const |
Get the relevant term-frequency for the given term.
This is "r_t", the number of relevant documents in the collection indexed by the given term.
Definition at line 113 of file weightinternal.cc.
References Assert, and termfreqs.
Referenced by Xapian::Weight::init_().
| Xapian::doccount Xapian::Weight::Internal::get_termfreq | ( | const std::string & | term | ) | const |
Get the term-frequency of the given term.
This is "n_t", the number of documents in the collection indexed by the given term.
Definition at line 66 of file weightinternal.cc.
References Assert, and termfreqs.
Referenced by Xapian::Weight::init_(), and LocalSubMatch::postlist_from_op_leaf_query().
| void Xapian::Weight::Internal::mark_wanted_terms | ( | const Xapian::Query::Internal & | query | ) | [inline] |
Mark the terms we need to collate stats for.
Definition at line 87 of file weightinternal.h.
References Xapian::Query::Internal::get_terms(), and termfreqs.
Referenced by MultiMatch::MultiMatch().
| Weight::Internal & Xapian::Weight::Internal::operator+= | ( | const Internal & | inc | ) |
Add in the supplied statistics from a sub-database.
Used for remote databases, where we pass across a serialised stats object, unserialise it, and add it to our total.
Definition at line 51 of file weightinternal.cc.
References collection_size, rset_size, termfreqs, and total_length.
| void Xapian::Weight::Internal::set_bounds_from_db | ( | const Xapian::Database & | db_ | ) | [inline] |
Set the "bounds" stats from Database db.
Definition at line 118 of file weightinternal.h.
References db.
Referenced by RemoteServer::msg_query(), and MultiMatch::MultiMatch().
Number of documents in the collection.
Definition at line 65 of file weightinternal.h.
Referenced by accumulate_stats(), get_average_length(), get_description(), ValueRangePostList::get_termfreq_est_using_stats(), OrPostList::get_termfreq_est_using_stats(), MultiXorPostList::get_termfreq_est_using_stats(), MultiAndPostList::get_termfreq_est_using_stats(), AndNotPostList::get_termfreq_est_using_stats(), LeafPostList::get_termfreq_est_using_stats(), Xapian::Weight::init_(), LocalSubMatch::make_synonym_postlist(), operator+=(), serialise_stats(), and unserialise_stats().
Database to get the bounds on doclength and wdf from.
Definition at line 71 of file weightinternal.h.
Referenced by Xapian::Weight::init_(), and set_bounds_from_db().
Number of relevant documents in the collection.
Definition at line 68 of file weightinternal.h.
Referenced by accumulate_stats(), get_description(), ValueRangePostList::get_termfreq_est_using_stats(), OrPostList::get_termfreq_est_using_stats(), MultiXorPostList::get_termfreq_est_using_stats(), MultiAndPostList::get_termfreq_est_using_stats(), AndNotPostList::get_termfreq_est_using_stats(), LeafPostList::get_termfreq_est_using_stats(), Xapian::Weight::init_(), operator+=(), serialise_stats(), and unserialise_stats().
| std::map<std::string, TermFreqs> Xapian::Weight::Internal::termfreqs |
Map of term frequencies and relevant term frequencies for the collection.
Definition at line 75 of file weightinternal.h.
Referenced by accumulate_stats(), get_reltermfreq(), get_termfreq(), LeafPostList::get_termfreq_est_using_stats(), mark_wanted_terms(), operator+=(), serialise_stats(), and unserialise_stats().
Total length of all documents in the collection.
Definition at line 62 of file weightinternal.h.
Referenced by accumulate_stats(), get_average_length(), get_description(), operator+=(), serialise_stats(), and unserialise_stats().