#include <flint_positionlist.h>
Inheritance diagram for FlintPositionListTable:


Public Member Functions | |
| FlintPositionListTable (string dbdir, bool readonly) | |
| Create a new FlintPositionListTable object. | |
| void | set_positionlist (Xapian::docid did, const string &tname, Xapian::PositionIterator pos, const Xapian::PositionIterator &pos_end) |
| Set the position list for term tname in document did. | |
| void | delete_positionlist (Xapian::docid did, const string &tname) |
| Delete the position list for term tname in document did. | |
| Xapian::termcount | positionlist_count (Xapian::docid did, const string &term) const |
| Return the number of entries in specified position list. | |
Static Private Member Functions | |
| static string | make_key (Xapian::docid did, const string &tname) |
Definition at line 35 of file flint_positionlist.h.
| FlintPositionListTable::FlintPositionListTable | ( | string | dbdir, | |
| bool | readonly | |||
| ) | [inline] |
Create a new FlintPositionListTable object.
This method does not create or open the table on disk - you must call the create() or open() methods respectively!
| dbdir | The directory the flint database is stored in. | |
| readonly | true if we're opening read-only, else false. |
Definition at line 49 of file flint_positionlist.h.
| static string FlintPositionListTable::make_key | ( | Xapian::docid | did, | |
| const string & | tname | |||
| ) | [inline, static, private] |
Definition at line 36 of file flint_positionlist.h.
References pack_uint_preserving_sort().
Referenced by delete_positionlist(), and set_positionlist().
| void FlintPositionListTable::set_positionlist | ( | Xapian::docid | did, | |
| const string & | tname, | |||
| Xapian::PositionIterator | pos, | |||
| const Xapian::PositionIterator & | pos_end | |||
| ) |
Set the position list for term tname in document did.
Definition at line 219 of file flint_positionlist.cc.
References Assert, DEBUGCALL, BitWriter::encode(), encode_interpolative(), BitWriter::freeze(), make_key(), and pack_uint().
Referenced by FlintWritableDatabase::add_document_(), and FlintWritableDatabase::replace_document().
| void FlintPositionListTable::delete_positionlist | ( | Xapian::docid | did, | |
| const string & | tname | |||
| ) | [inline] |
Delete the position list for term tname in document did.
Definition at line 58 of file flint_positionlist.h.
References FlintTable::del(), and make_key().
Referenced by FlintWritableDatabase::delete_document(), and FlintWritableDatabase::replace_document().
| Xapian::termcount FlintPositionListTable::positionlist_count | ( | Xapian::docid | did, | |
| const string & | term | |||
| ) | const |
Return the number of entries in specified position list.
Definition at line 248 of file flint_positionlist.cc.
References DEBUGCALL, Xapian::BitReader::decode(), FlintTable::get_exact_entry(), pack_uint_preserving_sort(), Xapian::BitReader::read_bits(), and unpack_uint().