Inverter Class Reference

Class which "inverts the file". More...

#include <brass_inverter.h>

Collaboration diagram for Inverter:

Collaboration graph
[legend]

List of all members.

Classes

class  PostingChanges
 Class for storing the changes in frequencies for a term. More...

Public Member Functions

void add_posting (Xapian::docid did, const std::string &term, Xapian::doccount wdf)
void remove_posting (Xapian::docid did, const std::string &term, Xapian::doccount wdf)
void update_posting (Xapian::docid did, const std::string &term, Xapian::termcount old_wdf, Xapian::termcount new_wdf)
void clear ()
void set_doclength (Xapian::docid did, Xapian::termcount doclen, bool add)
void delete_doclength (Xapian::docid did)
bool get_doclength (Xapian::docid did, Xapian::termcount &doclen) const
void flush_doclengths (BrassPostListTable &table)
 Flush document length changes.
void flush_post_list (BrassPostListTable &table, const std::string &term)
 Flush postlist changes for term.
void flush_all_post_lists (BrassPostListTable &table)
 Flush postlist changes for all terms.
void flush_post_lists (BrassPostListTable &table, const std::string &pfx)
 Flush postlist changes for all terms which start with pfx.
void flush (BrassPostListTable &table)
 Flush all changes.
Xapian::termcount_diff get_tfdelta (const std::string &term) const
Xapian::termcount_diff get_cfdelta (const std::string &term) const

Public Attributes

std::map< Xapian::docid,
Xapian::termcount
doclen_changes
 Buffered changes to document lengths.

Private Attributes

std::map< std::string,
PostingChanges
postlist_changes
 Buffered changes to postlists.

Friends

class BrassPostListTable


Detailed Description

Class which "inverts the file".

Definition at line 39 of file brass_inverter.h.


Member Function Documentation

void Inverter::add_posting ( Xapian::docid  did,
const std::string &  term,
Xapian::doccount  wdf 
) [inline]

void Inverter::clear (  )  [inline]

Definition at line 153 of file brass_inverter.h.

References doclen_changes, and postlist_changes.

Referenced by BrassWritableDatabase::cancel().

void Inverter::delete_doclength ( Xapian::docid  did  )  [inline]

Definition at line 165 of file brass_inverter.h.

References Assert, DELETED_POSTING, and doclen_changes.

Referenced by BrassWritableDatabase::delete_document().

void Inverter::flush ( BrassPostListTable table  ) 

Flush all changes.

Definition at line 81 of file brass_inverter.cc.

References flush_all_post_lists(), and flush_doclengths().

Referenced by BrassWritableDatabase::flush_postlist_changes().

void Inverter::flush_all_post_lists ( BrassPostListTable table  ) 

Flush postlist changes for all terms.

Definition at line 52 of file brass_inverter.cc.

References BrassPostListTable::merge_changes(), and postlist_changes.

Referenced by flush(), and flush_post_lists().

void Inverter::flush_doclengths ( BrassPostListTable table  ) 

Flush document length changes.

Definition at line 33 of file brass_inverter.cc.

References doclen_changes, and BrassPostListTable::merge_doclen_changes().

Referenced by flush(), and BrassWritableDatabase::open_post_list().

void Inverter::flush_post_list ( BrassPostListTable table,
const std::string &  term 
)

Flush postlist changes for term.

Definition at line 40 of file brass_inverter.cc.

References BrassPostListTable::merge_changes(), and postlist_changes.

Referenced by BrassWritableDatabase::open_post_list().

void Inverter::flush_post_lists ( BrassPostListTable table,
const std::string &  pfx 
)

Flush postlist changes for all terms which start with pfx.

Definition at line 62 of file brass_inverter.cc.

References flush_all_post_lists(), BrassPostListTable::merge_changes(), and postlist_changes.

Referenced by BrassWritableDatabase::open_allterms().

Xapian::termcount_diff Inverter::get_cfdelta ( const std::string &  term  )  const [inline]

Definition at line 204 of file brass_inverter.h.

References postlist_changes.

Referenced by BrassWritableDatabase::get_collection_freq().

bool Inverter::get_doclength ( Xapian::docid  did,
Xapian::termcount doclen 
) const [inline]

Xapian::termcount_diff Inverter::get_tfdelta ( const std::string &  term  )  const [inline]

Definition at line 196 of file brass_inverter.h.

References postlist_changes.

Referenced by BrassWritableDatabase::get_termfreq().

void Inverter::remove_posting ( Xapian::docid  did,
const std::string &  term,
Xapian::doccount  wdf 
) [inline]

void Inverter::set_doclength ( Xapian::docid  did,
Xapian::termcount  doclen,
bool  add 
) [inline]

void Inverter::update_posting ( Xapian::docid  did,
const std::string &  term,
Xapian::termcount  old_wdf,
Xapian::termcount  new_wdf 
) [inline]

Definition at line 140 of file brass_inverter.h.

References postlist_changes.

Referenced by BrassWritableDatabase::replace_document().


Friends And Related Function Documentation

friend class BrassPostListTable [friend]

Definition at line 40 of file brass_inverter.h.


Member Data Documentation

Buffered changes to document lengths.

Definition at line 113 of file brass_inverter.h.

Referenced by clear(), delete_doclength(), flush_doclengths(), get_doclength(), and set_doclength().

std::map<std::string, PostingChanges> Inverter::postlist_changes [private]


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.