40 : db(db_), did(did_), current_wdf(0), current_termfreq(0)
61 msg =
"Too little data for doclen in termlist";
63 msg =
"Overflowed value for doclen in termlist";
72 msg =
"Too little data for list size in termlist";
74 msg =
"Overflowed value for list size in termlist";
97 LOGCALL_VOID(DB,
"ChertTermList::accumulate_stats", stats);
106 LOGCALL(DB,
string,
"ChertTermList::get_termname", NO_ARGS);
139 bool wdf_in_reuse =
false;
142 size_t len =
static_cast<unsigned char>(*
pos++);
154 size_t append_len =
static_cast<unsigned char>(*
pos++);
162 msg =
"Too little data for wdf in termlist";
164 msg =
"Overflowed value for wdf in termlist";
185 LOGCALL(DB,
bool,
"ChertTermList::at_end", NO_ARGS);
std::string current_term
The termname at the current position.
A position list in a chert database.
Xapian::termcount positionlist_count() const
Return the length of the position list for the current position.
chert_doclen_t doclen
The length of document did.
Xapian::doccount get_doccount() const
Virtual methods of Database::Internal.
#define LOGCALL_VOID(CATEGORY, FUNC, PARAMS)
Xapian::termcount get_approx_size() const
Return approximate size of this termlist.
Abstract base class for termlists.
Convert types to std::string.
ChertPositionListTable position_table
Table storing position lists.
const char * end
Pointer to the end of the encoded tag value.
Hierarchy of classes which Xapian can throw as exceptions.
std::string get_termname() const
Return the termname at the current position.
unsigned XAPIAN_TERMCOUNT_BASE_TYPE termcount
A counts of terms.
void accumulate(size_t shard_index, Xapian::termcount wdf, Xapian::termcount doclen, Xapian::doccount subtf, Xapian::doccount subdbsize)
bool at_end() const
Return true if the current position is past the last term in this list.
Collate statistics and calculate the term weights for the ESet.
TermList * next()
Advance the current position to the next term in the termlist.
Xapian::termcount positionlist_count(Xapian::docid did, const string &term) const
Return the number of entries in specified position list.
Xapian::doccount get_termfreq() const
Return the term frequency for the term at the current position.
TermList * skip_to(const std::string &term)
Skip forward to the specified term.
bool get_exact_entry(const std::string &key, std::string &tag) const
Read an entry from the table, if and only if it is exactly that being asked for.
Xapian::termcount termlist_size
The number of entries in this termlist.
string str(int value)
Convert int to std::string.
Class for iterating over term positions.
static std::string make_key(Xapian::docid did)
#define LOGCALL_CTOR(CATEGORY, CLASS, PARAMS)
A position list in a chert database.
Indicates an attempt to access a document not present in the database.
A TermList in a chert database.
DatabaseCorruptError indicates database corruption was detected.
ChertTermListTable termlist_table
Table storing term lists.
Xapian::PositionIterator positionlist_begin() const
Return a PositionIterator for the current position.
unsigned XAPIAN_DOCID_BASE_TYPE doccount
A count of documents.
ChertTermList(const ChertTermList &)
Don't allow copying.
size_t shard_index
Which shard of a multidatabase this is from.
Collates statistics while calculating term weight in an ESet.
Pack types into strings and unpack them again.
std::string data
The tag value from the termlist table which holds the encoded termlist.
bool unpack_uint(const char **p, const char *end, U *result)
Decode an unsigned integer from a string.
Various assertion macros.
void accumulate_stats(Xapian::Internal::ExpandStats &stats) const
Collate weighting information for the current term.
unsigned XAPIAN_DOCID_BASE_TYPE docid
A unique identifier for a document.
Xapian::termcount current_wdf
The wdf for the term at the current position.
const char * pos
Current position with the encoded tag value held in data.
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...
Xapian::termcount get_wdf() const
Return the wdf for the term at the current position.
A smart pointer that uses intrusive reference counting.
chert_doclen_t get_doclength() const
Return the length of this document.
Xapian::Internal::intrusive_ptr< const ChertDatabase > db
The database we're reading data from.
Xapian::doccount current_termfreq
The term frequency for the term at the current position.
#define LOGCALL(CATEGORY, TYPE, FUNC, PARAMS)
void get_freqs(const string &term, Xapian::doccount *termfreq_ptr, Xapian::termcount *collfreq_ptr) const
Virtual methods of Database::Internal.
Xapian::docid did
The document id that this TermList is for.