22 #ifndef XAPIAN_INCLUDED_MAXPOSTLIST_H 23 #define XAPIAN_INCLUDED_MAXPOSTLIST_H 61 for (
size_t j = i; j <
n_kids; ++j) {
62 plist[j] = plist[j + 1];
71 template<
class RandomItor>
74 : did(0), n_kids(pl_end - pl_begin), plist(NULL),
75 max_cached(0), db_size(db_size_), matcher(matcher_)
78 std::copy(pl_begin, pl_end, plist);
128 #endif // XAPIAN_INCLUDED_MAXPOSTLIST_H double max_cached
Cached answer to get_maxweight.
N-way OR postlist with wt=max(wt_i).
Abstract base class for postlists.
Xapian::docid get_docid() const
Return the current docid.
PositionList * read_position_list()
Read the position list for the term in the current document and return a pointer to it (owned by the ...
class for performing a match
Xapian::termcount get_unique_terms() const
Return the number of unique terms in the current document.
PostList ** plist
Array of pointers to sub-postlists.
void operator=(const MaxPostList &)
Don't allow assignment.
void erase_sublist(size_t i)
Erase a sub-postlist.
Xapian::docid did
The current docid, or zero if we haven't started or are at_end.
Abstract base class for postlists.
MultiMatch * matcher
Pointer to the matcher object, so we can report pruning.
double get_weight() const
Return the weight contribution for the current position.
unsigned XAPIAN_TERMCOUNT_BASE_TYPE termcount
A counts of terms.
Xapian::doccount db_size
The number of documents in the database.
size_t n_kids
The number of sub-postlists.
Xapian::termcount get_doclength() const
Return the length of current document.
PostList * skip_to(Xapian::docid, double w_min)
Skip forward to the specified docid.
Internal * next()
Advance the current position to the next document in the postlist.
Xapian::doccount get_termfreq_min() const
Get a lower bound on the number of documents indexed by this term.
void recalc_maxweight()
Called by postlists to indicate that they've rearranged themselves and the maxweight now possible is ...
MaxPostList(const MaxPostList &)
Don't allow copying.
Xapian::doccount get_termfreq_est() const
Get an estimate of the number of documents indexed by this term.
unsigned XAPIAN_DOCID_BASE_TYPE doccount
A count of documents.
std::string get_description() const
Return a string description of this object.
Xapian::doccount get_termfreq_max() const
Get an upper bound on the number of documents indexed by this term.
double get_maxweight() const
Return an upper bound on what get_weight() can return.
double recalc_maxweight()
Recalculate the upper bound on what get_weight() can return.
unsigned XAPIAN_DOCID_BASE_TYPE docid
A unique identifier for a document.
Abstract base class for iterating term positions in a document.
bool at_end() const
Return true if the current position is past the last entry in this list.
MaxPostList(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...
Xapian::termcount count_matching_subqs() const
Count the number of leaf subqueries which match at the current position.
Xapian::termcount get_wdf() const
get_wdf() for MaxPostlist returns the sum of the wdfs of the sub postlists which match the current do...