43 LOGCALL_VOID(DB,
"GlassTermListTable::set_termlist", did | doc | doclen);
46 if (termlist_size == 0) {
50 add(make_key(did), {});
60 string prev_term = *t;
62 tag += char(prev_term.size());
68 const string &
term = *t;
87 packed = (wdf + 1) * (prev_term.size() + 1) + reuse;
89 if (packed && packed < 256) {
92 tag += char(
term.size() - reuse);
93 tag.append(
term.data() + reuse,
term.size() - reuse);
96 tag += char(
term.size() - reuse);
97 tag.append(
term.data() + reuse,
term.size() - reuse);
108 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 GlassTable 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.