|
xapian-core
2.1.0
|
#include <postlisttree.h>
Collaboration diagram for PostListTree:Public Member Functions | |
| PostListTree (ValueStreamDocument &vsdoc_, Xapian::Database &db_, const Xapian::Weight &wtscheme) | |
| void | delete_postlists () |
| Delete all the PostList objects. More... | |
| ~PostListTree () | |
| bool * | get_max_weight_cached_flag_ptr () |
| Return pointer to flag to set to false to invalidate cached max weight. More... | |
| double | set_postlists (PostList **pls, Xapian::doccount n_shards_) |
| double | recalc_maxweight () |
| void | force_recalc () |
| Xapian::docid | get_docid () const |
| Xapian::termcount | get_doclength (Xapian::docid shard_did) const |
| double | get_weight () const |
| bool | next (double w_min) |
| Return false if we're done. More... | |
| void | get_doc_stats (Xapian::docid shard_did, Xapian::termcount &doclen, Xapian::termcount &unique_terms, Xapian::termcount &wdfdocmax) const |
| Xapian::termcount | count_matching_subqs () const |
| std::string | get_description () const |
Private Attributes | |
| PostList * | pl = NULL |
| bool | use_cached_max_weight = false |
| bool | need_doclength |
| bool | need_unique_terms |
| bool | need_wdfdocmax |
| double | max_weight |
| Xapian::doccount | current_shard = 0 |
| The current shard. More... | |
| PostList ** | shard_pls = nullptr |
| The postlists for the shards. More... | |
| double * | max_after = nullptr |
| The maximum weight any shards after each index could return. More... | |
| Xapian::doccount | n_shards = 0 |
| The number of shards. More... | |
| ValueStreamDocument & | vsdoc |
| Document proxy used for valuestream caching. More... | |
| Xapian::Database & | db |
| Xapian::Database::Internal * | shard_db = nullptr |
Definition at line 28 of file postlisttree.h.
|
inline |
Definition at line 80 of file postlisttree.h.
|
inline |
Definition at line 99 of file postlisttree.h.
References delete_postlists().
|
inline |
Definition at line 231 of file postlisttree.h.
References Xapian::Internal::PostList::count_matching_subqs(), and pl.
Referenced by ProtoMSet::update_max_weight().
|
inline |
Delete all the PostList objects.
Definition at line 90 of file postlisttree.h.
References max_after, n_shards, and shard_pls.
Referenced by Matcher::get_local_mset(), and ~PostListTree().
|
inline |
Definition at line 154 of file postlisttree.h.
References use_cached_max_weight.
Referenced by OrPostList::check(), AndPostList::check_helper(), OrPostList::decay_to_and(), OrPostList::decay_to_andmaybe(), MaxPostList::erase_sublist(), XorPostList::erase_sublist(), OrPostList::next(), AndPostList::next_helper(), OrPostList::skip_to(), and AndPostList::skip_to_helper().
|
inline |
Definition at line 235 of file postlisttree.h.
References current_shard, Xapian::Internal::PostList::get_description(), n_shards, and shard_pls.
|
inline |
Definition at line 215 of file postlisttree.h.
References Xapian::Database::Internal::get_doclength(), Xapian::Database::Internal::get_unique_terms(), Xapian::Database::Internal::get_wdfdocmax(), need_doclength, need_unique_terms, need_wdfdocmax, and shard_db.
Referenced by get_weight(), and SelectPostList::vet().
|
inline |
Definition at line 158 of file postlisttree.h.
References current_shard, Xapian::Internal::PostList::get_docid(), n_shards, pl, and unshard().
Referenced by Matcher::get_local_mset().
|
inline |
Definition at line 162 of file postlisttree.h.
References Xapian::Database::Internal::get_doclength(), and shard_db.
|
inline |
Return pointer to flag to set to false to invalidate cached max weight.
Used with ExternalPostList, which wraps a PostingSource object.
Definition at line 107 of file postlisttree.h.
References use_cached_max_weight.
Referenced by Xapian::Internal::QueryPostingSource::postlist().
|
inline |
Definition at line 166 of file postlisttree.h.
References get_doc_stats(), Xapian::Internal::PostList::get_docid(), Xapian::Internal::PostList::get_weight(), and pl.
Referenced by ProtoMSet::early_reject(), and Matcher::get_local_mset().
|
inline |
Return false if we're done.
Definition at line 173 of file postlisttree.h.
References Xapian::Internal::PostList::at_end(), current_shard, db, Xapian::Internal::intrusive_ptr_nonnull< T >::get(), Xapian::Database::internal, n_shards, ValueStreamDocument::new_shard(), Xapian::Internal::PostList::next(), pl, rare, recalc_maxweight(), shard_db, shard_pls, use_cached_max_weight, usual, and vsdoc.
Referenced by Matcher::get_local_mset().
|
inline |
Definition at line 138 of file postlisttree.h.
References current_shard, max_after, max_weight, Xapian::Internal::PostList::recalc_maxweight(), shard_pls, and use_cached_max_weight.
Referenced by next(), and set_postlists().
|
inline |
Definition at line 109 of file postlisttree.h.
References Assert, current_shard, db, Xapian::Internal::intrusive_ptr_nonnull< T >::get(), Xapian::Database::internal, max_after, max_weight, n_shards, ValueStreamDocument::new_shard(), pl, recalc_maxweight(), shard_db, shard_pls, use_cached_max_weight, and vsdoc.
Referenced by Matcher::get_local_mset().
|
private |
The current shard.
Definition at line 42 of file postlisttree.h.
Referenced by get_description(), get_docid(), next(), recalc_maxweight(), and set_postlists().
|
private |
Definition at line 75 of file postlisttree.h.
Referenced by next(), and set_postlists().
|
private |
The maximum weight any shards after each index could return.
For each shard, this gives the maximum weight out of all the shards after the current one. So for the last shard this will be zero.
For each match, this is calculated once early on by set_postlists() and then doesn't change.
We use this information in recalc_maxweight() to avoid needing to iterate over all the remaining shards.
Definition at line 63 of file postlisttree.h.
Referenced by delete_postlists(), recalc_maxweight(), and set_postlists().
|
private |
Definition at line 39 of file postlisttree.h.
Referenced by recalc_maxweight(), and set_postlists().
|
private |
The number of shards.
Definition at line 66 of file postlisttree.h.
Referenced by delete_postlists(), get_description(), get_docid(), next(), and set_postlists().
|
private |
Definition at line 33 of file postlisttree.h.
Referenced by get_doc_stats().
|
private |
Definition at line 35 of file postlisttree.h.
Referenced by get_doc_stats().
|
private |
Definition at line 37 of file postlisttree.h.
Referenced by get_doc_stats().
|
private |
Definition at line 29 of file postlisttree.h.
Referenced by count_matching_subqs(), get_docid(), get_weight(), next(), and set_postlists().
|
private |
Definition at line 77 of file postlisttree.h.
Referenced by get_doc_stats(), get_doclength(), next(), and set_postlists().
|
private |
The postlists for the shards.
Entries corresponding to remote shards will be nullptr - the results from remote shards are included by merging MSet objects, rather than via the PostList tree.
Definition at line 50 of file postlisttree.h.
Referenced by delete_postlists(), get_description(), next(), recalc_maxweight(), and set_postlists().
|
private |
Definition at line 31 of file postlisttree.h.
Referenced by force_recalc(), get_max_weight_cached_flag_ptr(), next(), recalc_maxweight(), and set_postlists().
|
private |
Document proxy used for valuestream caching.
Each time we move to a new shard we must notify this object so it can invalidate any cached valuestreams (which are specific to the shard).
Definition at line 73 of file postlisttree.h.
Referenced by next(), and set_postlists().