34 LOGCALL(MATCH,
PostList *,
"AndNotPostList::advance_to_next_match", w_min | ret);
67 lhead(0), rhead(0), dbsize(dbsize_)
69 LOGCALL_CTOR(MATCH,
"AndNotPostList", left_ | right_ | matcher_ | dbsize_);
85 LOGCALL(MATCH,
PostList *,
"AndNotPostList::sync_and_skip_to",
id | w_min | lh | rh);
114 if (l_min > r_max)
RETURN(l_min - r_max);
136 LOGCALL(MATCH,
TermFreqs,
"AndNotPostList::get_termfreq_est_using_stats", stats);
143 double freqest, relfreqest, collfreqest;
179 LOGCALL(MATCH,
double,
"AndNotPostList::get_weight", NO_ARGS);
187 LOGCALL(MATCH,
double,
"AndNotPostList::get_maxweight", NO_ARGS);
194 LOGCALL(MATCH,
double,
"AndNotPostList::recalc_maxweight", NO_ARGS);
203 LOGCALL(MATCH,
bool,
"AndNotPostList::at_end", NO_ARGS);
Return items which are in A, unless they're in B.
bool next_handling_prune(PostList *&pl, double w_min, MultiMatch *matcher)
bool skip_to_handling_prune(PostList *&pl, Xapian::docid did, double w_min, MultiMatch *matcher)
PostList * sync_and_skip_to(Xapian::docid id, double w_min, Xapian::docid lh, Xapian::docid rh)
Xapian::doccount dbsize
Number of documents in the database this postlist is across.
AndNotPostList(PostList *left, PostList *right, MultiMatch *matcher_, Xapian::doccount dbsize_)
virtual Xapian::termcount get_unique_terms() const
Return the number of unique terms in the current document.
Xapian::doccount get_termfreq_min() const
Get a lower bound on the number of documents indexed by this term.
std::string get_description() const
Return a string description of this object.
double get_weight() const
Return the weight contribution for the current position.
Xapian::termcount get_wdf() const
get_wdf() for ANDNOT postlists returns the wdf of the left hand side.
Xapian::doccount get_termfreq_est() const
Get an estimate of the number of documents indexed by this term.
Xapian::doccount get_termfreq_max() const
Get an upper bound on the number of documents indexed by this term.
PostList * advance_to_next_match(double w_min, PostList *ret)
virtual Xapian::termcount get_doclength() const
Return the document length of the document the current term comes from.
Xapian::docid get_docid() const
Return the current docid.
bool at_end() const
Return true if the current position is past the last entry in this list.
Xapian::termcount count_matching_subqs() const
Count the number of leaf subqueries which match at the current position.
double get_maxweight() const
Return an upper bound on what get_weight() can return.
PostList * skip_to(Xapian::docid did, double w_min)
Skip forward to the specified docid.
TermFreqs get_termfreq_est_using_stats(const Xapian::Weight::Internal &stats) const
Get an estimate for the termfreq and reltermfreq, given the stats.
double recalc_maxweight()
Recalculate the upper bound on what get_weight() can return.
Base class for postlists which are generated by merging two sub-postlists.
PostList * r
Right sub-postlist.
void handle_prune(PostList *&kid, PostList *ret)
Utility method, to call recalc_maxweight() and do the pruning if a next() or skip_to() returns non-NU...
PostList * l
Left sub-postlist.
MultiMatch * matcher
The object which is using this postlist to perform a match.
Abstract base class for postlists.
virtual std::string get_description() const =0
Return a string description of this object.
virtual Xapian::doccount get_termfreq_est() const =0
Get an estimate of the number of documents indexed by this term.
virtual double recalc_maxweight()=0
Recalculate the upper bound on what get_weight() can return.
virtual TermFreqs get_termfreq_est_using_stats(const Xapian::Weight::Internal &stats) const
Get an estimate for the termfreq and reltermfreq, given the stats.
virtual double get_weight() const =0
Return the weight contribution for the current position.
virtual bool at_end() const =0
Return true if the current position is past the last entry in this list.
virtual Internal * next(double w_min)=0
Advance the current position to the next document in the postlist.
virtual Xapian::termcount get_doclength() const =0
Return the length of current document.
virtual Xapian::termcount get_unique_terms() const =0
Return the number of unique terms in the current document.
virtual Xapian::docid get_docid() const =0
Return the current docid.
virtual Xapian::termcount count_matching_subqs() const
Count the number of leaf subqueries which match at the current position.
Internal * next()
Advance the current position to the next document in the postlist.
virtual Xapian::termcount get_wdf() const
Return the wdf for the document at the current position.
virtual Internal * skip_to(Xapian::docid did, double w_min)=0
Skip forward to the specified docid.
virtual Xapian::doccount get_termfreq_min() const =0
Get a lower bound on the number of documents indexed by this term.
virtual Xapian::doccount get_termfreq_max() const =0
Get an upper bound on the number of documents indexed by this term.
virtual double get_maxweight() const =0
Return an upper bound on what get_weight() can return.
Class to hold statistics for a given collection.
Xapian::totallength total_length
Total length of all documents in the collection.
Xapian::doccount rset_size
Number of relevant documents in the collection.
Xapian::doccount collection_size
Number of documents in the collection.
#define LOGCALL(CATEGORY, TYPE, FUNC, PARAMS)
#define LOGCALL_CTOR(CATEGORY, CLASS, PARAMS)
unsigned XAPIAN_TERMCOUNT_BASE_TYPE termcount
A counts of terms.
unsigned XAPIAN_DOCID_BASE_TYPE doccount
A count of documents.
unsigned XAPIAN_DOCID_BASE_TYPE docid
A unique identifier for a document.
Various assertion macros.
static double est(double l, double r, double n)
The frequencies for a term.
Xapian::termcount collfreq
Xapian::doccount reltermfreq
Xapian::doccount termfreq