| 
    xapian-core
    1.4.29
    
   | 
 
The Collapser class tracks collapse keys and the documents they match. More...
#include <collapser.h>
 Collaboration diagram for Collapser:Public Member Functions | |
| Collapser (Xapian::valueno slot_, Xapian::doccount collapse_max_) | |
| operator bool () const | |
| Return true if collapsing is active for this match.  More... | |
| collapse_result | process (Xapian::Internal::MSetItem &item, PostList *postlist, Xapian::Document::Internal &vsdoc, MSetCmp mcmp) | 
| Handle a new MSetItem.  More... | |
| Xapian::doccount | get_collapse_count (const std::string &collapse_key, int percent_cutoff, double min_weight) const | 
| Xapian::doccount | get_docs_considered () const | 
| Xapian::doccount | get_dups_ignored () const | 
| Xapian::doccount | entries () const | 
| Xapian::doccount | get_matches_lower_bound () const | 
| bool | empty () const | 
Public Attributes | |
| Xapian::Internal::MSetItem | old_item | 
| Replaced item when REPLACED is returned by collapse().  More... | |
Private Attributes | |
| std::map< std::string, CollapseData > | table | 
| Map from collapse key values to the items we're keeping for them.  More... | |
| Xapian::doccount | entry_count | 
| How many items we're currently keeping in table.  More... | |
| Xapian::doccount | no_collapse_key | 
| How many documents have we seen without a collapse key?  More... | |
| Xapian::doccount | dups_ignored | 
| How many documents with duplicate collapse keys we have ignored.  More... | |
| Xapian::doccount | docs_considered | 
| How many documents we've considered for collapsing.  More... | |
| Xapian::valueno | slot | 
| The value slot we're getting collapse keys from.  More... | |
| Xapian::doccount | collapse_max | 
| The maximum number of items to keep for each collapse key value.  More... | |
The Collapser class tracks collapse keys and the documents they match.
Definition at line 87 of file collapser.h.
      
  | 
  inline | 
Definition at line 124 of file collapser.h.
      
  | 
  inline | 
Definition at line 159 of file collapser.h.
Referenced by MultiMatch::get_mset().
      
  | 
  inline | 
Definition at line 155 of file collapser.h.
Referenced by MultiMatch::get_mset().
| Xapian::doccount Collapser::get_collapse_count | ( | const std::string & | collapse_key, | 
| int | percent_cutoff, | ||
| double | min_weight | ||
| ) | const | 
Definition at line 111 of file collapser.cc.
References Assert.
Referenced by MultiMatch::get_mset().
      
  | 
  inline | 
Definition at line 151 of file collapser.h.
Referenced by MultiMatch::get_mset().
      
  | 
  inline | 
Definition at line 153 of file collapser.h.
Referenced by MultiMatch::get_mset().
| Xapian::doccount Collapser::get_matches_lower_bound | ( | ) | const | 
Definition at line 137 of file collapser.cc.
Referenced by MultiMatch::get_mset().
      
  | 
  inline | 
Return true if collapsing is active for this match.
Definition at line 130 of file collapser.h.
References CollapseData::get_collapse_count().
| collapse_result Collapser::process | ( | Xapian::Internal::MSetItem & | item, | 
| PostList * | postlist, | ||
| Xapian::Document::Internal & | vsdoc, | ||
| MSetCmp | mcmp | ||
| ) | 
Handle a new MSetItem.
| item | The new item. | 
| postlist | PostList to try to get collapse key from (this happens for a remote match). | 
| doc | Document for getting values. | 
| mcmp | MSetItem comparison functor. | 
Definition at line 70 of file collapser.cc.
References CollapseData::add_item(), ADDED, Xapian::Internal::MSetItem::collapse_key, EMPTY, Xapian::PostingIterator::Internal::get_collapse_key(), Xapian::Document::Internal::get_value(), REJECTED, and REPLACED.
Referenced by MultiMatch::get_mset().
      
  | 
  private | 
The maximum number of items to keep for each collapse key value.
Definition at line 118 of file collapser.h.
      
  | 
  private | 
How many documents we've considered for collapsing.
We use this statistic to improve matches_estimated (by considering the rate of collapsing).
Definition at line 112 of file collapser.h.
      
  | 
  private | 
How many documents with duplicate collapse keys we have ignored.
We use this statistic to improve matches_estimated (by considering the rate of collapsing) and matches_upper_bound.
Definition at line 105 of file collapser.h.
      
  | 
  private | 
How many items we're currently keeping in table.
Definition at line 92 of file collapser.h.
      
  | 
  private | 
How many documents have we seen without a collapse key?
We use this statistic to improve matches_lower_bound.
Definition at line 98 of file collapser.h.
| Xapian::Internal::MSetItem Collapser::old_item | 
Replaced item when REPLACED is returned by collapse().
Definition at line 122 of file collapser.h.
Referenced by MultiMatch::get_mset().
      
  | 
  private | 
The value slot we're getting collapse keys from.
Definition at line 115 of file collapser.h.
      
  | 
  private | 
Map from collapse key values to the items we're keeping for them.
Definition at line 89 of file collapser.h.