#include <brass_inverter.h>

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 |
Definition at line 39 of file brass_inverter.h.
| void Inverter::add_posting | ( | Xapian::docid | did, | |
| const std::string & | term, | |||
| Xapian::doccount | wdf | |||
| ) | [inline] |
Definition at line 116 of file brass_inverter.h.
References postlist_changes.
Referenced by BrassWritableDatabase::add_document_(), and BrassWritableDatabase::replace_document().
| 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] |
Definition at line 170 of file brass_inverter.h.
References DELETED_POSTING, doclen_changes, rare, and Xapian::Internal::str().
Referenced by BrassWritableDatabase::get_doclength().
| 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] |
Definition at line 128 of file brass_inverter.h.
References postlist_changes.
Referenced by BrassWritableDatabase::delete_document(), and BrassWritableDatabase::replace_document().
| void Inverter::set_doclength | ( | Xapian::docid | did, | |
| Xapian::termcount | doclen, | |||
| bool | add | |||
| ) | [inline] |
Definition at line 158 of file brass_inverter.h.
References Assert, DELETED_POSTING, and doclen_changes.
Referenced by BrassWritableDatabase::add_document_(), and BrassWritableDatabase::replace_document().
| 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().
friend class BrassPostListTable [friend] |
Definition at line 40 of file brass_inverter.h.
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] |
Buffered changes to postlists.
Definition at line 109 of file brass_inverter.h.
Referenced by add_posting(), clear(), flush_all_post_lists(), flush_post_list(), flush_post_lists(), get_cfdelta(), get_tfdelta(), remove_posting(), and update_posting().