22 #ifndef XAPIAN_INCLUDED_MULTIANDPOSTLIST_H    23 #define XAPIAN_INCLUDED_MULTIANDPOSTLIST_H    71         return w_min - (max_total - max_wt[n]);
   121     template<
class RandomItor>
   124         : did(0), n_kids(pl_end - pl_begin), plist(NULL), max_wt(NULL),
   125           max_total(0), db_size(db_size_), matcher(matcher_)
   132         std::partial_sort_copy(pl_begin, pl_end, plist, plist + n_kids,
   138                      double lmax, 
double rmax,
   140         : did(0), n_kids(2), plist(NULL), max_wt(NULL),
   141           max_total(lmax + rmax), db_size(db_size_), matcher(matcher_)
   148             std::swap(lmax, rmax);
   203 #endif // XAPIAN_INCLUDED_MULTIANDPOSTLIST_H Xapian::termcount count_matching_subqs() const
Count the number of leaf subqueries which match at the current position. 
 
size_t n_kids
The number of sub-postlists. 
 
double * max_wt
Array of maximum weights for the sub-postlists. 
 
void allocate_plist_and_max_wt()
Allocate plist and max_wt arrays of n_kids each. 
 
Abstract base class for postlists. 
 
double max_total
Total maximum weight (== sum of max_wt values). 
 
Comparison functor which orders PostList* by ascending get_termfreq_est(). 
 
class for performing a match 
 
void gather_position_lists(OrPositionList *orposlist)
Gather PositionList* objects for a subtree. 
 
Xapian::doccount get_termfreq_min() const
Get a lower bound on the number of documents indexed by this term. 
 
PostList * skip_to(Xapian::docid, double w_min)
Skip forward to the specified docid. 
 
void next_helper(size_t n, double w_min)
Call next on a sub-postlist n, and handle any pruning. 
 
Xapian::termcount get_doclength() const
Return the length of current document. 
 
MultiAndPostList(RandomItor pl_begin, RandomItor pl_end, MultiMatch *matcher_, Xapian::doccount db_size_)
Construct from 2 random-access iterators to a container of PostList*, a pointer to the matcher...
 
void skip_to_helper(size_t n, Xapian::docid did_min, double w_min)
Call skip_to on a sub-postlist n, and handle any pruning. 
 
std::string get_description() const
Return a string description of this object. 
 
virtual Internal * skip_to(Xapian::docid did, double w_min)=0
Skip forward to the specified docid. 
 
bool at_end() const
Return true if the current position is past the last entry in this list. 
 
void operator=(const MultiAndPostList &)
Don't allow assignment. 
 
Xapian::docid get_docid() const
Return the current docid. 
 
Abstract base class for postlists. 
 
Xapian::doccount db_size
The number of documents in the database. 
 
TermFreqs get_termfreq_est_using_stats(const Xapian::Weight::Internal &stats) const
Get an estimate for the termfreq and reltermfreq, given the stats. 
 
PostList * find_next_match(double w_min)
Advance the sublists to the next match. 
 
virtual Internal * check(Xapian::docid did, double w_min, bool &valid)
Check if the specified docid occurs in this postlist. 
 
double get_maxweight() const
Return an upper bound on what get_weight() can return. 
 
Xapian::termcount get_wdf() const
get_wdf() for MultiAndPostlists returns the sum of the wdfs of the sub postlists. ...
 
unsigned XAPIAN_TERMCOUNT_BASE_TYPE termcount
A counts of terms. 
 
Xapian::docid did
The current docid, or zero if we haven't started or are at_end. 
 
MultiAndPostList(PostList *l, PostList *r, double lmax, double rmax, MultiMatch *matcher_, Xapian::doccount db_size_)
Construct as the decay product of an OrPostList or AndMaybePostList. 
 
virtual Xapian::doccount get_termfreq_est() const =0
Get an estimate of the number of documents indexed by this term. 
 
PostList ** plist
Array of pointers to sub-postlists. 
 
void check_helper(size_t n, Xapian::docid did_min, double w_min, bool &valid)
Call check on a sub-postlist n, and handle any pruning. 
 
Class to hold statistics for a given collection. 
 
Internal * next()
Advance the current position to the next document in the postlist. 
 
void recalc_maxweight()
Called by postlists to indicate that they've rearranged themselves and the maxweight now possible is ...
 
double new_min(double w_min, size_t n)
Calculate the new minimum weight for sub-postlist n. 
 
The frequencies for a term. 
 
virtual Internal * next(double w_min)=0
Advance the current position to the next document in the postlist. 
 
unsigned XAPIAN_DOCID_BASE_TYPE doccount
A count of documents. 
 
Xapian::doccount get_termfreq_max() const
Get an upper bound on the number of documents indexed by this term. 
 
MultiMatch * matcher
Pointer to the matcher object, so we can report pruning. 
 
bool operator()(const PostList *a, const PostList *b) const
Order by ascending get_termfreq_est(). 
 
Various assertion macros. 
 
double get_weight() const
Return the weight contribution for the current position. 
 
unsigned XAPIAN_DOCID_BASE_TYPE docid
A unique identifier for a document. 
 
Xapian::termcount get_unique_terms() const
Return the number of unique terms in the current document. 
 
double recalc_maxweight()
Recalculate the upper bound on what get_weight() can return. 
 
Xapian::doccount get_termfreq_est() const
Get an estimate of the number of documents indexed by this term. 
 
MultiAndPostList(const MultiAndPostList &)
Don't allow copying.