#include <leafpostlist.h>


Public Member Functions | |
| ~LeafPostList () | |
| void | set_termweight (const Xapian::Weight *weight_) |
| Set the weighting scheme to use during matching. | |
| virtual Xapian::doccount | get_termfreq () const =0 |
| Return the exact term frequency. | |
| Xapian::doccount | get_termfreq_min () const |
| Get a lower bound on the number of documents indexed by this term. | |
| Xapian::doccount | get_termfreq_max () const |
| Get an upper bound on the number of documents indexed by this term. | |
| Xapian::doccount | get_termfreq_est () const |
| Get an estimate of the number of documents indexed by this term. | |
| Xapian::weight | get_maxweight () const |
| Return an upper bound on what get_weight() can return. | |
| Xapian::weight | get_weight () const |
| Return the weight contribution for the current position. | |
| Xapian::weight | recalc_maxweight () |
| Recalculate the upper bound on what get_weight() can return. | |
| TermFreqs | get_termfreq_est_using_stats (const Xapian::Weight::Internal &stats) const |
| Get an estimate for the termfreq and reltermfreq, given the stats. | |
| Xapian::termcount | count_matching_subqs () const |
| Count the number of leaf subqueries which match at the current position. | |
Protected Member Functions | |
| LeafPostList (const std::string &term_) | |
| Only constructable as a base class for derived classes. | |
Protected Attributes | |
| const Xapian::Weight * | weight |
| bool | need_doclength |
| std::string | term |
| The term name for this postlist (empty for an alldocs postlist). | |
Private Member Functions | |
| void | operator= (const LeafPostList &) |
| Don't allow assignment. | |
| LeafPostList (const LeafPostList &) | |
| Don't allow copying. | |
This class provides the following features in addition to the PostList class:
Definition at line 38 of file leafpostlist.h.
| LeafPostList::LeafPostList | ( | const LeafPostList & | ) | [private] |
Don't allow copying.
| LeafPostList::LeafPostList | ( | const std::string & | term_ | ) | [inline, protected] |
Only constructable as a base class for derived classes.
Definition at line 54 of file leafpostlist.h.
| LeafPostList::~LeafPostList | ( | ) |
| Xapian::termcount LeafPostList::count_matching_subqs | ( | ) | const [virtual] |
Count the number of leaf subqueries which match at the current position.
Reimplemented from Xapian::PostingIterator::Internal.
Definition at line 101 of file leafpostlist.cc.
References weight.
| Xapian::weight LeafPostList::get_maxweight | ( | ) | const [virtual] |
Return an upper bound on what get_weight() can return.
Implements Xapian::PostingIterator::Internal.
Definition at line 65 of file leafpostlist.cc.
References Xapian::Weight::get_maxpart(), and weight.
Referenced by recalc_maxweight().
| virtual Xapian::doccount LeafPostList::get_termfreq | ( | ) | const [pure virtual] |
Return the exact term frequency.
Leaf postlists have an exact termfreq, which get_termfreq_min(), get_termfreq_max(), and get_termfreq_est() all report.
Implemented in BrassAllDocsPostList, BrassPostList, ChertAllDocsPostList, ChertModifiedPostList, ChertPostList, FlintAllDocsPostList, FlintModifiedPostList, FlintPostList, InMemoryPostList, InMemoryAllDocsPostList, NetworkPostList, and ContiguousAllDocsPostList.
Referenced by get_termfreq_est(), get_termfreq_max(), and get_termfreq_min().
| Xapian::doccount LeafPostList::get_termfreq_est | ( | ) | const [virtual] |
Get an estimate of the number of documents indexed by this term.
It should always be true that: get_termfreq_min() <= get_termfreq_est() <= get_termfreq_max()
Implements Xapian::PostingIterator::Internal.
Definition at line 50 of file leafpostlist.cc.
References get_termfreq().
| TermFreqs LeafPostList::get_termfreq_est_using_stats | ( | const Xapian::Weight::Internal & | stats | ) | const [virtual] |
Get an estimate for the termfreq and reltermfreq, given the stats.
The frequencies may be for a combination of databases, or for just the relevant documents, so the results need not lie in the bounds given by get_termfreq_min() and get_termfreq_max().
Reimplemented from Xapian::PostingIterator::Internal.
Definition at line 88 of file leafpostlist.cc.
References Assert, Xapian::Weight::Internal::collection_size, LOGCALL, RETURN, Xapian::Weight::Internal::rset_size, term, and Xapian::Weight::Internal::termfreqs.
| Xapian::doccount LeafPostList::get_termfreq_max | ( | ) | const [virtual] |
Get an upper bound on the number of documents indexed by this term.
Implements Xapian::PostingIterator::Internal.
Definition at line 44 of file leafpostlist.cc.
References get_termfreq().
| Xapian::doccount LeafPostList::get_termfreq_min | ( | ) | const [virtual] |
Get a lower bound on the number of documents indexed by this term.
Implements Xapian::PostingIterator::Internal.
Definition at line 38 of file leafpostlist.cc.
References get_termfreq().
| Xapian::weight LeafPostList::get_weight | ( | ) | const [virtual] |
Return the weight contribution for the current position.
Implements Xapian::PostingIterator::Internal.
Definition at line 71 of file leafpostlist.cc.
References Xapian::PostingIterator::Internal::get_doclength(), Xapian::Weight::get_sumpart(), Xapian::PostingIterator::Internal::get_wdf(), need_doclength, and weight.
| void LeafPostList::operator= | ( | const LeafPostList & | ) | [private] |
Don't allow assignment.
| Xapian::weight LeafPostList::recalc_maxweight | ( | ) | [virtual] |
Recalculate the upper bound on what get_weight() can return.
If the tree has pruned, get_maxweight() may use cached values. Calling this method instead forces a full recalculation.
Note that this method may be called after the postlist has reached the end. In this situation, the method should return 0.
Implements Xapian::PostingIterator::Internal.
Definition at line 82 of file leafpostlist.cc.
References get_maxweight().
| void LeafPostList::set_termweight | ( | const Xapian::Weight * | weight_ | ) |
Set the weighting scheme to use during matching.
If this isn't called, get_weight() and get_maxweight() will both return 0.
You should not call this more than once on a particular object.
| weight_ | The weighting object to use. Must not be NULL. |
Definition at line 56 of file leafpostlist.cc.
References Assert, Xapian::Weight::get_sumpart_needs_doclength_(), need_doclength, and weight.
Referenced by LocalSubMatch::postlist_from_op_leaf_query().
bool LeafPostList::need_doclength [protected] |
std::string LeafPostList::term [protected] |
The term name for this postlist (empty for an alldocs postlist).
Definition at line 51 of file leafpostlist.h.
Referenced by BrassPostList::BrassPostList(), ChertPostList::ChertPostList(), FlintPostList::FlintPostList(), NetworkPostList::get_description(), FlintPostList::get_description(), ChertPostList::get_description(), BrassPostList::get_description(), FlintModifiedPostList::get_termfreq(), ChertModifiedPostList::get_termfreq(), get_termfreq_est_using_stats(), FlintPostList::move_to_chunk_containing(), ChertPostList::move_to_chunk_containing(), BrassPostList::move_to_chunk_containing(), NetworkPostList::NetworkPostList(), FlintPostList::next_chunk(), ChertPostList::next_chunk(), BrassPostList::next_chunk(), NetworkPostList::open_position_list(), FlintPostList::open_position_list(), FlintModifiedPostList::open_position_list(), ChertPostList::open_position_list(), ChertModifiedPostList::open_position_list(), BrassPostList::open_position_list(), NetworkPostList::read_position_list(), FlintPostList::read_position_list(), FlintModifiedPostList::read_position_list(), ChertPostList::read_position_list(), ChertModifiedPostList::read_position_list(), and BrassPostList::read_position_list().
const Xapian::Weight* LeafPostList::weight [protected] |
Definition at line 46 of file leafpostlist.h.
Referenced by count_matching_subqs(), get_maxweight(), get_weight(), set_termweight(), and ~LeafPostList().