Ticket #378: patch

File patch, 741 bytes (added by Richard Boulton, 15 years ago)

Corrected patch

  • matcher/multiandpostlist.cc

     
    194194        return NULL;
    195195    }
    196196    did = plist[0]->get_docid();
     197    Xapian::weight max_remaining = max_total - (max_wt[0] - plist[0]->get_weight());
    197198    for (size_t i = 1; i < n_kids; ++i) {
     199        if (max_remaining < w_min) {
     200            next_helper(0, w_min);
     201            goto advanced_plist0;
     202        }
    198203        bool valid;
    199204        check_helper(i, did, w_min, valid);
    200205        if (!valid) {
     
    210215            skip_to_helper(0, new_did, w_min);
    211216            goto advanced_plist0;
    212217        }
     218        max_remaining -= max_wt[i] - plist[i]->get_weight();
    213219    }
    214220    return NULL;
    215221}