38 bool* max_weight_cached_flag_ptr,
44 if (newsource != NULL) {
46 }
else if (shard_index == 0) {
52 "implement clone() to support use "
53 "with a sharded database");
78 LOGCALL(MATCH,
double,
"ExternalPostList::get_weight", NO_ARGS);
87 LOGCALL(MATCH,
double,
"ExternalPostList::recalc_maxweight", NO_ARGS);
102 LOGCALL(MATCH,
PostList *,
"ExternalPostList::update_after_advance", NO_ARGS);
105 LOGLINE(MATCH,
"ExternalPostList now at end");
135 LOGCALL(MATCH,
PostList *,
"ExternalPostList::check", did | w_min | valid);
143 LOGLINE(MATCH,
"ExternalPostList now at end");
154 LOGCALL(MATCH,
bool,
"ExternalPostList::at_end", NO_ARGS);
167 string desc =
"ExternalPostList(";
Class for estimating the total number of matching documents.
void report_termfreqs(Xapian::doccount min_, Xapian::doccount est, Xapian::doccount max_)
Fill in estimates for POSTING_SOURCE.
Xapian::termcount count_matching_subqs() const
Count the number of leaf subqueries which match at the current position.
PostList * update_after_advance()
ExternalPostList(const ExternalPostList &)
Disallow copying.
PositionList * read_position_list()
Read the position list for the term in the current document and return a pointer to it (owned by the ...
double get_weight(Xapian::termcount doclen, Xapian::termcount unique_terms, Xapian::termcount wdfdocmax) const
Return the weight contribution for the current position.
PostList * check(Xapian::docid did, double w_min, bool &valid)
Check if the specified docid occurs in this postlist.
double recalc_maxweight()
Recalculate the upper bound on what get_weight() can return.
Xapian::Internal::opt_intrusive_ptr< Xapian::PostingSource > source
PostList * skip_to(Xapian::docid, double w_min)
Skip forward to the specified docid.
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.
std::string get_description() const
Return a string description of this object.
An indexed database of documents.
Abstract base class for postlists.
PostList * next()
Advance the current position to the next document in the postlist.
Xapian::doccount termfreq
Estimate of the number of documents this PostList will return.
InvalidOperationError indicates the API was used in an invalid way.
Abstract base class for iterating term positions in a document.
Base class which provides an "external" source of postings.
virtual void skip_to(Xapian::docid did, double min_wt)
Advance to the specified docid.
virtual Xapian::doccount get_termfreq_est() const =0
An estimate of the number of documents this object can return.
void set_max_weight_cached_flag_ptr_(bool *flag_ptr)
virtual void next(double min_wt)=0
Advance the current position to the next matching document.
virtual Xapian::doccount get_termfreq_max() const =0
An upper bound on the number of documents this object can return.
virtual bool check(Xapian::docid did, double min_wt)
Check if the specified docid occurs.
PostingSource * release()
Start reference counting this object.
virtual PostingSource * clone() const
Clone the posting source.
virtual Xapian::doccount get_termfreq_min() const =0
A lower bound on the number of documents this object can return.
virtual void reset(const Database &db, Xapian::doccount shard_index)
Set this PostingSource to the start of the list of postings.
virtual double get_weight() const
Return the weight contribution for the current document.
virtual Xapian::docid get_docid() const =0
Return the current docid.
virtual bool at_end() const =0
Return true if the current position is past the last entry in this list.
virtual std::string get_description() const
Return a string describing this object.
double get_maxweight() const noexcept
Return the currently set upper bound on what get_weight() can return.
#define LOGCALL(CATEGORY, TYPE, FUNC, PARAMS)
Calculated bounds on and estimate of number of matches.
Return document ids from an external source.
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.
External sources of posting information.