|
xapian-core
2.0.0
|
Simpler version of Collapser used when merging MSet objects. More...
#include <collapser.h>
Collaboration diagram for CollapserLite:Public Member Functions | |
| CollapserLite (Xapian::doccount collapse_max_) | |
| operator bool () const | |
| Return true if collapsing is active for this match. More... | |
| bool | add (const std::string &key) |
| Try to add a new key. More... | |
| Xapian::doccount | get_docs_considered () const |
| Xapian::doccount | get_dups_ignored () const |
| Xapian::doccount | get_entries () const |
| Xapian::doccount | get_matches_lower_bound () const |
| void | finalise (std::vector< Result > &results, int percent_threshold) |
Private Attributes | |
| std::unordered_map< std::string, Xapian::doccount > | table |
| Map from collapse key values to collapse counts. More... | |
| Xapian::doccount | entry_count = 0 |
| How many items we're currently keeping in table. More... | |
| Xapian::doccount | no_collapse_key = 0 |
| How many documents have we seen without a collapse key? More... | |
| Xapian::doccount | dups_ignored = 0 |
| How many documents with duplicate collapse keys we have ignored. More... | |
| Xapian::doccount | docs_considered = 0 |
| How many documents we've considered for collapsing. More... | |
| Xapian::doccount | collapse_max |
| The maximum number of items to keep for each collapse key value. More... | |
Simpler version of Collapser used when merging MSet objects.
We merge results in descending rank order, so collapsing is much simpler than during the match - we just need to discard documents if we've already seen collapse_max with the same key.
Definition at line 260 of file collapser.h.
|
inline |
Definition at line 291 of file collapser.h.
|
inline |
Try to add a new key.
Definition at line 301 of file collapser.h.
References collapse_max, docs_considered, dups_ignored, entry_count, no_collapse_key, and table.
|
inline |
Definition at line 334 of file collapser.h.
References entry_count, and table.
|
inline |
Definition at line 324 of file collapser.h.
References docs_considered.
|
inline |
Definition at line 326 of file collapser.h.
References dups_ignored.
|
inline |
Definition at line 328 of file collapser.h.
References entry_count.
|
inline |
Definition at line 330 of file collapser.h.
References entry_count, and no_collapse_key.
|
inline |
Return true if collapsing is active for this match.
Definition at line 295 of file collapser.h.
References collapse_max.
|
private |
The maximum number of items to keep for each collapse key value.
Definition at line 288 of file collapser.h.
Referenced by add(), and operator bool().
|
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 285 of file collapser.h.
Referenced by add(), and get_docs_considered().
|
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 278 of file collapser.h.
Referenced by add(), and get_dups_ignored().
|
private |
How many items we're currently keeping in table.
Definition at line 265 of file collapser.h.
Referenced by add(), finalise(), get_entries(), and get_matches_lower_bound().
|
private |
How many documents have we seen without a collapse key?
We use this statistic to improve matches_lower_bound.
Definition at line 271 of file collapser.h.
Referenced by add(), and get_matches_lower_bound().
|
private |
Map from collapse key values to collapse counts.
Definition at line 262 of file collapser.h.
Referenced by add(), and finalise().