35 message =
"Value overflow unpacking termlist: ";
37 message =
"Out of data unpacking termlist: ";
61 size_t slot_enc_size = *
pos++;
64 if (slot_enc_size & 0x80) {
65 slot_enc_size &= 0x7f;
66 if (slot_enc_size == 0) {
138 size_t reuse =
static_cast<unsigned char>(*
pos++);
157 size_t append =
static_cast<unsigned char>(*
pos++);
158 if (
size_t(
end -
pos) < append)
Database using honey backend.
void get_freqs(std::string_view term, Xapian::doccount *termfreq_ptr, Xapian::termcount *collfreq_ptr) const
Returns frequencies for a term.
PositionList * open_position_list(Xapian::docid did, std::string_view term) const
HoneyTermListTable termlist_table
HoneyPositionTable position_table
Xapian::doccount get_doccount() const
Xapian::termcount positionlist_count(Xapian::docid did, std::string_view term) const
Return the number of entries in specified position list.
bool get_exact_entry(std::string_view key, std::string *tag) const
static std::string make_key(Xapian::docid did)
TermList * skip_to(std::string_view term)
Skip forward to the specified term.
PositionList * positionlist_begin() const
Return a PositionIterator for the current position.
const char * pos
Current position with the encoded tag value held in data.
Xapian::termcount get_approx_size() const
Return approximate size of this termlist.
const char * end
Pointer to the end of the encoded tag value.
Xapian::doccount current_termfreq
The term frequency for the term at the current position.
Xapian::termcount positionlist_count() const
Return the length of the position list for the current position.
Xapian::termcount get_wdf() const
Return the wdf for the term at the current position.
HoneyTermList(const HoneyTermList &)
Don't allow copying.
Xapian::termcount doclen
The length of document did.
std::string data
The tag value from the termlist table which holds the encoded termlist.
Xapian::termcount termlist_size
The number of entries in this termlist.
Xapian::termcount current_wdf
The wdf for the term at the current position.
Xapian::Internal::intrusive_ptr< const HoneyDatabase > db
The database we're reading data from.
Xapian::docid did
The document id that this TermList is for.
TermList * next()
Advance the current position to the next term in the termlist.
void accumulate_stats(Xapian::Internal::ExpandStats &stats) const
Collate weighting information for the current term.
Xapian::doccount get_termfreq() const
Return the term frequency for the term at the current position.
DatabaseCorruptError indicates database corruption was detected.
Collates statistics while calculating term weight in an ESet.
void accumulate(size_t shard_index, Xapian::termcount wdf, Xapian::termcount doclen, Xapian::doccount subtf, Xapian::doccount subdbsize)
Abstract base class for iterating term positions in a document.
Abstract base class for termlists.
std::string current_term
The current term.
size_t shard_index
Which shard of a multidatabase this is from.
Collate statistics and calculate the term weights for the ESet.
static void throw_database_corrupt(const char *item, const char *pos)
A TermList in a honey database.
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.
bool unpack_uint(const char **p, const char *end, U *result)
Decode an unsigned integer from a string.