|
xapian-core
2.0.0
|
Class which "inverts the file". More...
#include <honey_inverter.h>
Collaboration diagram for HoneyInverter: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 | set_positionlist (const HoneyPositionTable &position_table, Xapian::docid did, const std::string &tname, const Xapian::TermIterator &term, bool modifying=false) |
| void | delete_positionlist (Xapian::docid did, const std::string &term) |
| bool | get_positionlist (Xapian::docid did, const std::string &term, std::string &s) const |
| bool | has_positions (const HoneyPositionTable &position_table) const |
| 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 (HoneyPostListTable &table) |
| Flush document length changes. More... | |
| void | flush_post_list (HoneyPostListTable &table, const std::string &term) |
| Flush postlist changes for term. More... | |
| void | flush_all_post_lists (HoneyPostListTable &table) |
| Flush postlist changes for all terms. More... | |
| void | flush_post_lists (HoneyPostListTable &table, const std::string &pfx) |
| Flush postlist changes for all terms which start with pfx. More... | |
| void | flush (HoneyPostListTable &table) |
| Flush all postlist table changes. More... | |
| void | flush_pos_lists (HoneyPositionTable &table) |
| Flush position changes. More... | |
| bool | get_deltas (std::string_view term, Xapian::termcount &tf_delta, Xapian::termcount &cf_delta) const |
Public Attributes | |
| std::map< Xapian::docid, Xapian::termcount > | doclen_changes |
| Buffered changes to document lengths. More... | |
Private Member Functions | |
| void | store_positions (const HoneyPositionTable &position_table, Xapian::docid did, const std::string &tname, const Xapian::VecCOW< Xapian::termpos > &posvec, bool modifying) |
| void | set_positionlist (Xapian::docid did, const std::string &term, const std::string &s) |
Private Attributes | |
| std::map< std::string, PostingChanges, std::less<> > | postlist_changes |
| Buffered changes to postlists. More... | |
| std::map< std::string, std::map< Xapian::docid, std::string >, std::less<> > | pos_changes |
| Buffered changes to positional data. More... | |
Static Private Attributes | |
| static const Xapian::termcount | DELETED_POSTING = Xapian::termcount(-1) |
| Magic wdf value used for a deleted posting. More... | |
Friends | |
| class | HoneyPostListTable |
Class which "inverts the file".
Definition at line 45 of file honey_inverter.h.
|
inline |
Definition at line 150 of file honey_inverter.h.
References postlist_changes, and term.
|
inline |
Definition at line 199 of file honey_inverter.h.
References doclen_changes, pos_changes, and postlist_changes.
|
inline |
Definition at line 213 of file honey_inverter.h.
References Assert, DELETED_POSTING, and doclen_changes.
| void HoneyInverter::delete_positionlist | ( | Xapian::docid | did, |
| const std::string & | term | ||
| ) |
Definition at line 107 of file honey_inverter.cc.
References term.
| void HoneyInverter::flush | ( | HoneyPostListTable & | table | ) |
Flush all postlist table changes.
Definition at line 211 of file honey_inverter.cc.
| void HoneyInverter::flush_all_post_lists | ( | HoneyPostListTable & | table | ) |
Flush postlist changes for all terms.
Definition at line 171 of file honey_inverter.cc.
References HoneyPostListTable::merge_changes().
| void HoneyInverter::flush_doclengths | ( | HoneyPostListTable & | table | ) |
Flush document length changes.
Definition at line 153 of file honey_inverter.cc.
References HoneyPostListTable::merge_doclen_changes().
| void HoneyInverter::flush_pos_lists | ( | HoneyPositionTable & | table | ) |
Flush position changes.
Definition at line 218 of file honey_inverter.cc.
References HoneyPositionTable::delete_positionlist(), HoneyPositionTable::set_positionlist(), and term.
| void HoneyInverter::flush_post_list | ( | HoneyPostListTable & | table, |
| const std::string & | term | ||
| ) |
Flush postlist changes for term.
Definition at line 160 of file honey_inverter.cc.
References HoneyPostListTable::merge_changes(), and term.
| void HoneyInverter::flush_post_lists | ( | HoneyPostListTable & | table, |
| const std::string & | pfx | ||
| ) |
Flush postlist changes for all terms which start with pfx.
Definition at line 180 of file honey_inverter.cc.
References HoneyPostListTable::merge_changes().
|
inline |
Definition at line 247 of file honey_inverter.h.
References postlist_changes, and term.
|
inline |
Definition at line 219 of file honey_inverter.h.
References DELETED_POSTING, doclen_changes, rare, and Xapian::Internal::str().
| bool HoneyInverter::get_positionlist | ( | Xapian::docid | did, |
| const std::string & | term, | ||
| std::string & | s | ||
| ) | const |
Definition at line 114 of file honey_inverter.cc.
References term.
| bool HoneyInverter::has_positions | ( | const HoneyPositionTable & | position_table | ) | const |
Definition at line 130 of file honey_inverter.cc.
References HoneyTable::empty(), and HoneyTable::get_entry_count().
|
inline |
Definition at line 161 of file honey_inverter.h.
References postlist_changes, and term.
|
inline |
Definition at line 205 of file honey_inverter.h.
References HoneyTable::add(), Assert, DELETED_POSTING, and doclen_changes.
| void HoneyInverter::set_positionlist | ( | const HoneyPositionTable & | position_table, |
| Xapian::docid | did, | ||
| const std::string & | tname, | ||
| const Xapian::TermIterator & | term, | ||
| bool | modifying = false |
||
| ) |
Definition at line 67 of file honey_inverter.cc.
References Xapian::TermIterator::Internal::get_vec_termpos(), Xapian::TermIterator::internal, pos, Xapian::TermIterator::positionlist_begin(), Xapian::TermIterator::positionlist_count(), Xapian::TermIterator::positionlist_end(), Xapian::Vec< T, COW, UNIQUEPTR, typename >::push_back(), Xapian::Vec< T, COW, UNIQUEPTR, typename >::reserve(), and term.
|
private |
Definition at line 98 of file honey_inverter.cc.
References term.
|
private |
Definition at line 37 of file honey_inverter.cc.
References HoneyTable::get_exact_entry(), HoneyPositionTable::make_key(), HoneyPositionTable::pack(), and term.
|
inline |
Definition at line 172 of file honey_inverter.h.
References postlist_changes, and term.
|
friend |
Definition at line 46 of file honey_inverter.h.
|
staticprivate |
Magic wdf value used for a deleted posting.
Definition at line 49 of file honey_inverter.h.
Referenced by delete_doclength(), get_doclength(), HoneyInverter::PostingChanges::PostingChanges(), HoneyInverter::PostingChanges::remove_posting(), and set_doclength().
| std::map<Xapian::docid, Xapian::termcount> HoneyInverter::doclen_changes |
Buffered changes to document lengths.
Definition at line 147 of file honey_inverter.h.
Referenced by clear(), delete_doclength(), get_doclength(), and set_doclength().
|
private |
Buffered changes to positional data.
Definition at line 133 of file honey_inverter.h.
Referenced by clear().
|
private |
Buffered changes to postlists.
Definition at line 128 of file honey_inverter.h.
Referenced by add_posting(), clear(), get_deltas(), remove_posting(), and update_posting().