BrassTermListTable Class Reference

#include <brass_termlisttable.h>

Inheritance diagram for BrassTermListTable:

Inheritance graph
[legend]
Collaboration diagram for BrassTermListTable:

Collaboration graph
[legend]

List of all members.

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)


Detailed Description

Definition at line 35 of file brass_termlisttable.h.


Constructor & Destructor Documentation

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!

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


Member Function Documentation

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.

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

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.

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


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.