#include <brass_positionlist.h>


Public Member Functions | |
| BrassPositionListTable (const string &dbdir, bool readonly) | |
| Create a new BrassPositionListTable object. | |
| void | set_positionlist (Xapian::docid did, const string &tname, Xapian::PositionIterator pos, const Xapian::PositionIterator &pos_end, bool check_for_update) |
| 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 Public Member Functions | |
| static string | make_key (Xapian::docid did, const string &term) |
Definition at line 35 of file brass_positionlist.h.
| BrassPositionListTable::BrassPositionListTable | ( | const string & | dbdir, | |
| bool | readonly | |||
| ) | [inline] |
Create a new BrassPositionListTable 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 brass database is stored in. | |
| readonly | true if we're opening read-only, else false. |
Definition at line 52 of file brass_positionlist.h.
| void BrassPositionListTable::delete_positionlist | ( | Xapian::docid | did, | |
| const string & | tname | |||
| ) | [inline] |
Delete the position list for term tname in document did.
Definition at line 67 of file brass_positionlist.h.
References BrassTable::del(), and make_key().
Referenced by BrassWritableDatabase::delete_document(), and BrassWritableDatabase::replace_document().
| static string BrassPositionListTable::make_key | ( | Xapian::docid | did, | |
| const string & | term | |||
| ) | [inline, static] |
Definition at line 37 of file brass_positionlist.h.
References pack_uint_preserving_sort().
Referenced by delete_positionlist(), positionlist_count(), BrassPositionList::read_data(), and set_positionlist().
| Xapian::termcount BrassPositionListTable::positionlist_count | ( | Xapian::docid | did, | |
| const string & | term | |||
| ) | const |
Return the number of entries in specified position list.
Definition at line 71 of file brass_positionlist.cc.
References BrassTable::get_exact_entry(), LOGCALL_VOID, make_key(), and unpack_uint().
| void BrassPositionListTable::set_positionlist | ( | Xapian::docid | did, | |
| const string & | tname, | |||
| Xapian::PositionIterator | pos, | |||
| const Xapian::PositionIterator & | pos_end, | |||
| bool | check_for_update | |||
| ) |
Set the position list for term tname in document did.
| check_for_update | If true, check if the new list is the same as the existing list (if there is one). |
Definition at line 37 of file brass_positionlist.cc.
References BrassTable::add(), Assert, Xapian::BitWriter::encode(), Xapian::BitWriter::encode_interpolative(), Xapian::BitWriter::freeze(), BrassTable::get_exact_entry(), LOGCALL_VOID, make_key(), and pack_uint().
Referenced by BrassWritableDatabase::add_document_(), and BrassWritableDatabase::replace_document().