ChertPositionListTable Class Reference

#include <chert_positionlist.h>

Inheritance diagram for ChertPositionListTable:

Inheritance graph
[legend]
Collaboration diagram for ChertPositionListTable:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 ChertPositionListTable (const string &dbdir, bool readonly)
 Create a new ChertPositionListTable object.
void set_positionlist (Xapian::docid did, const string &tname, Xapian::PositionIterator pos, const Xapian::PositionIterator &pos_end, bool check_for_update)
 Set the position list for term tname in document did.
void delete_positionlist (Xapian::docid did, const string &tname)
 Delete the position list for term tname in document did.
Xapian::termcount positionlist_count (Xapian::docid did, const string &term) const
 Return the number of entries in specified position list.

Static Public Member Functions

static string make_key (Xapian::docid did, const string &term)


Detailed Description

Definition at line 35 of file chert_positionlist.h.


Constructor & Destructor Documentation

ChertPositionListTable::ChertPositionListTable ( const string &  dbdir,
bool  readonly 
) [inline]

Create a new ChertPositionListTable 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 52 of file chert_positionlist.h.


Member Function Documentation

void ChertPositionListTable::delete_positionlist ( Xapian::docid  did,
const string &  tname 
) [inline]

Delete the position list for term tname in document did.

Definition at line 67 of file chert_positionlist.h.

References ChertTable::del(), and make_key().

Referenced by ChertWritableDatabase::delete_document(), and ChertWritableDatabase::replace_document().

static string ChertPositionListTable::make_key ( Xapian::docid  did,
const string &  term 
) [inline, static]

Xapian::termcount ChertPositionListTable::positionlist_count ( Xapian::docid  did,
const string &  term 
) const

Return the number of entries in specified position list.

Definition at line 71 of file chert_positionlist.cc.

References ChertTable::get_exact_entry(), LOGCALL_VOID, make_key(), and unpack_uint().

void ChertPositionListTable::set_positionlist ( Xapian::docid  did,
const string &  tname,
Xapian::PositionIterator  pos,
const Xapian::PositionIterator pos_end,
bool  check_for_update 
)

Set the position list for term tname in document did.

Parameters:
check_for_update If true, check if the new list is the same as the existing list (if there is one).

Definition at line 37 of file chert_positionlist.cc.

References ChertTable::add(), Assert, Xapian::BitWriter::encode(), Xapian::BitWriter::encode_interpolative(), Xapian::BitWriter::freeze(), ChertTable::get_exact_entry(), LOGCALL_VOID, make_key(), and pack_uint().

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.13).
Generated on 9 Jan 2013 by Doxygen 1.5.9.