|
xapian-core
2.0.0
|
Class which "inverts the file". More...
#include <glass_inverter.h>
Collaboration diagram for Inverter: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 GlassPositionListTable &position_table, Xapian::docid did, std::string_view tname, const Xapian::TermIterator &term, bool modifying=false) |
| void | delete_positionlist (Xapian::docid did, std::string_view term) |
| bool | get_positionlist (Xapian::docid did, std::string_view term, std::string &s) const |
| bool | has_positions (const GlassPositionListTable &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 (GlassPostListTable &table) |
| Flush document length changes. More... | |
| void | flush_post_list (GlassPostListTable &table, std::string_view term) |
| Flush postlist changes for term. More... | |
| void | flush_all_post_lists (GlassPostListTable &table) |
| Flush postlist changes for all terms. More... | |
| void | flush_post_lists (GlassPostListTable &table, std::string_view pfx) |
| Flush postlist changes for all terms which start with pfx. More... | |
| void | flush (GlassPostListTable &table) |
| Flush all postlist table changes. More... | |
| void | flush_pos_lists (GlassPositionListTable &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 GlassPositionListTable &position_table, Xapian::docid did, std::string_view tname, const Xapian::VecCOW< Xapian::termpos > &posvec, bool modifying) |
| void | set_positionlist (Xapian::docid did, std::string_view term, std::string_view s) |
Private Attributes | |
| std::map< std::string, PostingChanges, std::less<> > | postlist_changes |
| Buffered changes to postlists. More... | |
| int | has_positions_cache = -1 |
| Cached answer to Inverter::has_positions(). More... | |
| std::map< std::string, std::map< Xapian::docid, std::string >, std::less<> > | pos_changes |
| Buffered changes to positional data. More... | |
Friends | |
| class | GlassPostListTable |
Class which "inverts the file".
Definition at line 49 of file glass_inverter.h.
|
inline |
Definition at line 159 of file glass_inverter.h.
References postlist_changes, and term.
Referenced by GlassWritableDatabase::add_document_(), and GlassWritableDatabase::replace_document().
|
inline |
Definition at line 208 of file glass_inverter.h.
References doclen_changes, has_positions_cache, pos_changes, and postlist_changes.
Referenced by GlassWritableDatabase::cancel().
|
inline |
Definition at line 222 of file glass_inverter.h.
References Assert, DELETED_POSTING, and doclen_changes.
Referenced by GlassWritableDatabase::delete_document().
| void Inverter::delete_positionlist | ( | Xapian::docid | did, |
| std::string_view | term | ||
| ) |
Definition at line 114 of file glass_inverter.cc.
References term.
Referenced by GlassWritableDatabase::delete_document(), and GlassWritableDatabase::replace_document().
| void Inverter::flush | ( | GlassPostListTable & | table | ) |
Flush all postlist table changes.
Definition at line 218 of file glass_inverter.cc.
Referenced by GlassWritableDatabase::flush_postlist_changes().
| void Inverter::flush_all_post_lists | ( | GlassPostListTable & | table | ) |
Flush postlist changes for all terms.
Definition at line 178 of file glass_inverter.cc.
References GlassPostListTable::merge_changes().
| void Inverter::flush_doclengths | ( | GlassPostListTable & | table | ) |
Flush document length changes.
Definition at line 160 of file glass_inverter.cc.
References GlassPostListTable::merge_doclen_changes().
Referenced by GlassWritableDatabase::open_leaf_post_list().
| void Inverter::flush_pos_lists | ( | GlassPositionListTable & | table | ) |
Flush position changes.
Definition at line 225 of file glass_inverter.cc.
References GlassPositionListTable::delete_positionlist(), GlassPositionListTable::set_positionlist(), and term.
Referenced by GlassWritableDatabase::flush_postlist_changes().
| void Inverter::flush_post_list | ( | GlassPostListTable & | table, |
| std::string_view | term | ||
| ) |
Flush postlist changes for term.
Definition at line 167 of file glass_inverter.cc.
References GlassPostListTable::merge_changes(), and term.
Referenced by GlassWritableDatabase::open_leaf_post_list().
| void Inverter::flush_post_lists | ( | GlassPostListTable & | table, |
| std::string_view | pfx | ||
| ) |
Flush postlist changes for all terms which start with pfx.
Definition at line 187 of file glass_inverter.cc.
References GlassPostListTable::merge_changes().
Referenced by GlassWritableDatabase::open_allterms().
|
inline |
Definition at line 255 of file glass_inverter.h.
References postlist_changes, and term.
Referenced by GlassWritableDatabase::get_freqs().
|
inline |
Definition at line 227 of file glass_inverter.h.
References DELETED_POSTING, doclen_changes, rare, and Xapian::Internal::str().
Referenced by GlassWritableDatabase::get_doclength(), and GlassWritableDatabase::get_unique_terms().
| bool Inverter::get_positionlist | ( | Xapian::docid | did, |
| std::string_view | term, | ||
| std::string & | s | ||
| ) | const |
Definition at line 121 of file glass_inverter.cc.
References term.
Referenced by GlassWritableDatabase::open_position_list(), GlassWritableDatabase::positionlist_count(), and GlassWritableDatabase::read_position_list().
| bool Inverter::has_positions | ( | const GlassPositionListTable & | position_table | ) | const |
Definition at line 137 of file glass_inverter.cc.
References GlassTable::get_entry_count().
Referenced by GlassWritableDatabase::has_positions().
|
inline |
Definition at line 170 of file glass_inverter.h.
References postlist_changes, and term.
Referenced by GlassWritableDatabase::delete_document(), and GlassWritableDatabase::replace_document().
|
inline |
Definition at line 215 of file glass_inverter.h.
References GlassTable::add(), Assert, DELETED_POSTING, and doclen_changes.
Referenced by GlassWritableDatabase::add_document_(), and GlassWritableDatabase::replace_document().
| void Inverter::set_positionlist | ( | const GlassPositionListTable & | position_table, |
| Xapian::docid | did, | ||
| std::string_view | tname, | ||
| const Xapian::TermIterator & | term, | ||
| bool | modifying = false |
||
| ) |
Definition at line 73 of file glass_inverter.cc.
References pos, Xapian::Vec< T, COW, UNIQUEPTR, typename >::push_back(), Xapian::Vec< T, COW, UNIQUEPTR, typename >::reserve(), and term.
|
private |
Definition at line 104 of file glass_inverter.cc.
References term.
Referenced by GlassWritableDatabase::add_document_(), and GlassWritableDatabase::replace_document().
|
private |
Definition at line 36 of file glass_inverter.cc.
References GlassTable::get_exact_entry(), GlassPositionListTable::make_key(), and GlassPositionListTable::pack().
|
inline |
Definition at line 181 of file glass_inverter.h.
References postlist_changes, and term.
Referenced by GlassWritableDatabase::replace_document().
|
friend |
Definition at line 50 of file glass_inverter.h.
| std::map<Xapian::docid, Xapian::termcount> Inverter::doclen_changes |
Buffered changes to document lengths.
Definition at line 156 of file glass_inverter.h.
Referenced by clear(), delete_doclength(), get_doclength(), and set_doclength().
|
mutableprivate |
Cached answer to Inverter::has_positions().
-1: needs calculating 0: false 1: true
Definition at line 137 of file glass_inverter.h.
Referenced by clear().
|
private |
Buffered changes to positional data.
Definition at line 142 of file glass_inverter.h.
Referenced by clear().
|
private |
Buffered changes to postlists.
Definition at line 129 of file glass_inverter.h.
Referenced by add_posting(), clear(), get_deltas(), remove_posting(), and update_posting().