40 const vector<PostList*>::const_iterator &terms_begin,
41 const vector<PostList*>::const_iterator &terms_end,
45 terms(terms_begin, terms_end)
47 size_t n =
terms.size();
77 LOGCALL(MATCH,
bool,
"NearPostList::test_doc", NO_ARGS);
111 if (
pos > last) last =
pos;
133 if (newpos - end[-1]->get_position() >=
window) {
155 last = max(last,
poslists[0]->get_position());
205 vector<PostList *>::const_iterator i =
terms.begin();
207 while (++i !=
terms.end()) {
208 wdf = min(wdf, (*i)->get_wdf());
Class for estimating the total number of matching documents.
NearPostList(PostList *source_, EstimateOp *estimate_op_, Xapian::termpos window_, const std::vector< PostList * >::const_iterator &terms_begin, const std::vector< PostList * >::const_iterator &terms_end, PostListTree *pltree_)
std::vector< PostList * > terms
Xapian::termcount get_wdf() const
Return the wdf for the document at the current position.
std::string get_description() const
Return a string description of this object.
bool test_doc()
Test if the current document contains the terms within the window.
Base class for classes which filter another PostList.
Xapian::doccount accepted
Number of times test_doc() returned true.
Xapian::doccount rejected
Number of times test_doc() returned false.
PostList * skip_to(Xapian::docid did, double w_min)
Skip forward to the specified docid.
Abstract base class for postlists.
Xapian::doccount get_termfreq() const
Get an estimate of the number of documents this PostList will return.
virtual Xapian::termcount get_wdf() const
Return the wdf for the document at the current position.
PostList * next()
Advance the current position to the next document in the postlist.
virtual std::string get_description() const =0
Return a string description of this object.
Xapian::doccount termfreq
Estimate of the number of documents this PostList will return.
Abstract base class for iterating term positions in a document.
virtual bool next()=0
Advance to the next entry in the 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.
#define LOGCALL(CATEGORY, TYPE, FUNC, PARAMS)
C++ STL heap implementation with extensions.
void pop(_RandomAccessIterator first, _RandomAccessIterator last, _Compare comp)
void replace(_RandomAccessIterator first, _RandomAccessIterator last, _Compare comp)
void push(_RandomAccessIterator first, _RandomAccessIterator last, _Compare comp)
void make(_RandomAccessIterator first, _RandomAccessIterator last, _Compare comp)
void sort(_RandomAccessIterator first, _RandomAccessIterator last, _Compare comp)
string str(int value)
Convert int to std::string.
unsigned XAPIAN_TERMCOUNT_BASE_TYPE termcount
A counts of terms.
unsigned XAPIAN_TERMPOS_BASE_TYPE termpos
A term position within a document or query.
Return docs containing terms within a specified window.
Various assertion macros.
Abstract base class for iterating term positions in a document.
Convert types to std::string.
bool operator()(const PositionList *a, const PositionList *b) const
bool operator()(const PostList *a, const PostList *b) const