22 #ifndef XAPIAN_INCLUDED_MULTIXORPOSTLIST_H 23 #define XAPIAN_INCLUDED_MULTIXORPOSTLIST_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_total(0), db_size(db_size_), matcher(matcher_)
78 std::copy(pl_begin, pl_end, plist);
128 #endif // XAPIAN_INCLUDED_MULTIXORPOSTLIST_H double recalc_maxweight()
Recalculate the upper bound on what get_weight() can return.
Abstract base class for postlists.
bool at_end() const
Return true if the current position is past the last entry in this list.
Xapian::doccount get_termfreq_est() const
Get an estimate of the number of documents indexed by this term.
class for performing a match
size_t n_kids
The number of sub-postlists.
Xapian::docid get_docid() const
Return the current docid.
Xapian::docid did
The current docid, or zero if we haven't started or are at_end.
Abstract base class for postlists.
MultiXorPostList(const MultiXorPostList &)
Don't allow copying.
void operator=(const MultiXorPostList &)
Don't allow assignment.
unsigned XAPIAN_TERMCOUNT_BASE_TYPE termcount
A counts of terms.
Xapian::termcount count_matching_subqs() const
Count the number of leaf subqueries which match at the current position.
MultiXorPostList(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::doccount get_termfreq_max() const
Get an upper bound on the number of documents indexed by this term.
Xapian::doccount get_termfreq_min() const
Get a lower bound on the number of documents indexed by this term.
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 ...
void erase_sublist(size_t i)
Erase a sub-postlist.
PostList ** plist
Array of pointers to sub-postlists.
Xapian::doccount db_size
The number of documents in the database.
Xapian::termcount get_unique_terms() const
Return the number of unique terms in the current document.
double get_weight() const
Return the weight contribution for the current position.
double max_total
Total maximum weight the XOR could possibly return.
PositionList * read_position_list()
Read the position list for the term in the current document and return a pointer to it (owned by the ...
PostList * skip_to(Xapian::docid, double w_min)
Skip forward to the specified docid.
The frequencies for a term.
unsigned XAPIAN_DOCID_BASE_TYPE doccount
A count of documents.
Xapian::termcount get_doclength() const
Return the length of current document.
std::string get_description() const
Return a string description of this object.
MultiMatch * matcher
Pointer to the matcher object, so we can report pruning.
unsigned XAPIAN_DOCID_BASE_TYPE docid
A unique identifier for a document.
Abstract base class for iterating term positions in a document.
TermFreqs get_termfreq_est_using_stats(const Xapian::Weight::Internal &stats) const
Get an estimate for the termfreq and reltermfreq, given the stats.
Xapian::termcount get_wdf() const
get_wdf() for MultiXorPostlists returns the sum of the wdfs of the sub postlists which match the curr...
double get_maxweight() const
Return an upper bound on what get_weight() can return.