22 #ifndef XAPIAN_INCLUDED_LEAFPOSTLIST_H
23 #define XAPIAN_INCLUDED_LEAFPOSTLIST_H
79 weight_->
init_(*stats, qlen,
term, wqf, factor,
this);
83 std::swap(
weight, const_weight_);
90 max_part = std::max(max_part, result);
Abstract base class for leaf postlists.
LeafPostList(const std::string &term_)
Only constructable as a base class for derived classes.
Xapian::doccount get_termfreq_max() const
Get an upper bound on the number of documents indexed by this term.
double resolve_lazy_termweight(Xapian::Weight *weight_, Xapian::Weight::Internal *stats, Xapian::termcount qlen, Xapian::termcount wqf, double factor)
Xapian::doccount get_termfreq_est() const
Get an estimate of the number of documents indexed by this term.
Xapian::termcount count_matching_subqs() const
Count the number of leaf subqueries which match at the current position.
double get_maxweight() const
Return an upper bound on what get_weight() can return.
virtual Xapian::doccount get_termfreq() const =0
Return the exact term frequency.
Xapian::doccount get_termfreq_min() const
Get a lower bound on the number of documents indexed by this term.
void set_termweight(const Xapian::Weight *weight_)
Set the weighting scheme to use during matching.
virtual Xapian::termcount get_wdf_upper_bound() const =0
const Xapian::Weight * weight
void gather_position_lists(OrPositionList *orposlist)
Gather PositionList* objects for a subtree.
double get_weight() const
Return the weight contribution for the current position.
virtual LeafPostList * open_nearby_postlist(const std::string &term_) const
Open another postlist from the same database.
void set_term(const std::string &term_)
Set the term name.
void operator=(const LeafPostList &)
Don't allow assignment.
TermFreqs get_termfreq_est_using_stats(const Xapian::Weight::Internal &stats) const
Get an estimate for the termfreq and reltermfreq, given the stats.
std::string term
The term name for this postlist (empty for an alldocs postlist).
LeafPostList(const LeafPostList &)
Don't allow copying.
double recalc_maxweight()
Recalculate the upper bound on what get_weight() can return.
Abstract base class for postlists.
Class to hold statistics for a given collection.
std::map< std::string, TermFreqs > termfreqs
Map of term frequencies and relevant term frequencies for the collection.
Abstract base class for weighting schemes.
virtual double get_maxpart() const =0
Return an upper bound on what get_sumpart() can return for any document.
bool get_sumpart_needs_doclength_() const
void init_(const Internal &stats, Xapian::termcount query_len_, const std::string &term, Xapian::termcount wqf_, double factor)
The Xapian namespace contains public interfaces for the Xapian library.
unsigned XAPIAN_TERMCOUNT_BASE_TYPE termcount
A counts of terms.
unsigned XAPIAN_DOCID_BASE_TYPE doccount
A count of documents.
Abstract base class for postlists.
The frequencies for a term.