| 
    xapian-core
    1.4.29
    
   | 
 
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, 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 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, const std::string &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, const std::string &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 (const std::string &term, Xapian::termcount_diff &tf_delta, Xapian::termcount_diff &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, const std::string &tname, const std::vector< 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 > | 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 > > | pos_changes | 
| Buffered changes to positional data.  More... | |
Friends | |
| class | GlassPostListTable | 
Class which "inverts the file".
Definition at line 45 of file glass_inverter.h.
      
  | 
  inline | 
Definition at line 143 of file glass_inverter.h.
Referenced by GlassWritableDatabase::add_document_(), and GlassWritableDatabase::replace_document().
      
  | 
  inline | 
Definition at line 195 of file glass_inverter.h.
Referenced by GlassWritableDatabase::cancel().
      
  | 
  inline | 
Definition at line 209 of file glass_inverter.h.
References Assert, and DELETED_POSTING.
Referenced by GlassWritableDatabase::delete_document().
| void Inverter::delete_positionlist | ( | Xapian::docid | did, | 
| const std::string & | term | ||
| ) | 
Definition at line 110 of file glass_inverter.cc.
Referenced by GlassWritableDatabase::delete_document(), and GlassWritableDatabase::replace_document().
| void Inverter::flush | ( | GlassPostListTable & | table | ) | 
Flush all postlist table changes.
Definition at line 216 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 175 of file glass_inverter.cc.
References GlassPostListTable::merge_changes().
| void Inverter::flush_doclengths | ( | GlassPostListTable & | table | ) | 
Flush document length changes.
Definition at line 156 of file glass_inverter.cc.
References GlassPostListTable::merge_doclen_changes().
Referenced by GlassWritableDatabase::open_post_list().
| void Inverter::flush_pos_lists | ( | GlassPositionListTable & | table | ) | 
Flush position changes.
Definition at line 223 of file glass_inverter.cc.
References GlassPositionListTable::delete_positionlist(), and GlassPositionListTable::set_positionlist().
Referenced by GlassWritableDatabase::flush_postlist_changes().
| void Inverter::flush_post_list | ( | GlassPostListTable & | table, | 
| const std::string & | term | ||
| ) | 
Flush postlist changes for term.
Definition at line 163 of file glass_inverter.cc.
References GlassPostListTable::merge_changes().
Referenced by GlassWritableDatabase::open_post_list().
| void Inverter::flush_post_lists | ( | GlassPostListTable & | table, | 
| const std::string & | pfx | ||
| ) | 
Flush postlist changes for all terms which start with pfx.
Definition at line 185 of file glass_inverter.cc.
References GlassPostListTable::merge_changes().
Referenced by GlassWritableDatabase::open_allterms().
      
  | 
  inline | 
Definition at line 243 of file glass_inverter.h.
Referenced by GlassWritableDatabase::get_freqs().
      
  | 
  inline | 
Definition at line 214 of file glass_inverter.h.
References DELETED_POSTING, rare, and Xapian::Internal::str().
Referenced by GlassWritableDatabase::get_doclength(), and GlassWritableDatabase::get_unique_terms().
| bool Inverter::get_positionlist | ( | Xapian::docid | did, | 
| const std::string & | term, | ||
| std::string & | s | ||
| ) | const | 
Definition at line 117 of file glass_inverter.cc.
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 133 of file glass_inverter.cc.
References GlassTable::get_entry_count().
Referenced by GlassWritableDatabase::has_positions().
      
  | 
  inline | 
Definition at line 155 of file glass_inverter.h.
Referenced by GlassWritableDatabase::delete_document(), and GlassWritableDatabase::replace_document().
      
  | 
  inline | 
Definition at line 202 of file glass_inverter.h.
References Assert, and DELETED_POSTING.
Referenced by GlassWritableDatabase::add_document_(), and GlassWritableDatabase::replace_document().
      
  | 
  private | 
Definition at line 100 of file glass_inverter.cc.
Referenced by GlassWritableDatabase::add_document_(), and GlassWritableDatabase::replace_document().
| void Inverter::set_positionlist | ( | const GlassPositionListTable & | position_table, | 
| Xapian::docid | did, | ||
| const std::string & | tname, | ||
| const Xapian::TermIterator & | term, | ||
| bool | modifying = false  | 
        ||
| ) | 
Definition at line 73 of file glass_inverter.cc.
References Xapian::TermIterator::Internal::get_vector_termpos(), Xapian::TermIterator::internal, Xapian::TermIterator::positionlist_begin(), and Xapian::TermIterator::positionlist_end().
      
  | 
  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 167 of file glass_inverter.h.
Referenced by GlassWritableDatabase::replace_document().
      
  | 
  friend | 
Definition at line 46 of file glass_inverter.h.
| std::map<Xapian::docid, Xapian::termcount> Inverter::doclen_changes | 
Buffered changes to document lengths.
Definition at line 140 of file glass_inverter.h.
      
  | 
  mutableprivate | 
Cached answer to Inverter::has_positions().
-1: needs calculating 0: false 1: true
Definition at line 123 of file glass_inverter.h.
      
  | 
  private | 
Buffered changes to positional data.
Definition at line 126 of file glass_inverter.h.
      
  | 
  private | 
Buffered changes to postlists.
Definition at line 115 of file glass_inverter.h.