43 LOGCALL_VOID(DB,
"ChertTermListTable::set_termlist", did | doc | doclen);
49 if (termlist_size == 0) {
60 string prev_term = *t;
62 tag += 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);
107 Assert(termlist_size == 0);
Subclass of ChertTable which holds termlists.
void set_termlist(Xapian::docid did, const Xapian::Document &doc, chert_doclen_t doclen)
Set the termlist data for document did.
Xapian::termcount termlist_count() const
The length of the termlist - i.e.
#define LOGCALL_VOID(CATEGORY, FUNC, PARAMS)
TermIterator termlist_end() const
Equivalent end iterator for termlist_begin().
Hierarchy of classes which Xapian can throw as exceptions.
Class for iterating over a list of terms.
unsigned XAPIAN_TERMCOUNT_BASE_TYPE termcount
A counts of terms.
Xapian::termcount get_wdf() const
Return the wdf for the term at the current position.
void pack_uint(std::string &s, U value)
Append an encoded unsigned integer to a string.
unsigned XAPIAN_DOCID_BASE_TYPE doccount
A count of documents.
std::string::size_type common_prefix_length(const std::string &a, const std::string &b)
Pack types into strings and unpack them again.
Various handy helpers which std::string really should provide.
Various assertion macros.
unsigned XAPIAN_DOCID_BASE_TYPE docid
A unique identifier for a document.
unsigned int chert_doclen_t
An integer type for storing the length of a document - ie, the sum of the wdfs of the terms in the do...
API for working with documents.
Class for iterating over a list of terms.
TermIterator termlist_begin() const
Start iterating the terms in this document.
A handle representing a document in a Xapian database.
string make_key(Xapian::docid did)