43 LOGCALL_VOID(DB,
"HoneyTermListTable::set_termlist", did | doc | doclen);
52 if (
usual(termlist_size != 0)) {
56 string prev_term = *t;
58 tag += prev_term.size();
63 const string&
term = *t;
82 (packed = (wdf + 1) * (prev_term.size() + 1) + reuse) < 256) {
89 tag += char(
term.size() - reuse);
90 tag.append(
term.data() + reuse,
term.size() - reuse);
99 if (
rare(tag.size() == 1 && tag[0] ==
'\0')) {
103 add(make_key(did), tag);
void set_termlist(Xapian::docid did, const Xapian::Document &doc, Xapian::termcount doclen)
Set the termlist data for document did.
Class representing a document.
TermIterator termlist_end() const noexcept
End iterator corresponding to termlist_begin().
Xapian::termcount termlist_count() const
Return the number of distinct terms in this document.
TermIterator termlist_begin() const
Start iterating the terms in this document.
Class for iterating over a list of terms.
Xapian::termcount get_wdf() const
Return the wdf for the term at the current position.
#define LOGCALL_VOID(CATEGORY, FUNC, PARAMS)
Class representing a document.
Hierarchy of classes which Xapian can throw as exceptions.
Subclass of HoneyTable which holds termlists.
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.
Pack types into strings and unpack them again.
void pack_uint(std::string &s, U value)
Append an encoded unsigned integer to a string.
Various handy string-related helpers.
std::string::size_type common_prefix_length(std::string_view a, std::string_view b)
Class for iterating over a list of terms.