FlintTermListTable Class Reference

#include <flint_termlisttable.h>

Inheritance diagram for FlintTermListTable:

Inheritance graph
[legend]
Collaboration diagram for FlintTermListTable:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 FlintTermListTable (std::string dbdir, bool readonly)
 Create a new FlintTermListTable object.
void set_termlist (Xapian::docid did, const Xapian::Document &doc, flint_doclen_t doclen)
 Set the termlist data for document did.
void delete_termlist (Xapian::docid did)
 Delete the termlist data for document did.
flint_doclen_t get_doclength (Xapian::docid did) const
 Returns the document length for document did.

Detailed Description

Definition at line 35 of file flint_termlisttable.h.


Constructor & Destructor Documentation

FlintTermListTable::FlintTermListTable ( std::string  dbdir,
bool  readonly 
) [inline]

Create a new FlintTermListTable 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 flint database is stored in.
readonly true if we're opening read-only, else false.

Definition at line 45 of file flint_termlisttable.h.


Member Function Documentation

void FlintTermListTable::set_termlist ( Xapian::docid  did,
const Xapian::Document doc,
flint_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 39 of file flint_termlisttable.cc.

References Assert, common_prefix_length(), DEBUGCALL, flint_docid_to_key(), Xapian::TermIterator::get_wdf(), pack_uint(), Xapian::Document::termlist_begin(), Xapian::Document::termlist_count(), and Xapian::Document::termlist_end().

Referenced by FlintWritableDatabase::add_document_(), and FlintWritableDatabase::replace_document().

void FlintTermListTable::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 63 of file flint_termlisttable.h.

References FlintTable::del(), and flint_docid_to_key().

Referenced by FlintWritableDatabase::delete_document().

flint_doclen_t FlintTermListTable::get_doclength ( Xapian::docid  did  )  const

Returns the document length for document did.

Definition at line 124 of file flint_termlisttable.cc.

References DEBUGCALL, flint_docid_to_key(), FlintTable::get_exact_entry(), om_tostring(), RETURN, and unpack_uint().

Referenced by FlintDatabase::get_doclength().


The documentation for this class was generated from the following files:
Documentation for Xapian (version 1.0.10).
Generated on 24 Dec 2008 by Doxygen 1.5.2.