BrassPositionListTable Class Reference

#include <brass_positionlist.h>

Inheritance diagram for BrassPositionListTable:

Inheritance graph
[legend]
Collaboration diagram for BrassPositionListTable:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 BrassPositionListTable (const string &dbdir, bool readonly)
 Create a new BrassPositionListTable 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 brass_positionlist.h.


Constructor & Destructor Documentation

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

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


Member Function Documentation

void BrassPositionListTable::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 brass_positionlist.h.

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

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

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

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

Return the number of entries in specified position list.

Definition at line 71 of file brass_positionlist.cc.

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

void BrassPositionListTable::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 brass_positionlist.cc.

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

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