34 LOGCALL_VOID(DB,
"GlassAllTermsList::read_termfreq", NO_ARGS);
54 LOGCALL(DB,
string,
"GlassAllTermsList::get_termname", NO_ARGS);
107 if (nul == string::npos) {
124 if (p == pend)
break;
180 LOGCALL(DB,
bool,
"GlassAllTermsList::at_end", NO_ARGS);
static void read_number_of_entries(const char **posptr, const char *end, Xapian::doccount *number_of_entries_ptr, Xapian::termcount *collection_freq_ptr)
Read the number of entries and the collection frequency.
#define LOGCALL_DTOR(CATEGORY, CLASS)
A termlist containing all terms in a glass database.
void read_termfreq() const
Read and cache the term frequency.
#define LOGCALL_VOID(CATEGORY, FUNC, PARAMS)
bool next()
Advance to the next key.
Abstract base class for termlists.
Postlists in glass databases.
bool after_end() const
Determine whether cursor is off the end of table.
Xapian::Internal::intrusive_ptr< const GlassDatabase > database
Keep a reference to our database to stop it being deleted.
bool read_tag(bool keep_compressed=false)
Read the tag from the table and store it in current_tag.
~GlassAllTermsList()
Destructor.
TermList * skip_to(const std::string &tname)
Advance to the first term which is >= tname.
GlassCursor * cursor
A cursor which runs through the postlist table reading termnames from the keys.
string current_key
Current key pointed to by cursor.
GlassPostListTable postlist_table
Table storing posting lists.
Xapian::doccount termfreq
The term frequency of the term at the current position.
bool at_end() const
True if we're off the end of the list.
string current_tag
Current tag pointed to by cursor.
Xapian::doccount get_termfreq() const
Returns the term frequency of the current term.
std::string current_term
The termname at the current position.
bool unpack_string_preserving_sort(const char **p, const char *end, std::string &result)
Decode a "sort preserved" std::string from a string.
bool startswith(const std::string &s, char pfx)
bool find_entry_ge(const string &key)
Position the cursor on the lowest entry with key >= key.
DatabaseCorruptError indicates database corruption was detected.
unsigned XAPIAN_DOCID_BASE_TYPE doccount
A count of documents.
TermList * next()
Advance to the next term in the list.
std::string pack_glass_postlist_key(const std::string &term)
GlassCursor * cursor_get() const
Get a cursor for reading from the table.
Pack types into strings and unpack them again.
std::string get_termname() const
Returns the current termname.
Various handy helpers which std::string really should provide.
std::string prefix
The prefix to restrict the terms to.
void to_end()
Set the cursor to be off the end of the table.
#define LOGCALL(CATEGORY, TYPE, FUNC, PARAMS)