#include <msetpostlist.h>
Inheritance diagram for MSetPostList:
Public Member Functions | |
MSetPostList (const Xapian::MSet mset, bool decreasing_relevance_) | |
Xapian::doccount | get_termfreq_min () const |
Get a lower 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::doccount | get_termfreq_max () const |
Get an upper bound on the number of documents indexed by this term. | |
Xapian::weight | get_maxweight () const |
Return an upper bound on what get_weight() can return. | |
Xapian::docid | get_docid () const |
Return the current docid. | |
Xapian::weight | get_weight () const |
Return the weight contribution for the current position. | |
const string * | get_collapse_key () const |
If the collapse key is already known, return it. | |
Xapian::doclength | get_doclength () const |
Not implemented for MSetPostList. | |
Xapian::weight | recalc_maxweight () |
Recalculate the upper bound on what get_weight() can return. | |
PostList * | next (Xapian::weight w_min) |
Advance the current position to the next document in the postlist. | |
PostList * | skip_to (Xapian::docid did, Xapian::weight w_min) |
Not meaningful for MSetPostList. | |
bool | at_end () const |
Return true if the current position is past the last entry in this list. | |
string | get_description () const |
Return a string description of this object. | |
Private Member Functions | |
void | operator= (const MSetPostList &) |
Don't allow assignment. | |
MSetPostList (const MSetPostList &) | |
Don't allow copying. | |
Private Attributes | |
int | cursor |
The MSet element that this PostList is pointing to. | |
Xapian::Internal::RefCntPtr< Xapian::MSet::Internal > | mset_internal |
The MSet::Internal object which we're returning entries from. | |
bool | decreasing_relevance |
Is the sort order such the relevance decreases down the MSet? |
This class is used with the remote backend. We perform a match on the remote server, then serialise the resulting MSet and pass it back to the client where we include it in the match by wrapping it in an MSetPostList.
Definition at line 35 of file msetpostlist.h.
MSetPostList::MSetPostList | ( | const MSetPostList & | ) | [private] |
Don't allow copying.
MSetPostList::MSetPostList | ( | const Xapian::MSet | mset, | |
bool | decreasing_relevance_ | |||
) | [inline] |
Definition at line 55 of file msetpostlist.h.
void MSetPostList::operator= | ( | const MSetPostList & | ) | [private] |
Don't allow assignment.
Xapian::doccount MSetPostList::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 28 of file msetpostlist.cc.
References DEBUGCALL, mset_internal, and RETURN.
Xapian::doccount MSetPostList::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 35 of file msetpostlist.cc.
References DEBUGCALL, mset_internal, and RETURN.
Xapian::doccount MSetPostList::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 42 of file msetpostlist.cc.
References DEBUGCALL, mset_internal, and RETURN.
Xapian::weight MSetPostList::get_maxweight | ( | ) | const [virtual] |
Return an upper bound on what get_weight() can return.
Implements Xapian::PostingIterator::Internal.
Definition at line 49 of file msetpostlist.cc.
References cursor, DEBUGCALL, decreasing_relevance, mset_internal, and RETURN.
Referenced by recalc_maxweight().
Xapian::docid MSetPostList::get_docid | ( | ) | const [virtual] |
Return the current docid.
Implements Xapian::PostingIterator::Internal.
Definition at line 65 of file msetpostlist.cc.
References Assert, cursor, DEBUGCALL, mset_internal, and RETURN.
Xapian::weight MSetPostList::get_weight | ( | ) | const [virtual] |
Return the weight contribution for the current position.
Implements Xapian::PostingIterator::Internal.
Definition at line 73 of file msetpostlist.cc.
References Assert, cursor, DEBUGCALL, mset_internal, and RETURN.
const string * MSetPostList::get_collapse_key | ( | ) | const [virtual] |
If the collapse key is already known, return it.
This is implemented by MSetPostList (and MergePostList). Other subclasses rely on the default implementation which just returns NULL.
Reimplemented from Xapian::PostingIterator::Internal.
Definition at line 81 of file msetpostlist.cc.
References Assert, cursor, DEBUGCALL, mset_internal, and RETURN.
Xapian::doclength MSetPostList::get_doclength | ( | ) | const [virtual] |
Not implemented for MSetPostList.
Implements Xapian::PostingIterator::Internal.
Definition at line 89 of file msetpostlist.cc.
Xapian::weight MSetPostList::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.
Implements Xapian::PostingIterator::Internal.
Definition at line 95 of file msetpostlist.cc.
References DEBUGCALL, get_maxweight(), and RETURN.
PostList * MSetPostList::next | ( | Xapian::weight | w_min | ) | [virtual] |
Advance the current position to the next document in the postlist.
The list starts before the first entry in the list, so next() must be called before any methods which need the context of the current position.
w_min | The minimum weight contribution that is needed (this is just a hint which PostList subclasses may ignore). |
Implements Xapian::PostingIterator::Internal.
Definition at line 102 of file msetpostlist.cc.
References Assert, at_end(), cursor, DEBUGCALL, decreasing_relevance, mset_internal, and RETURN.
PostList * MSetPostList::skip_to | ( | Xapian::docid | did, | |
Xapian::weight | w_min | |||
) | [virtual] |
Not meaningful for MSetPostList.
Implements Xapian::PostingIterator::Internal.
Definition at line 122 of file msetpostlist.cc.
bool MSetPostList::at_end | ( | ) | const [virtual] |
Return true if the current position is past the last entry in this list.
Implements Xapian::PostingIterator::Internal.
Definition at line 131 of file msetpostlist.cc.
References Assert, cursor, DEBUGCALL, mset_internal, and RETURN.
Referenced by next().
string MSetPostList::get_description | ( | ) | const [virtual] |
Return a string description of this object.
Implements Xapian::PostingIterator::Internal.
Definition at line 139 of file msetpostlist.cc.
References mset_internal.
int MSetPostList::cursor [private] |
The MSet element that this PostList is pointing to.
Definition at line 43 of file msetpostlist.h.
Referenced by at_end(), get_collapse_key(), get_docid(), get_maxweight(), get_weight(), and next().
The MSet::Internal object which we're returning entries from.
Definition at line 46 of file msetpostlist.h.
Referenced by at_end(), get_collapse_key(), get_description(), get_docid(), get_maxweight(), get_termfreq_est(), get_termfreq_max(), get_termfreq_min(), get_weight(), and next().
bool MSetPostList::decreasing_relevance [private] |
Is the sort order such the relevance decreases down the MSet?
This is true for sort_by_relevance and sort_by_relevance_then_value.
Definition at line 52 of file msetpostlist.h.
Referenced by get_maxweight(), and next().