22 #ifndef XAPIAN_HGUARD_GLASS_POSITIONLIST_H 23 #define XAPIAN_HGUARD_GLASS_POSITIONLIST_H 64 void pack(
string & s,
const std::vector<Xapian::termpos> & vec)
const;
83 const string & term)
const;
124 const string & tname) {
125 (void)read_data(table, did, tname);
132 bool read_data(
const string & data);
139 const string & tname);
BitReader rd
Interpolative decoder.
GlassPositionList(const GlassTable *table, Xapian::docid did, const string &tname)
Construct and initialise with data.
Xapian::termpos last
Last entry.
AutoPtr< GlassCursor > cursor
Cursor for locating multiple entries efficiently.
Class managing a Btree table in a Glass database.
void delete_positionlist(Xapian::docid did, const string &tname)
Delete the position list for term tname in document did.
GlassPositionListTable(int fd, off_t offset_, bool readonly_)
Subclass of GlassTable for deriving lazy tables from.
Abstract base class for iterating term positions in a document.
GlassPositionList(const string &data)
Construct and initialise with data.
Xapian::termcount size
Number of entries.
A position list in a glass database.
unsigned XAPIAN_TERMCOUNT_BASE_TYPE termcount
A counts of terms.
Read a stream created by BitWriter.
Xapian::termpos current_pos
Current entry.
Classes to encode/decode a bitstream.
GlassPositionListTable(const string &dbdir, bool readonly)
Create a new GlassPositionListTable object.
GlassPositionList()
Default constructor.
bool have_started
Have we started iterating yet?
Pack types into strings and unpack them again.
unsigned XAPIAN_TERMPOS_BASE_TYPE termpos
A term position within a document or query.
unsigned XAPIAN_DOCID_BASE_TYPE docid
A unique identifier for a document.
Abstract base class for iterating term positions in a document.
static string make_key(Xapian::docid did, const string &term)
void set_positionlist(Xapian::docid did, const string &tname, const string &s)
Set the position list for term tname in document did.
string make_key(Xapian::docid did)
Wrapper around standard unique_ptr template.
void pack_string_preserving_sort(std::string &s, const std::string &value, bool last=false)
Append an encoded std::string to a string, preserving the sort order.
void pack_uint_preserving_sort(std::string &s, U value)
Append an encoded unsigned integer to a string, preserving the sort order.