#include <msetpostlist.h>


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::termcount | 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.
| 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 136 of file msetpostlist.cc.
References Assert, cursor, LOGCALL, mset_internal, and RETURN.
Referenced by get_maxweight(), and next().
| 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 86 of file msetpostlist.cc.
References Assert, cursor, LOGCALL, mset_internal, and RETURN.
| string MSetPostList::get_description | ( | ) | const [virtual] |
Return a string description of this object.
Implements Xapian::PostingIterator::Internal.
Definition at line 144 of file msetpostlist.cc.
References mset_internal.
| Xapian::docid MSetPostList::get_docid | ( | ) | const [virtual] |
Return the current docid.
Implements Xapian::PostingIterator::Internal.
Definition at line 70 of file msetpostlist.cc.
References Assert, cursor, LOGCALL, mset_internal, and RETURN.
| Xapian::termcount MSetPostList::get_doclength | ( | ) | const [virtual] |
Not implemented for MSetPostList.
Implements Xapian::PostingIterator::Internal.
Definition at line 94 of file msetpostlist.cc.
| Xapian::weight MSetPostList::get_maxweight | ( | ) | const [virtual] |
Return an upper bound on what get_weight() can return.
Implements Xapian::PostingIterator::Internal.
Definition at line 50 of file msetpostlist.cc.
References at_end(), cursor, decreasing_relevance, LOGCALL, mset_internal, and RETURN.
Referenced by recalc_maxweight().
| 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 36 of file msetpostlist.cc.
References LOGCALL, 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 43 of file msetpostlist.cc.
References LOGCALL, mset_internal, and RETURN.
| 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 29 of file msetpostlist.cc.
References LOGCALL, 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 78 of file msetpostlist.cc.
References Assert, cursor, LOGCALL, mset_internal, 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 107 of file msetpostlist.cc.
References Assert, at_end(), cursor, decreasing_relevance, LOGCALL, mset_internal, and RETURN.
| void MSetPostList::operator= | ( | const MSetPostList & | ) | [private] |
Don't allow assignment.
| 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.
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 100 of file msetpostlist.cc.
References get_maxweight(), LOGCALL, 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 127 of file msetpostlist.cc.
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().
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().
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().