#include <chert_termlisttable.h>


Public Member Functions | |
| ChertTermListTable (const std::string &dbdir, bool readonly) | |
| Create a new ChertTermListTable object. | |
| void | set_termlist (Xapian::docid did, const Xapian::Document &doc, chert_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 ChertLazyTable::create_and_open(). | |
Static Public Member Functions | |
| static std::string | make_key (Xapian::docid did) |
Definition at line 35 of file chert_termlisttable.h.
| ChertTermListTable::ChertTermListTable | ( | const std::string & | dbdir, | |
| bool | readonly | |||
| ) | [inline] |
Create a new ChertTermListTable 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 chert database is stored in. | |
| readonly | true if we're opening read-only, else false. |
Definition at line 51 of file chert_termlisttable.h.
| void ChertTermListTable::create_and_open | ( | unsigned int | blocksize | ) | [inline] |
Non-lazy override of ChertLazyTable::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 ChertLazyTable.
Definition at line 79 of file chert_termlisttable.h.
Referenced by ChertDatabase::create_and_open_tables().
| void ChertTermListTable::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 chert_termlisttable.h.
References ChertTable::del(), and make_key().
Referenced by ChertWritableDatabase::delete_document().
| static std::string ChertTermListTable::make_key | ( | Xapian::docid | did | ) | [inline, static] |
Definition at line 37 of file chert_termlisttable.h.
References pack_uint_preserving_sort().
Referenced by ChertTermList::ChertTermList(), delete_termlist(), and set_termlist().
| void ChertTermListTable::set_termlist | ( | Xapian::docid | did, | |
| const Xapian::Document & | doc, | |||
| chert_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 chert_termlisttable.cc.
References ChertTable::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 ChertWritableDatabase::add_document_(), and ChertWritableDatabase::replace_document().