FlintDatabase Class Reference

A backend designed for efficient indexing and retrieval, using compressed posting lists and a btree storage scheme. More...

#include <flint_database.h>

Inheritance diagram for FlintDatabase:

Inheritance graph
[legend]
Collaboration diagram for FlintDatabase:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 FlintDatabase (const string &db_dir_, int action=XAPIAN_DB_READONLY, unsigned int block_size=0u)
 Create and open a flint database.
 ~FlintDatabase ()
Xapian::doccount get_doccount () const
 Virtual methods of Database::Internal.
Xapian::docid get_lastdocid () const
 Return the last used document id of this (sub) database.
Xapian::doclength get_avlength () const
 Return the average length of a document in this (sub) database.
Xapian::doclength get_doclength (Xapian::docid did) const
 Get the length of a given document.
Xapian::doccount get_termfreq (const string &tname) const
 Return the number of documents indexed by a given term.
Xapian::termcount get_collection_freq (const string &tname) const
 Return the total number of occurrences of the given term.
bool term_exists (const string &tname) const
 Check whether a given term is in the database.
bool has_positions () const
 Check whether this database contains any positional information.
LeafPostListopen_post_list (const string &tname) const
 Open a posting list.
Xapian::Document::Internalopen_document (Xapian::docid did, bool lazy=false) const
 Open a document.
PositionListopen_position_list (Xapian::docid did, const string &term) const
 Open a position list for the given term in the given document.
TermListopen_term_list (Xapian::docid did) const
 Open a term list.
TermListopen_allterms (const string &prefix) const
 Open an allterms list.
TermListopen_spelling_termlist (const string &word) const
 Create a termlist tree from trigrams of word.
TermListopen_spelling_wordlist () const
 Return a termlist which returns the words which are spelling correction targets.
Xapian::doccount get_spelling_frequency (const string &word) const
 Return the number of times word was added as a spelling.
TermListopen_synonym_termlist (const string &term) const
 Open a termlist returning synonyms for a term.
TermListopen_synonym_keylist (const string &prefix) const
 Open a termlist returning each term which has synonyms.
string get_metadata (const string &key) const
 Get the metadata associated with a given key.
TermListopen_metadata_keylist (const std::string &prefix) const
 Open a termlist returning each metadata key.

Private Member Functions

void read_metainfo ()
 Read lastdocid and total_length from the postlist table.
bool database_exists ()
 Return true if a database exists at the path specified for this database.
void create_and_open_tables (unsigned int blocksize)
 Create new tables, and open them.
void open_tables_consistent ()
 Open all tables at most recent consistent revision.
void get_database_write_lock ()
 Get a write lock on the database, or throw an Xapian::DatabaseLockError if failure.
void open_tables (flint_revision_number_t revision)
 Open tables at specified revision number.
flint_revision_number_t get_revision_number () const
 Get an object holding the revision number which the tables are opened at.
flint_revision_number_t get_next_revision_number () const
 Get an object holding the next revision number which should be used in the tables.
void set_revision_number (flint_revision_number_t new_revision)
 Set the revision number in the tables.
void reopen ()
 Re-open tables to recover from an overwritten condition, or just get most up-to-date version.
void modifications_failed (flint_revision_number_t old_revision, flint_revision_number_t new_revision, const std::string &msg)
 Called if a modifications fail.
void apply ()
 Apply any outstanding changes to the tables.
void cancel ()
 Cancel any outstanding changes to the tables.

Private Attributes

std::string db_dir
 Directory to store databases in.
bool readonly
 Whether the database is readonly.
FlintVersion version_file
 The file describing the Flint database.
FlintPostListTable postlist_table
 Table storing posting lists.
FlintPositionListTable position_table
 Table storing position lists.
FlintTermListTable termlist_table
 Table storing term lists.
FlintValueTable value_table
 Table storing values.
FlintSynonymTable synonym_table
 Table storing synonym data.
FlintSpellingTable spelling_table
 Table storing spelling correction data.
FlintRecordTable record_table
 Table storing records.
FlintLock lock
 Lock object.
flint_totlen_t total_length
 Total length of all documents including unflushed modifications.
Xapian::docid lastdocid
 Highest document ID ever allocated by this database.

Friends

class FlintWritableDatabase
class FlintTermList
class FlintPostList
class FlintAllTermsList
class FlintAllDocsPostList

Detailed Description

A backend designed for efficient indexing and retrieval, using compressed posting lists and a btree storage scheme.

Definition at line 49 of file flint_database.h.


Constructor & Destructor Documentation

FlintDatabase::FlintDatabase ( const string &  db_dir_,
int  action = XAPIAN_DB_READONLY,
unsigned int  block_size = 0u 
)

Create and open a flint database.

Exceptions:
Xapian::DatabaseCorruptError is thrown if there is no consistent revision available.
Xapian::DatabaseOpeningError thrown if database can't be opened.
Xapian::DatabaseVersionError thrown if database is in an unsupported format. This implies that the database was created by an older or newer version of Xapian.
Parameters:
dbdir directory holding flint tables
block_size Block size, in bytes, to use when creating tables. This is only important, and has the correct value, when the database is being created.

Definition at line 77 of file flint_database.cc.

References create_and_open_tables(), database_exists(), Xapian::DB_CREATE, Xapian::DB_CREATE_OR_OVERWRITE, db_dir, Xapian::DB_OPEN, DEBUGCALL, get_database_write_lock(), FlintTable::get_latest_revision_number(), get_next_revision_number(), FlintTable::get_open_revision_number(), mkdir(), open_tables_consistent(), postlist_table, record_table, S_ISDIR, set_revision_number(), stat(), and XAPIAN_DB_READONLY.

FlintDatabase::~FlintDatabase (  ) 

Definition at line 151 of file flint_database.cc.

References DEBUGCALL.


Member Function Documentation

void FlintDatabase::read_metainfo (  )  [private]

Read lastdocid and total_length from the postlist table.

Definition at line 157 of file flint_database.cc.

References DEBUGCALL, FlintTable::get_exact_entry(), lastdocid, METAINFO_KEY(), postlist_table, total_length, unpack_uint(), and unpack_uint_last().

Referenced by FlintWritableDatabase::cancel(), and open_tables_consistent().

bool FlintDatabase::database_exists (  )  [private]

Return true if a database exists at the path specified for this database.

Definition at line 177 of file flint_database.cc.

References DEBUGCALL, FlintTable::exists(), postlist_table, record_table, RETURN, and termlist_table.

Referenced by create_and_open_tables(), FlintDatabase(), and get_database_write_lock().

void FlintDatabase::create_and_open_tables ( unsigned int  blocksize  )  [private]

Create new tables, and open them.

Any existing tables will be removed first.

Definition at line 185 of file flint_database.cc.

References Assert, FlintVersion::create(), FlintSpellingTable::create_and_open(), FlintSynonymTable::create_and_open(), FlintTable::create_and_open(), database_exists(), DEBUGCALL, FlintTable::erase(), FlintTable::get_open_revision_number(), lastdocid, position_table, postlist_table, record_table, Xapian::revision(), FlintTable::set_block_size(), spelling_table, synonym_table, termlist_table, total_length, value_table, and version_file.

Referenced by FlintDatabase().

void FlintDatabase::open_tables_consistent (  )  [private]

Open all tables at most recent consistent revision.

Exceptions:
Xapian::DatabaseCorruptError is thrown if there is no consistent revision available.

Definition at line 224 of file flint_database.cc.

References DEBUGCALL, FlintTable::get_block_size(), FlintTable::get_open_revision_number(), FlintTable::open(), position_table, postlist_table, FlintVersion::read_and_check(), read_metainfo(), readonly, record_table, Xapian::revision(), FlintTable::set_block_size(), spelling_table, synonym_table, termlist_table, value_table, and version_file.

Referenced by FlintDatabase(), and reopen().

void FlintDatabase::get_database_write_lock (  )  [private]

Get a write lock on the database, or throw an Xapian::DatabaseLockError if failure.

Definition at line 368 of file flint_database.cc.

References database_exists(), db_dir, DEBUGCALL, FlintLock::INUSE, FlintLock::lock(), lock, FlintLock::SUCCESS, FlintLock::UNKNOWN, and FlintLock::UNSUPPORTED.

Referenced by FlintDatabase().

void FlintDatabase::open_tables ( flint_revision_number_t  revision  )  [private]

Open tables at specified revision number.

Exceptions:
Xapian::InvalidArgumentError is thrown if the specified revision is not available.

Definition at line 301 of file flint_database.cc.

References DEBUGCALL, FlintTable::get_block_size(), FlintTable::open(), position_table, postlist_table, FlintVersion::read_and_check(), readonly, record_table, FlintTable::set_block_size(), spelling_table, synonym_table, termlist_table, value_table, and version_file.

flint_revision_number_t FlintDatabase::get_revision_number (  )  const [private]

Get an object holding the revision number which the tables are opened at.

Returns:
the current revision number.

Definition at line 324 of file flint_database.cc.

References DEBUGCALL, FlintTable::get_open_revision_number(), postlist_table, and RETURN.

Referenced by apply().

flint_revision_number_t FlintDatabase::get_next_revision_number (  )  const [private]

Get an object holding the next revision number which should be used in the tables.

Returns:
the next revision number.

Definition at line 332 of file flint_database.cc.

References DEBUGCALL, FlintTable::get_latest_revision_number(), postlist_table, and RETURN.

Referenced by apply(), and FlintDatabase().

void FlintDatabase::set_revision_number ( flint_revision_number_t  new_revision  )  [private]

Set the revision number in the tables.

This updates the disk tables so that the currently open revision becomes the specified revision number.

Parameters:
new_revision The new revision number to store. This must be greater than the latest revision number (see get_latest_revision_number()), or undefined behaviour will result.

Definition at line 346 of file flint_database.cc.

References FlintSpellingTable::commit(), FlintSynonymTable::commit(), FlintTable::commit(), DEBUGCALL, position_table, postlist_table, record_table, spelling_table, synonym_table, termlist_table, and value_table.

Referenced by apply(), and FlintDatabase().

void FlintDatabase::reopen (  )  [private, virtual]

Re-open tables to recover from an overwritten condition, or just get most up-to-date version.

Reimplemented from Xapian::Database::Internal.

Definition at line 359 of file flint_database.cc.

References DEBUGCALL, open_tables_consistent(), and readonly.

void FlintDatabase::modifications_failed ( flint_revision_number_t  old_revision,
flint_revision_number_t  new_revision,
const std::string &  msg 
) [private]

Called if a modifications fail.

Parameters:
msg is a string description of the exception that was raised when the modifications failed.

Referenced by apply().

void FlintDatabase::apply (  )  [private]

Apply any outstanding changes to the tables.

If an error occurs during this operation, this will be signalled by an exception being thrown. In this case the contents of the tables on disk will be left in an unmodified state (though possibly with increased revision numbers), and the outstanding changes will be lost.

Definition at line 425 of file flint_database.cc.

References DEBUGCALL, Xapian::Error::get_description(), get_next_revision_number(), get_revision_number(), FlintSpellingTable::is_modified(), FlintSynonymTable::is_modified(), FlintTable::is_modified(), modifications_failed(), position_table, postlist_table, record_table, set_revision_number(), spelling_table, synonym_table, termlist_table, and value_table.

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

void FlintDatabase::cancel (  )  [private, virtual]

Cancel any outstanding changes to the tables.

Reimplemented from Xapian::Database::Internal.

Reimplemented in FlintWritableDatabase.

Definition at line 453 of file flint_database.cc.

References FlintSpellingTable::cancel(), FlintSynonymTable::cancel(), FlintTable::cancel(), DEBUGCALL, position_table, postlist_table, record_table, spelling_table, synonym_table, termlist_table, and value_table.

Referenced by FlintWritableDatabase::cancel().

Xapian::doccount FlintDatabase::get_doccount (  )  const [virtual]

Virtual methods of Database::Internal.

Implements Xapian::Database::Internal.

Definition at line 466 of file flint_database.cc.

References DEBUGCALL, FlintRecordTable::get_doccount(), record_table, and RETURN.

Referenced by FlintWritableDatabase::open_post_list(), and open_post_list().

Xapian::docid FlintDatabase::get_lastdocid (  )  const [virtual]

Return the last used document id of this (sub) database.

Implements Xapian::Database::Internal.

Definition at line 473 of file flint_database.cc.

References DEBUGCALL, lastdocid, and RETURN.

Xapian::doclength FlintDatabase::get_avlength (  )  const [virtual]

Return the average length of a document in this (sub) database.

See Database::Internal::get_doclength() for the meaning of document length within Xapian.

Implements Xapian::Database::Internal.

Definition at line 480 of file flint_database.cc.

References DEBUGCALL, FlintRecordTable::get_doccount(), record_table, RETURN, and total_length.

Xapian::doclength FlintDatabase::get_doclength ( Xapian::docid  did  )  const [virtual]

Get the length of a given document.

Document length, for the purposes of Xapian, is defined to be the number of instances of terms within a document. Expressed differently, the sum of the within document frequencies over all the terms in the document.

Parameters:
did The document id of the document whose length is being requested.

Implements Xapian::Database::Internal.

Reimplemented in FlintWritableDatabase.

Definition at line 492 of file flint_database.cc.

References Assert, DEBUGCALL, FlintTermListTable::get_doclength(), RETURN, and termlist_table.

Referenced by FlintWritableDatabase::get_doclength().

Xapian::doccount FlintDatabase::get_termfreq ( const string &  tname  )  const [virtual]

Return the number of documents indexed by a given term.

This may be an approximation, but must be an upper bound (ie, greater or equal to the true value), and should be as accurate as possible.

Parameters:
tname The term whose term frequency is being requested.

Implements Xapian::Database::Internal.

Reimplemented in FlintWritableDatabase.

Definition at line 500 of file flint_database.cc.

References Assert, DEBUGCALL, FlintPostListTable::get_termfreq(), postlist_table, and RETURN.

Referenced by FlintWritableDatabase::get_termfreq().

Xapian::termcount FlintDatabase::get_collection_freq ( const string &  tname  )  const [virtual]

Return the total number of occurrences of the given term.

This is the sum of the number of ocurrences of the term in each document: ie, the sum of the within document frequencies of the term.

Parameters:
tname The term whose collection frequency is being requested.

Implements Xapian::Database::Internal.

Reimplemented in FlintWritableDatabase.

Definition at line 508 of file flint_database.cc.

References Assert, DEBUGCALL, FlintPostListTable::get_collection_freq(), postlist_table, and RETURN.

Referenced by FlintWritableDatabase::get_collection_freq().

bool FlintDatabase::term_exists ( const string &  tname  )  const [virtual]

Check whether a given term is in the database.

Parameters:
tname The term whose presence is being checked.

Implements Xapian::Database::Internal.

Reimplemented in FlintWritableDatabase.

Definition at line 516 of file flint_database.cc.

References Assert, DEBUGCALL, postlist_table, and FlintPostListTable::term_exists().

bool FlintDatabase::has_positions (  )  const [virtual]

Check whether this database contains any positional information.

Implements Xapian::Database::Internal.

Definition at line 524 of file flint_database.cc.

References FlintTable::get_entry_count(), and position_table.

LeafPostList * FlintDatabase::open_post_list ( const string &  tname  )  const [virtual]

Open a posting list.

Method defined by subclass to open a posting list. This is a list of all the documents which contain a given term.

Parameters:
tname The term whose posting list is being requested.
Returns:
A pointer to the newly created posting list. If the term doesn't exist, a new EmptyPostList object (or an object which behaves the same way) is returned instead, which makes it easier to implement a search over multiple databases. This object must be deleted by the caller after use.

Implements Xapian::Database::Internal.

Reimplemented in FlintWritableDatabase.

Definition at line 530 of file flint_database.cc.

References DEBUGCALL, FlintAllDocsPostList, FlintPostList, get_doccount(), lastdocid, and RETURN.

Xapian::Document::Internal * FlintDatabase::open_document ( Xapian::docid  did,
bool  lazy = false 
) const [virtual]

Open a document.

This is used to access the values and data associated with a document. See class Xapian::Document::Internal for further details.

Parameters:
did The document id which is being requested.
lazy Don't check the document exists immediately - use from within the matcher where we know the document exists, and don't want to read the record when we just want the values.
Returns:
A pointer to the newly created document object. This object must be deleted by the caller after use.

Implements Xapian::Database::Internal.

Definition at line 557 of file flint_database.cc.

References Assert, DEBUGCALL, record_table, RETURN, and value_table.

PositionList * FlintDatabase::open_position_list ( Xapian::docid  did,
const string &  tname 
) const [virtual]

Open a position list for the given term in the given document.

Parameters:
did The document id for which a position list is being requested.
tname The term for which a position list is being requested.
Returns:
A pointer to the newly created position list. This object must be deleted by the caller after use.

Implements Xapian::Database::Internal.

Definition at line 571 of file flint_database.cc.

References Assert, open_term_list(), position_table, and AutoPtr< _Tp >::release().

TermList * FlintDatabase::open_term_list ( Xapian::docid  did  )  const [virtual]

Open a term list.

This is a list of all the terms contained by a given document.

Parameters:
did The document id whose term list is being requested.
Returns:
A pointer to the newly created term list. This object must be deleted by the caller after use.

Implements Xapian::Database::Internal.

Definition at line 547 of file flint_database.cc.

References Assert, DEBUGCALL, FlintTermList, and RETURN.

Referenced by open_position_list().

TermList * FlintDatabase::open_allterms ( const string &  prefix  )  const [virtual]

Open an allterms list.

This is a list of all the terms in the database

Parameters:
prefix The prefix to restrict the terms to.
Returns:
A pointer to the newly created allterms list. This object must be deleted by the caller after use.

Implements Xapian::Database::Internal.

Reimplemented in FlintWritableDatabase.

Definition at line 591 of file flint_database.cc.

References DEBUGCALL, FlintAllTermsList, and RETURN.

Referenced by FlintWritableDatabase::open_allterms().

TermList * FlintDatabase::open_spelling_termlist ( const string &  word  )  const [virtual]

Create a termlist tree from trigrams of word.

If there are no trigrams, returns NULL.

Reimplemented from Xapian::Database::Internal.

Definition at line 599 of file flint_database.cc.

References FlintSpellingTable::open_termlist(), and spelling_table.

TermList * FlintDatabase::open_spelling_wordlist (  )  const [virtual]

Return a termlist which returns the words which are spelling correction targets.

If there are no spelling correction targets, returns NULL.

Reimplemented from Xapian::Database::Internal.

Reimplemented in FlintWritableDatabase.

Definition at line 605 of file flint_database.cc.

References FlintTable::cursor_get(), and spelling_table.

Referenced by FlintWritableDatabase::open_spelling_wordlist().

Xapian::doccount FlintDatabase::get_spelling_frequency ( const string &  word  )  const [virtual]

Return the number of times word was added as a spelling.

Reimplemented from Xapian::Database::Internal.

Definition at line 614 of file flint_database.cc.

References FlintSpellingTable::get_word_frequency(), and spelling_table.

TermList * FlintDatabase::open_synonym_termlist ( const string &  term  )  const [virtual]

Open a termlist returning synonyms for a term.

If term has no synonyms, returns NULL.

Reimplemented from Xapian::Database::Internal.

Definition at line 620 of file flint_database.cc.

References FlintSynonymTable::open_termlist(), and synonym_table.

TermList * FlintDatabase::open_synonym_keylist ( const string &  prefix  )  const [virtual]

Open a termlist returning each term which has synonyms.

Parameters:
prefix If non-empty, only terms with this prefix are returned.

Reimplemented from Xapian::Database::Internal.

Reimplemented in FlintWritableDatabase.

Definition at line 626 of file flint_database.cc.

References FlintTable::cursor_get(), FlintTable::get_entry_count(), and synonym_table.

Referenced by FlintWritableDatabase::open_synonym_keylist().

string FlintDatabase::get_metadata ( const string &  key  )  const [virtual]

Get the metadata associated with a given key.

See Database::get_metadata() for more information.

Reimplemented from Xapian::Database::Internal.

Definition at line 646 of file flint_database.cc.

References DEBUGCALL, FlintTable::get_exact_entry(), postlist_table, and RETURN.

TermList * FlintDatabase::open_metadata_keylist ( const std::string &  prefix  )  const [virtual]

Open a termlist returning each metadata key.

Only metadata keys which are associated with a non-empty value will be returned.

Parameters:
prefix If non-empty, only keys with this prefix are returned.

Reimplemented from Xapian::Database::Internal.

Definition at line 636 of file flint_database.cc.

References FlintTable::cursor_get(), DEBUGCALL, and postlist_table.


Friends And Related Function Documentation

friend class FlintWritableDatabase [friend]

Definition at line 50 of file flint_database.h.

friend class FlintTermList [friend]

Definition at line 51 of file flint_database.h.

Referenced by open_term_list().

friend class FlintPostList [friend]

Definition at line 52 of file flint_database.h.

Referenced by FlintWritableDatabase::open_post_list(), and open_post_list().

friend class FlintAllTermsList [friend]

Definition at line 53 of file flint_database.h.

Referenced by open_allterms().

friend class FlintAllDocsPostList [friend]

Definition at line 54 of file flint_database.h.

Referenced by FlintWritableDatabase::open_post_list(), and open_post_list().


Member Data Documentation

std::string FlintDatabase::db_dir [private]

Directory to store databases in.

Definition at line 58 of file flint_database.h.

Referenced by FlintDatabase(), and get_database_write_lock().

bool FlintDatabase::readonly [private]

Whether the database is readonly.

Definition at line 62 of file flint_database.h.

Referenced by open_tables(), open_tables_consistent(), and reopen().

FlintVersion FlintDatabase::version_file [private]

The file describing the Flint database.

This file has information about the format of the database which can't easily be stored in any of the individual tables.

Definition at line 68 of file flint_database.h.

Referenced by create_and_open_tables(), open_tables(), and open_tables_consistent().

FlintPostListTable FlintDatabase::postlist_table [mutable, private]

Table storing posting lists.

Whenever an update is performed, this table is the first to be updated: therefore, its most recent revision number is the most recent anywhere in the database.

Definition at line 76 of file flint_database.h.

Referenced by apply(), cancel(), create_and_open_tables(), database_exists(), FlintDatabase(), FlintWritableDatabase::flush_postlist_changes(), get_collection_freq(), get_metadata(), get_next_revision_number(), get_revision_number(), get_termfreq(), open_metadata_keylist(), open_tables(), open_tables_consistent(), read_metainfo(), FlintWritableDatabase::set_metadata(), set_revision_number(), and term_exists().

FlintPositionListTable FlintDatabase::position_table [private]

Table storing position lists.

Definition at line 80 of file flint_database.h.

Referenced by FlintWritableDatabase::add_document_(), apply(), cancel(), create_and_open_tables(), FlintWritableDatabase::delete_document(), has_positions(), open_position_list(), open_tables(), open_tables_consistent(), FlintWritableDatabase::replace_document(), and set_revision_number().

FlintTermListTable FlintDatabase::termlist_table [private]

Table storing term lists.

Definition at line 84 of file flint_database.h.

Referenced by FlintWritableDatabase::add_document_(), apply(), cancel(), create_and_open_tables(), database_exists(), FlintWritableDatabase::delete_document(), get_doclength(), open_tables(), open_tables_consistent(), FlintWritableDatabase::replace_document(), and set_revision_number().

FlintValueTable FlintDatabase::value_table [private]

Table storing values.

Definition at line 88 of file flint_database.h.

Referenced by FlintWritableDatabase::add_document_(), apply(), cancel(), create_and_open_tables(), FlintWritableDatabase::delete_document(), open_document(), open_tables(), open_tables_consistent(), FlintWritableDatabase::replace_document(), and set_revision_number().

FlintSynonymTable FlintDatabase::synonym_table [mutable, private]

Table storing synonym data.

Definition at line 92 of file flint_database.h.

Referenced by FlintWritableDatabase::add_synonym(), apply(), cancel(), FlintWritableDatabase::clear_synonyms(), create_and_open_tables(), FlintWritableDatabase::open_synonym_keylist(), open_synonym_keylist(), open_synonym_termlist(), open_tables(), open_tables_consistent(), FlintWritableDatabase::remove_synonym(), and set_revision_number().

FlintSpellingTable FlintDatabase::spelling_table [mutable, private]

Table storing spelling correction data.

Definition at line 96 of file flint_database.h.

Referenced by FlintWritableDatabase::add_spelling(), apply(), cancel(), create_and_open_tables(), get_spelling_frequency(), open_spelling_termlist(), FlintWritableDatabase::open_spelling_wordlist(), open_spelling_wordlist(), open_tables(), open_tables_consistent(), FlintWritableDatabase::remove_spelling(), and set_revision_number().

FlintRecordTable FlintDatabase::record_table [private]

Table storing records.

Whenever an update is performed, this table is the last to be updated: therefore, its most recent revision number is the most recent consistent revision available. If this table's most recent revision number is not available for all tables, there is no consistent revision available, and the database is corrupt.

Definition at line 106 of file flint_database.h.

Referenced by FlintWritableDatabase::add_document_(), apply(), cancel(), create_and_open_tables(), database_exists(), FlintWritableDatabase::delete_document(), FlintDatabase(), get_avlength(), get_doccount(), open_document(), open_tables(), open_tables_consistent(), FlintWritableDatabase::replace_document(), and set_revision_number().

FlintLock FlintDatabase::lock [private]

Lock object.

Definition at line 109 of file flint_database.h.

Referenced by get_database_write_lock().

flint_totlen_t FlintDatabase::total_length [mutable, private]

Total length of all documents including unflushed modifications.

Definition at line 112 of file flint_database.h.

Referenced by FlintWritableDatabase::add_document_(), create_and_open_tables(), FlintWritableDatabase::delete_document(), FlintWritableDatabase::flush_postlist_changes(), get_avlength(), read_metainfo(), and FlintWritableDatabase::replace_document().

Xapian::docid FlintDatabase::lastdocid [mutable, private]

Highest document ID ever allocated by this database.

Definition at line 115 of file flint_database.h.

Referenced by FlintWritableDatabase::add_document(), create_and_open_tables(), FlintWritableDatabase::flush_postlist_changes(), get_lastdocid(), FlintWritableDatabase::open_post_list(), open_post_list(), read_metainfo(), and FlintWritableDatabase::replace_document().


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.