34 using namespace Honey;
40 cursor(db->get_postlist_cursor())
43 static const char doclen_key_prefix[2] = {
46 cursor->find_entry_ge(
string(doclen_key_prefix, 2));
193 string desc =
"HoneyAllDocsPostList(doccount=";
217 return doclen != 0xffffff;
220 return doclen != 0xffffffff;
228 if (!last_did)
return false;
236 p =
reinterpret_cast<const unsigned char*
>(cursor->
current_tag.data());
239 if (((
width - 8) &~ 0x18) != 0) {
241 "8, 16, 24 and 32 are supported");
244 if ((len - 1) %
width != 0)
HoneyAllDocsPostList(const HoneyAllDocsPostList &)=delete
Don't allow copying.
Xapian::docid get_docid() const
Return the current docid.
Honey::DocLenChunkReader reader
Xapian::termcount get_wdf_upper_bound() const
bool at_end() const
Return true if the current position is past the last entry in this list.
std::string get_description() const
Return a string description of this object.
Xapian::termcount get_wdf() const
Return the wdf for the document at the current position.
PostList * skip_to(Xapian::docid did, double w_min)
Skip forward to the specified docid.
PostList * check(Xapian::docid did, double w_min, bool &valid)
Check if the specified docid occurs in this postlist.
HoneyCursor * cursor
Cursor on the postlist table.
bool read_tag(bool keep_compressed=false)
bool find_entry_ge(std::string_view key)
Database using honey backend.
bool find_doclength(Xapian::docid target)
Searches the whole chunk (skip_to() only advances).
bool update(HoneyCursor *cursor)
Update to use the chunk currently pointed to by cursor.
unsigned const char * end
Xapian::docid get_docid() const
bool read_doclen(const unsigned char *q)
bool skip_to(Xapian::docid target)
Abstract base class for leaf postlists.
DatabaseCorruptError indicates database corruption was detected.
Abstract base class for postlists.
PostList * next()
Advance the current position to the next document in the postlist.
Xapian::doccount termfreq
Estimate of the number of documents this PostList will return.
#define LOGCALL(CATEGORY, TYPE, FUNC, PARAMS)
#define LOGCALL_CTOR(CATEGORY, CLASS, PARAMS)
A PostList which iterates over all documents in a HoneyDatabase.
Database using honey backend.
Definitions, types, etc for use inside honey.
std::string make_doclenchunk_key(Xapian::docid last_did)
Generate a key for a doclen chunk.
Xapian::docid docid_from_key(const std::string &key)
string str(int value)
Convert int to std::string.
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.
#define AssertParanoid(COND)
Convert types to std::string.
functions for reading and writing different width words
uint32_t unaligned_read4(const unsigned char *ptr)
uint16_t unaligned_read2(const unsigned char *ptr)