34 for (
size_t i = 0; i < n_kids; ++i) {
54 for (
size_t i = 0; i < n_kids; ++i) {
55 if (plist[i]->get_docid() == did)
56 res = max(res, plist[i]->get_weight(doclen,
72 double result = plist[0]->recalc_maxweight();
73 for (
size_t i = 1; i < n_kids; ++i) {
74 result = max(result, plist[i]->recalc_maxweight());
88 if (cur_did <= old_did) {
90 if (old_did == 0 || cur_did == old_did) {
91 res = plist[i]->
next(w_min);
93 res = plist[i]->
skip_to(old_did + 1, w_min);
100 if (plist[i]->at_end()) {
111 matcher->force_recalc();
113 cur_did = plist[i]->get_docid();
116 if (did == 0 || cur_did < did) {
134 for (
size_t i = 0; i < n_kids; ++i) {
138 if (cur_did < did_min) {
145 if (plist[i]->at_end()) {
151 matcher->force_recalc();
153 cur_did = plist[i]->get_docid();
156 if (did == 0 || cur_did < did) {
172 plist[0]->get_docid_range(first, last);
173 for (
size_t i = 1; i != n_kids; ++i) {
175 plist[i]->get_docid_range(f, l);
176 first = min(first, f);
185 desc += plist[0]->get_description();
186 for (
size_t i = 1; i < n_kids; ++i) {
188 desc += plist[i]->get_description();
198 for (
size_t i = 0; i < n_kids; ++i) {
199 if (plist[i]->get_docid() == did)
200 totwdf += plist[i]->get_wdf();
void get_docid_range(Xapian::docid &first, Xapian::docid &last) const
Get the bounds on the range of docids this PostList can return.
Xapian::termcount count_matching_subqs() const
Count the number of leaf subqueries which match at the current position.
double recalc_maxweight()
Recalculate the upper bound on what get_weight() can return.
double get_weight(Xapian::termcount doclen, Xapian::termcount unique_terms, Xapian::termcount wdfdocmax) const
Return the weight contribution for the current position.
bool at_end() const
Return true if the current position is past the last entry in this list.
Xapian::termcount get_wdf() const
get_wdf() for MaxPostlist returns the sum of the wdfs of the sub postlists which match the current do...
Xapian::docid get_docid() const
Return the current docid.
PostList * skip_to(Xapian::docid, double w_min)
Skip forward to the specified docid.
std::string get_description() const
Return a string description of this object.
Abstract base class for postlists.
virtual PostList * skip_to(Xapian::docid did, double w_min)=0
Skip forward to the specified docid.
virtual PostList * next(double w_min)=0
Advance the current position to the next document in the postlist.
virtual Xapian::docid get_docid() const =0
Return the current docid.
PostList * next()
Advance the current position to the next document in the postlist.
#define UNSIGNED_OVERFLOW_OK(X)
N-way OR postlist with wt=max(wt_i)
unsigned XAPIAN_TERMCOUNT_BASE_TYPE termcount
A counts of terms.
unsigned XAPIAN_DOCID_BASE_TYPE docid
A unique identifier for a document.
Various assertion macros.