22 #ifndef XAPIAN_INCLUDED_LEAFPOSTLIST_H
23 #define XAPIAN_INCLUDED_LEAFPOSTLIST_H
29 #include <string_view>
94 weight_->
init_(*stats, qlen,
term, wqf, factor, shard,
this);
98 std::swap(
weight, const_weight_);
104 max_part = std::max(max_part, result);
Abstract base class for leaf postlists.
Xapian::termcount get_collfreq() const
Get the collection frequency of the term.
Xapian::termcount collfreq
The collection frequency of the term.
Xapian::termcount count_matching_subqs() const
Count the number of leaf subqueries which match at the current position.
const std::string & get_term() const
Get the term name.
void set_term(std::string_view term_)
Set the term name.
void operator=(const LeafPostList &)=delete
Don't allow assignment.
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.
LeafPostList(const LeafPostList &)=delete
Don't allow copying.
double resolve_lazy_termweight(Xapian::Weight *weight_, Xapian::Weight::Internal *stats, Xapian::termcount qlen, Xapian::termcount wqf, double factor, const Xapian::Database::Internal *shard)
double get_weight(Xapian::termcount doclen, Xapian::termcount unique_terms, Xapian::termcount wdfdocmax) const
Return the weight contribution for the current position.
LeafPostList(std::string_view term_)
Only constructable as a base class for derived classes.
std::string term
The term name for this postlist (empty for an alldocs postlist).
virtual bool open_nearby_postlist(std::string_view term_, bool need_read_pos, LeafPostList *&pl) const
Open another postlist from the same database.
double recalc_maxweight()
Recalculate the upper bound on what get_weight() can return.
Virtual base class for Database internals.
Abstract base class for postlists.
Xapian::doccount get_termfreq() const
Get an estimate of the number of documents this PostList will return.
Class to hold statistics for a given collection.
std::map< std::string, TermFreqs, std::less<> > 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.
void init_(const Internal &stats, Xapian::termcount query_len_, const std::string &term, Xapian::termcount wqf_, double factor, const Xapian::Database::Internal *shard, void *postlist)
The Xapian namespace contains public interfaces for the Xapian library.
unsigned XAPIAN_TERMCOUNT_BASE_TYPE termcount
A counts of terms.
Abstract base class for postlists.