ChertTermListTable Class Reference

#include <chert_termlisttable.h>

Inheritance diagram for ChertTermListTable:

Inheritance graph
[legend]
Collaboration diagram for ChertTermListTable:

Collaboration graph
[legend]

List of all members.

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)


Detailed Description

Definition at line 35 of file chert_termlisttable.h.


Constructor & Destructor Documentation

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!

Parameters:
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.


Member Function Documentation

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.

Parameters:
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]

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.

Parameters:
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().


The documentation for this class was generated from the following files:

Documentation for Xapian (version 1.2.9).
Generated on 10 May 2012 by Doxygen 1.5.9.