#include <brass_termlisttable.h>


Public Member Functions | |
| BrassTermListTable (const std::string &dbdir, bool readonly) | |
| Create a new BrassTermListTable object. | |
| void | set_termlist (Xapian::docid did, const Xapian::Document &doc, brass_doclen_t doclen) |
| Set the termlist data for document did. | |
| void | delete_termlist (Xapian::docid did) |
| Delete the termlist data for document did. | |
| void | create_and_open (unsigned int blocksize) |
| Non-lazy override of BrassLazyTable::create_and_open(). | |
Static Public Member Functions | |
| static std::string | make_key (Xapian::docid did) |
Definition at line 35 of file brass_termlisttable.h.
| BrassTermListTable::BrassTermListTable | ( | const std::string & | dbdir, | |
| bool | readonly | |||
| ) | [inline] |
Create a new BrassTermListTable 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 51 of file brass_termlisttable.h.
| void BrassTermListTable::create_and_open | ( | unsigned int | blocksize | ) | [inline] |
Non-lazy override of BrassLazyTable::create_and_open().
Don't create lazily, but if the termlist is deleted, work without it.
This method isn't virtual, but we never call it such that it needs to be.
Reimplemented from BrassLazyTable.
Definition at line 79 of file brass_termlisttable.h.
Referenced by BrassDatabase::create_and_open_tables().
| void BrassTermListTable::delete_termlist | ( | Xapian::docid | did | ) | [inline] |
Delete the termlist data for document did.
| did | The docid to delete the termlist data for. |
Definition at line 70 of file brass_termlisttable.h.
References BrassTable::del(), and make_key().
Referenced by BrassWritableDatabase::delete_document().
| static std::string BrassTermListTable::make_key | ( | Xapian::docid | did | ) | [inline, static] |
Definition at line 37 of file brass_termlisttable.h.
References pack_uint_preserving_sort().
Referenced by BrassTermList::BrassTermList(), delete_termlist(), and set_termlist().
| void BrassTermListTable::set_termlist | ( | Xapian::docid | did, | |
| const Xapian::Document & | doc, | |||
| brass_doclen_t | doclen | |||
| ) |
Set the termlist data for document did.
Any existing data is replaced.
| did | The docid to set the termlist data for. | |
| doc | The Xapian::Document object to read term data from. | |
| doclen | The document length. |
Definition at line 40 of file brass_termlisttable.cc.
References BrassTable::add(), Assert, common_prefix_length(), Xapian::TermIterator::get_wdf(), LOGCALL_VOID, make_key(), pack_uint(), Xapian::Document::termlist_begin(), Xapian::Document::termlist_count(), and Xapian::Document::termlist_end().
Referenced by BrassWritableDatabase::add_document_(), and BrassWritableDatabase::replace_document().