BranchPostList Class Reference

Base class for postlists which are generated by merging two sub-postlists. More...

#include <branchpostlist.h>

Inheritance diagram for BranchPostList:

Inheritance graph
[legend]
Collaboration diagram for BranchPostList:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 BranchPostList (PostList *l_, PostList *r_, MultiMatch *matcher_)
virtual ~BranchPostList ()
virtual Xapian::termcount get_wdf () const
 get_wdf() for branch postlists returns the sum of the wdfs of the sub postlists.

Protected Member Functions

void handle_prune (PostList *&kid, PostList *ret)
 Utility method, to call recalc_maxweight() and do the pruning if a next() or skip_to() returns non-NULL result.

Protected Attributes

PostListl
 Left sub-postlist.
PostListr
 Right sub-postlist.
MultiMatchmatcher
 The object which is using this postlist to perform a match.

Private Member Functions

 BranchPostList (const BranchPostList &)
BranchPostListoperator= (const BranchPostList &)

Detailed Description

Base class for postlists which are generated by merging two sub-postlists.

These postlists form a tree which is used to perform a sum over all the terms in the query for each document, in order to calculate the score for that document.

Definition at line 37 of file branchpostlist.h.


Constructor & Destructor Documentation

BranchPostList::BranchPostList ( const BranchPostList  )  [private]

BranchPostList::BranchPostList ( PostList l_,
PostList r_,
MultiMatch matcher_ 
) [inline]

Definition at line 71 of file branchpostlist.h.

BranchPostList::~BranchPostList (  )  [virtual]

Definition at line 27 of file branchpostlist.cc.

References l, and r.


Member Function Documentation

BranchPostList& BranchPostList::operator= ( const BranchPostList  )  [private]

void BranchPostList::handle_prune ( PostList *&  kid,
PostList ret 
) [inline, protected]

Utility method, to call recalc_maxweight() and do the pruning if a next() or skip_to() returns non-NULL result.

Definition at line 60 of file branchpostlist.h.

References matcher, and MultiMatch::recalc_maxweight().

Referenced by AndNotPostList::advance_to_next_match(), AndPostList::process_next_or_skip_to(), and AndMaybePostList::process_next_or_skip_to().

Xapian::termcount BranchPostList::get_wdf (  )  const [virtual]

get_wdf() for branch postlists returns the sum of the wdfs of the sub postlists.

The wdf isn't really meaningful in many situations, but if the lists are being combined as a synonym we want the sum of the wdfs, so we do that in general.

Reimplemented from Xapian::PostingIterator::Internal.

Definition at line 34 of file branchpostlist.cc.

References Xapian::PostingIterator::Internal::get_wdf(), l, and r.


Member Data Documentation

PostList* BranchPostList::l [protected]

Left sub-postlist.

Definition at line 45 of file branchpostlist.h.

Referenced by XorPostList::advance_to_next_match(), AndNotPostList::advance_to_next_match(), AndMaybePostList::AndMaybePostList(), AndPostList::AndPostList(), OrPostList::at_end(), XorPostList::get_description(), OrPostList::get_description(), AndPostList::get_description(), AndNotPostList::get_description(), AndMaybePostList::get_description(), XorPostList::get_doclength(), OrPostList::get_doclength(), AndPostList::get_doclength(), AndNotPostList::get_doclength(), AndMaybePostList::get_doclength(), AndNotPostList::get_maxweight(), XorPostList::get_termfreq_est(), OrPostList::get_termfreq_est(), AndPostList::get_termfreq_est(), AndNotPostList::get_termfreq_est(), AndMaybePostList::get_termfreq_est(), XorPostList::get_termfreq_max(), OrPostList::get_termfreq_max(), AndPostList::get_termfreq_max(), AndNotPostList::get_termfreq_max(), AndMaybePostList::get_termfreq_max(), XorPostList::get_termfreq_min(), OrPostList::get_termfreq_min(), AndPostList::get_termfreq_min(), AndNotPostList::get_termfreq_min(), AndMaybePostList::get_termfreq_min(), get_wdf(), XorPostList::get_weight(), OrPostList::get_weight(), AndPostList::get_weight(), AndNotPostList::get_weight(), AndMaybePostList::get_weight(), XorPostList::next(), OrPostList::next(), AndNotPostList::next(), AndMaybePostList::next(), AndPostList::process_next_or_skip_to(), AndMaybePostList::process_next_or_skip_to(), XorPostList::recalc_maxweight(), OrPostList::recalc_maxweight(), AndPostList::recalc_maxweight(), AndNotPostList::recalc_maxweight(), AndMaybePostList::recalc_maxweight(), XorPostList::skip_to(), OrPostList::skip_to(), AndNotPostList::skip_to(), AndMaybePostList::skip_to(), and ~BranchPostList().

PostList* BranchPostList::r [protected]

Right sub-postlist.

Definition at line 48 of file branchpostlist.h.

Referenced by XorPostList::advance_to_next_match(), AndNotPostList::advance_to_next_match(), AndMaybePostList::AndMaybePostList(), AndPostList::AndPostList(), OrPostList::at_end(), XorPostList::get_description(), OrPostList::get_description(), AndPostList::get_description(), AndNotPostList::get_description(), AndMaybePostList::get_description(), XorPostList::get_doclength(), OrPostList::get_doclength(), AndPostList::get_doclength(), AndMaybePostList::get_doclength(), XorPostList::get_termfreq_est(), OrPostList::get_termfreq_est(), AndPostList::get_termfreq_est(), AndNotPostList::get_termfreq_est(), XorPostList::get_termfreq_max(), OrPostList::get_termfreq_max(), AndPostList::get_termfreq_max(), XorPostList::get_termfreq_min(), OrPostList::get_termfreq_min(), AndPostList::get_termfreq_min(), AndNotPostList::get_termfreq_min(), get_wdf(), XorPostList::get_weight(), OrPostList::get_weight(), AndPostList::get_weight(), AndMaybePostList::get_weight(), XorPostList::next(), OrPostList::next(), AndPostList::next(), AndMaybePostList::next(), AndPostList::process_next_or_skip_to(), AndMaybePostList::process_next_or_skip_to(), XorPostList::recalc_maxweight(), OrPostList::recalc_maxweight(), AndPostList::recalc_maxweight(), AndMaybePostList::recalc_maxweight(), XorPostList::skip_to(), OrPostList::skip_to(), AndPostList::skip_to(), AndMaybePostList::skip_to(), and ~BranchPostList().

MultiMatch* BranchPostList::matcher [protected]

The object which is using this postlist to perform a match.

This object needs to be notified when the tree changes such that the maximum weights need to be recalculated.

Definition at line 55 of file branchpostlist.h.

Referenced by XorPostList::advance_to_next_match(), AndNotPostList::advance_to_next_match(), handle_prune(), XorPostList::next(), OrPostList::next(), AndMaybePostList::next(), AndPostList::process_next_or_skip_to(), AndMaybePostList::process_next_or_skip_to(), XorPostList::skip_to(), OrPostList::skip_to(), and AndMaybePostList::skip_to().


The documentation for this class was generated from the following files:
Documentation for Xapian (version 1.0.10).
Generated on 24 Dec 2008 by Doxygen 1.5.2.