36 max_wt =
new double [n_kids]();
47 for (
size_t i = 0; i < n_kids; ++i) {
68 for (
size_t i = 0; i < n_kids; ++i) {
69 result += plist[i]->get_weight(doclen, unique_terms, wdfdocmax);
84 for (
size_t i = 0; i < n_kids; ++i) {
85 double new_max = plist[i]->recalc_maxweight();
96 if (plist[0]->at_end()) {
101 for (
size_t i = 1; i < n_kids; ++i) {
103 check_helper(i, did, w_min, valid);
105 next_helper(0, w_min);
106 goto advanced_plist0;
108 if (plist[i]->at_end()) {
113 if (new_did != did) {
114 skip_to_helper(0, new_did, w_min);
115 goto advanced_plist0;
124 next_helper(0, w_min);
125 return find_next_match(w_min);
131 skip_to_helper(0, did_min, w_min);
132 return find_next_match(w_min);
138 plist[0]->get_docid_range(first, last);
139 for (
size_t i = 1; i != n_kids; ++i) {
141 plist[i]->get_docid_range(f, l);
142 first = max(first, f);
144 if (last < first)
break;
152 desc += plist[0]->get_description();
153 for (
size_t i = 1; i < n_kids; ++i) {
155 desc += plist[i]->get_description();
165 for (
size_t i = 0; i < n_kids; ++i) {
166 totwdf += plist[i]->get_wdf();
175 for (
size_t i = 0; i < n_kids; ++i) {
176 total += plist[i]->count_matching_subqs();
184 for (
size_t i = 0; i < n_kids; ++i) {
185 plist[i]->gather_position_lists(orposlist);
Xapian::termcount count_matching_subqs() const
Count the number of leaf subqueries which match at the current position.
double get_weight(Xapian::termcount doclen, Xapian::termcount unique_terms, Xapian::termcount wdfdocmax) const
Return the weight contribution for the current position.
PostList * find_next_match(double w_min)
Advance the sublists to the next match.
Xapian::docid get_docid() const
Return the current docid.
PostList * skip_to(Xapian::docid, double w_min)
Skip forward to the specified docid.
void get_docid_range(Xapian::docid &first, Xapian::docid &last) const
Get the bounds on the range of docids this PostList can return.
void gather_position_lists(OrPositionList *orposlist)
Gather PositionList* objects for a subtree.
double recalc_maxweight()
Recalculate the upper bound on what get_weight() can return.
Xapian::termcount get_wdf() const
Get the within-document frequency.
bool at_end() const
Return true if the current position is past the last entry in this list.
void allocate_plist_and_max_wt()
Allocate plist and max_wt arrays of n_kids each.
std::string get_description() const
Return a string description of this object.
Abstract base class for postlists.
virtual Xapian::docid get_docid() const =0
Return the current docid.
PostList * next()
Advance the current position to the next document in the postlist.
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.