48 auto entry_count = database->spelling_table.get_approx_entry_count();
49 return clamp_cast<Xapian::termcount>(entry_count);
57 Assert(!cursor->after_end());
58 Assert(!cursor->current_key.empty());
59 AssertRel(
static_cast<unsigned char>(cursor->current_key[0]), >=,
64 const char*
p = cursor->current_tag.data();
77 if (cursor->after_end()) {
83 if (cursor->after_end()) {
87 const string& key = cursor->current_key;
88 unsigned char first = key[0];
93 current_term.assign(key, 1);
110 if (cursor->after_end()) {
114 const string& key = cursor->current_key;
115 unsigned char first = key[0];
120 current_term.assign(key, 1);
Cast a value to a type, clamping out of range values.
Xapian::doccount get_termfreq() const
Returns the term frequency of the current term.
~HoneySpellingWordsList()
Destructor.
TermList * next()
Advance to the next term in the list.
TermList * skip_to(std::string_view term)
Advance to the first term which is >= term.
Xapian::termcount get_approx_size() const
Return approximate size of this termlist.
DatabaseCorruptError indicates database corruption was detected.
Abstract base class for termlists.
#define LOGCALL(CATEGORY, TYPE, FUNC, PARAMS)
#define LOGCALL_DTOR(CATEGORY, CLASS)
Hierarchy of classes which Xapian can throw as exceptions.
Database using honey backend.
A termlist containing all words which are spelling targets.
const unsigned KEY_PREFIX_WORD
std::string make_spelling_wordlist_key(std::string_view word)
unsigned XAPIAN_TERMCOUNT_BASE_TYPE termcount
A counts of terms.
unsigned XAPIAN_DOCID_BASE_TYPE doccount
A count of documents.
#define AssertRel(A, REL, B)
Pack types into strings and unpack them again.
bool unpack_uint_last(const char **p, const char *end, U *result)
Decode an unsigned integer as the last item in a string.
Various handy string-related helpers.