38 const vector<PostList*>::const_iterator &terms_begin,
39 const vector<PostList*>::const_iterator &terms_end,
43 terms(terms_begin, terms_end)
45 size_t n =
terms.size();
69 LOGCALL(MATCH,
bool,
"PhrasePostList::test_doc", NO_ARGS);
77 unsigned read_hwm = 0;
84 if (++i ==
terms.size()) {
97 }
while (b - base <=
window);
113 vector<PostList *>::const_iterator i =
terms.begin();
115 while (++i !=
terms.end()) {
116 wdf = min(wdf, (*i)->get_wdf());
124 string m =
"(Phrase ";
Class for estimating the total number of matching documents.
void start_position_list(unsigned i)
Start reading from the i-th position list.
PhrasePostList(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
std::string get_description() const
Return a string description of this object.
Xapian::termcount get_wdf() const
Return the wdf for the document at the current position.
bool test_doc()
Test if the current document contains the terms as a phrase.
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.
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 Xapian::termpos get_position() const =0
Return the current position.
#define LOGCALL(CATEGORY, TYPE, FUNC, PARAMS)
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.
Various assertion macros.
Return docs containing terms forming a particular phrase.
Abstract base class for iterating term positions in a document.
Convert types to std::string.