35 Assert(!left->get_termname().empty());
36 Assert(!right->get_termname().empty());
52 RETURN(left->get_approx_size() + right->get_approx_size());
58 LOGCALL_VOID(EXPAND,
"OrTermList::accumulate_stats", stats);
61 left->accumulate_stats(stats);
63 right->accumulate_stats(stats);
71 if (cmp < 0)
RETURN(left->get_wdf());
72 if (cmp > 0)
RETURN(right->get_wdf());
73 RETURN(left->get_wdf() + right->get_wdf());
82 RETURN(left->get_termfreq());
83 Assert(cmp > 0 || left->get_termfreq() == right->get_termfreq());
84 RETURN(right->get_termfreq());
105 }
else if (cmp > 0) {
119 if (lret && lret != left) {
125 if (rret && rret != right) {
145 cmp = left->get_termname().compare(right->get_termname());
146 current_term = cmp < 0 ? left->get_termname() : right->get_termname();
155 if (lret && lret != left) {
161 if (rret && rret != right) {
184 cmp = left->get_termname().compare(right->get_termname());
185 current_term = cmp < 0 ? left->get_termname() : right->get_termname();
209 if (cmp < 0)
RETURN(left->get_termfreq());
210 if (cmp > 0)
RETURN(right->get_termfreq());
211 RETURN(left->get_termfreq() + right->get_termfreq());
Xapian::doccount get_termfreq() const
Return the term frequency for the term at the current position.
Xapian::termcount get_approx_size() const
Return approximate size of this termlist.
TermList * next()
Advance the current position to the next term in the termlist.
TermList * skip_to(std::string_view term)
Skip forward to the specified term.
void check_started() const
Check that next() has already been called.
PositionList * positionlist_begin() const
Return PositionList for the current position.
Xapian::doccount get_termfreq() const
Return the term frequency for the term at the current position.
void accumulate_stats(Xapian::Internal::ExpandStats &stats) const
Collate weighting information for the current term.
Xapian::termcount get_wdf() const
Return the wdf for the term at the current position.
Xapian::termcount positionlist_count() const
Return the length of the position list for the current position.
Collates statistics while calculating term weight in an ESet.
Abstract base class for iterating term positions in a document.
Abstract base class for termlists.
virtual Internal * skip_to(std::string_view term)=0
Skip forward to the specified term.
virtual Internal * next()=0
Advance the current position to the next term in the termlist.
#define LOGCALL(CATEGORY, TYPE, FUNC, PARAMS)
#define LOGCALL_VOID(CATEGORY, FUNC, PARAMS)
unsigned XAPIAN_TERMCOUNT_BASE_TYPE termcount
A counts of terms.
unsigned XAPIAN_DOCID_BASE_TYPE doccount
A count of documents.
Various assertion macros.
Merge two TermList objects using an OR operation.
Class for iterating over term positions.