36 for (
auto pl : pls) size += pl->get_approx_size();
55 LOGCALL(EXPAND,
bool,
"OrPositionList::next", NO_ARGS);
56 bool first = current.empty();
57 if (first) current.resize(pls.size());
61 for (
size_t i = 0; i != pls.size(); ++i) {
64 if (first || current[i] <= old_pos) {
71 current_pos = min(current_pos, pos);
73 if (i != j) pls[j] = pls[i];
87 LOGCALL(EXPAND,
bool,
"OrPositionList::skip_to", termpos);
88 bool first = current.empty();
89 if (!first && termpos <= current_pos)
91 if (first) current.resize(pls.size());
94 for (
size_t i = 0; i != pls.size(); ++i) {
97 if (first || termpos > current[i]) {
104 current_pos = min(current_pos, pos);
106 if (i != j) pls[j] = pls[i];
bool next()
Advance to the next entry in the positionlist.
virtual bool next()=0
Advance to the next entry in the positionlist.
bool skip_to(Xapian::termpos termpos)
Skip forward to the specified position.
Xapian::termpos get_position() const
Return the current position.
unsigned XAPIAN_TERMCOUNT_BASE_TYPE termcount
A counts of terms.
Xapian::termcount get_approx_size() const
Return approximate size of this positionlist.
virtual bool skip_to(Xapian::termpos termpos)=0
Skip forward to the specified position.
virtual Xapian::termpos get_position() const =0
Return the current position.
unsigned XAPIAN_TERMPOS_BASE_TYPE termpos
A term position within a document or query.
Abstract base class for iterating term positions in a document.
#define LOGCALL(CATEGORY, TYPE, FUNC, PARAMS)
Merge two PositionList objects using an OR operation.