|
xapian-core
2.0.0
|
Class for merging PostList objects from subdatabases. More...
#include <multi_postlist.h>
Inheritance diagram for MultiPostList:
Collaboration diagram for MultiPostList:Public Member Functions | |
| MultiPostList (Xapian::doccount n_shards_, PostList **postlists_) | |
| Constructor. More... | |
| ~MultiPostList () | |
| Destructor. More... | |
| Xapian::docid | get_docid () const |
| Return the current docid. More... | |
| Xapian::termcount | get_wdf () const |
| Return the wdf for the document at the current position. More... | |
| double | get_weight (Xapian::termcount doclen, Xapian::termcount unique_terms, Xapian::termcount wdfdocmax) const |
| Return the weight contribution for the current position. More... | |
| bool | at_end () const |
| Return true if the current position is past the last entry in this list. More... | |
| double | recalc_maxweight () |
| Recalculate the upper bound on what get_weight() can return. More... | |
| PositionList * | open_position_list () const |
| Read the position list for the term in the current document and. More... | |
| PostList * | next (double w_min) |
| Advance the current position to the next document in the postlist. More... | |
| PostList * | skip_to (Xapian::docid, double w_min) |
| Skip forward to the specified docid. More... | |
| std::string | get_description () const |
| Return a string description of this object. More... | |
Public Member Functions inherited from Xapian::Internal::PostList | |
| virtual | ~PostList () |
| We have virtual methods and want to be able to delete derived classes using a pointer to the base class, so we need a virtual destructor. More... | |
| Xapian::doccount | get_termfreq () const |
| Get an estimate of the number of documents this PostList will return. More... | |
| virtual PositionList * | read_position_list () |
| Read the position list for the term in the current document and return a pointer to it (owned by the PostList). More... | |
| virtual PostList * | check (Xapian::docid did, double w_min, bool &valid) |
| Check if the specified docid occurs in this postlist. More... | |
| PostList * | next () |
| Advance the current position to the next document in the postlist. More... | |
| PostList * | skip_to (Xapian::docid did) |
| Skip forward to the specified docid. More... | |
| virtual Xapian::termcount | count_matching_subqs () const |
| Count the number of leaf subqueries which match at the current position. More... | |
| virtual void | gather_position_lists (OrPositionList *orposlist) |
| Gather PositionList* objects for a subtree. More... | |
| virtual void | get_docid_range (docid &first, docid &last) const |
| Get the bounds on the range of docids this PostList can return. More... | |
Private Member Functions | |
| void | operator= (const MultiPostList &)=delete |
| Don't allow assignment. More... | |
| MultiPostList (const MultiPostList &)=delete | |
| Don't allow copying. More... | |
Private Attributes | |
| Xapian::doccount | n_shards |
| Number of PostList* entries in postlists. More... | |
| PostList ** | postlists |
| Sub-postlists which we use as a heap. More... | |
| Xapian::doccount | docids_size = 0 |
| Number of entries in docids;. More... | |
| Xapian::docid * | docids = nullptr |
| Heap of docids from the current positions of the postlists. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from Xapian::Internal::PostList | |
| PostList () | |
| Only constructable as a base class for derived classes. More... | |
Protected Attributes inherited from Xapian::Internal::PostList | |
| Xapian::doccount | termfreq |
| Estimate of the number of documents this PostList will return. More... | |
Class for merging PostList objects from subdatabases.
Definition at line 31 of file multi_postlist.h.
|
privatedelete |
Don't allow copying.
|
inline |
Constructor.
Definition at line 52 of file multi_postlist.h.
References docids, Xapian::Internal::PostList::get_termfreq(), n_shards, postlists, and Xapian::Internal::PostList::termfreq.
| MultiPostList::~MultiPostList | ( | ) |
Destructor.
Definition at line 35 of file multi_postlist.cc.
|
virtual |
Return true if the current position is past the last entry in this list.
Implements Xapian::Internal::PostList.
Definition at line 67 of file multi_postlist.cc.
|
virtual |
Return a string description of this object.
Implements Xapian::Internal::PostList.
Definition at line 183 of file multi_postlist.cc.
|
virtual |
Return the current docid.
Implements Xapian::Internal::PostList.
Definition at line 44 of file multi_postlist.cc.
|
virtual |
Return the wdf for the document at the current position.
Reimplemented from Xapian::Internal::PostList.
Definition at line 50 of file multi_postlist.cc.
References shard_number().
|
virtual |
Return the weight contribution for the current position.
Implements Xapian::Internal::PostList.
Definition at line 56 of file multi_postlist.cc.
References Assert.
|
virtual |
Advance the current position to the next document in the postlist.
The list starts before the first entry in the list, so next(), skip_to() or check() 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::Internal::PostList.
Definition at line 88 of file multi_postlist.cc.
References Xapian::Internal::PostList::at_end(), Xapian::Internal::PostList::get_docid(), Heap::make(), Xapian::Internal::PostList::next(), Heap::pop(), Heap::replace(), shard_number(), and unshard().
|
virtual |
Read the position list for the term in the current document and.
Reimplemented from Xapian::Internal::PostList.
Definition at line 82 of file multi_postlist.cc.
References shard_number().
|
privatedelete |
Don't allow assignment.
|
virtual |
Recalculate the upper bound on what get_weight() can return.
Implements Xapian::Internal::PostList.
Definition at line 73 of file multi_postlist.cc.
References Assert.
|
virtual |
Skip forward to the specified docid.
If the specified docid isn't in the list, position ourselves on the first document after it (or at_end() if no greater docids are present).
| w_min | The minimum weight contribution that is needed (this is just a hint which PostList subclasses may ignore). |
Implements Xapian::Internal::PostList.
Definition at line 130 of file multi_postlist.cc.
References Xapian::Internal::PostList::at_end(), Xapian::Internal::PostList::get_docid(), Heap::make(), Xapian::Internal::PostList::next(), shard_docid(), shard_number(), Xapian::Internal::PostList::skip_to(), and unshard().
|
private |
Heap of docids from the current positions of the postlists.
Definition at line 48 of file multi_postlist.h.
Referenced by MultiPostList().
|
private |
Number of entries in docids;.
Definition at line 45 of file multi_postlist.h.
|
private |
Number of PostList* entries in postlists.
Definition at line 39 of file multi_postlist.h.
Referenced by MultiPostList().
|
private |
Sub-postlists which we use as a heap.
Definition at line 42 of file multi_postlist.h.
Referenced by MultiPostList().