|
xapian-core
2.0.0
|
Adapter class for a TermList in a multidatabase. More...
#include <multi_termlist.h>
Inheritance diagram for MultiTermList:
Collaboration diagram for MultiTermList:Public Member Functions | |
| MultiTermList (const Xapian::Database::Internal *db_, TermList *real_termlist_) | |
| Constructor. More... | |
| ~MultiTermList () | |
| Destructor. More... | |
| Xapian::termcount | get_approx_size () const |
| Return approximate size of this termlist. More... | |
| Xapian::termcount | get_wdf () const |
| Return the wdf for the term at the current position. More... | |
| Xapian::doccount | get_termfreq () const |
| Return the term frequency for the term at the current position. More... | |
| Internal * | next () |
| Advance the current position to the next term in the termlist. More... | |
| Internal * | skip_to (std::string_view term) |
| Skip forward to the specified term. More... | |
| Xapian::termcount | positionlist_count () const |
| Return the length of the position list for the current position. More... | |
| PositionList * | positionlist_begin () const |
| Return a PositionIterator for the current position. More... | |
Public Member Functions inherited from Xapian::TermIterator::Internal | |
| virtual | ~Internal () |
| 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... | |
| virtual void | accumulate_stats (Xapian::Internal::ExpandStats &stats) const |
| Collate weighting information for the current term. More... | |
| const std::string & | get_termname () const |
| Return the termname at the current position. More... | |
| virtual const Xapian::VecCOW< Xapian::termpos > * | get_vec_termpos () const |
| Get pointer to VecCOW<termpos> if that's the internal representation. More... | |
Public Member Functions inherited from Xapian::Internal::intrusive_base | |
| intrusive_base () | |
| Construct with no references. More... | |
Private Member Functions | |
| void | operator= (const MultiTermList &)=delete |
| Don't allow assignment. More... | |
| MultiTermList (const MultiTermList &)=delete | |
| Don't allow copying. More... | |
Private Attributes | |
| TermList * | real_termlist |
| The TermList in the subdatabase. More... | |
| intrusive_ptr_nonnull< const Xapian::Database::Internal > | db |
| The multidatabase. More... | |
Additional Inherited Members | |
Public Attributes inherited from Xapian::TermIterator::Internal | |
| size_t | shard_index = 0 |
| Which shard of a multidatabase this is from. More... | |
Public Attributes inherited from Xapian::Internal::intrusive_base | |
| unsigned | _refs |
| Reference count. More... | |
Protected Member Functions inherited from Xapian::TermIterator::Internal | |
| Internal () | |
| Only constructable as a base class for derived classes. More... | |
Protected Attributes inherited from Xapian::TermIterator::Internal | |
| std::string | current_term |
| The current term. More... | |
Adapter class for a TermList in a multidatabase.
Most methods just forward to real_termlist, but get_termfreq() fetches the combined term frequency from the multidatabase.
Definition at line 35 of file multi_termlist.h.
|
privatedelete |
Don't allow copying.
| MultiTermList::MultiTermList | ( | const Xapian::Database::Internal * | db_, |
| TermList * | real_termlist_ | ||
| ) |
Constructor.
Definition at line 33 of file multi_termlist.cc.
| MultiTermList::~MultiTermList | ( | ) |
|
virtual |
Return approximate size of this termlist.
Implements Xapian::TermIterator::Internal.
Definition at line 45 of file multi_termlist.cc.
References Xapian::TermIterator::Internal::get_approx_size(), and real_termlist.
|
virtual |
Return the term frequency for the term at the current position.
Implements Xapian::TermIterator::Internal.
Definition at line 57 of file multi_termlist.cc.
References db, Xapian::Database::Internal::get_freqs(), Xapian::TermIterator::Internal::get_termname(), and real_termlist.
|
virtual |
Return the wdf for the term at the current position.
Implements Xapian::TermIterator::Internal.
Definition at line 51 of file multi_termlist.cc.
References Xapian::TermIterator::Internal::get_wdf(), and real_termlist.
|
virtual |
Advance the current position to the next term in the termlist.
The list starts before the first term in the list, so next(), skip_to() or check() must be called before any methods which need the context of the current position.
Implements Xapian::TermIterator::Internal.
Definition at line 65 of file multi_termlist.cc.
References Assert, Xapian::TermIterator::Internal::current_term, Xapian::TermIterator::Internal::get_termname(), Xapian::TermIterator::Internal::next(), and real_termlist.
|
privatedelete |
Don't allow assignment.
|
virtual |
Return a PositionIterator for the current position.
Implements Xapian::TermIterator::Internal.
Definition at line 97 of file multi_termlist.cc.
References Xapian::TermIterator::Internal::positionlist_begin(), and real_termlist.
|
virtual |
Return the length of the position list for the current position.
Implements Xapian::TermIterator::Internal.
Definition at line 91 of file multi_termlist.cc.
References Xapian::TermIterator::Internal::positionlist_count(), and real_termlist.
|
virtual |
Skip forward to the specified term.
If the specified term isn't in the list, position ourselves on the first term after tname (or at_end() if no terms after tname exist).
Implements Xapian::TermIterator::Internal.
Definition at line 78 of file multi_termlist.cc.
References Assert, Xapian::TermIterator::Internal::current_term, Xapian::TermIterator::Internal::get_termname(), real_termlist, Xapian::TermIterator::Internal::skip_to(), and term.
|
private |
|
private |
The TermList in the subdatabase.
Definition at line 43 of file multi_termlist.h.
Referenced by get_approx_size(), get_termfreq(), get_wdf(), next(), positionlist_begin(), positionlist_count(), skip_to(), and ~MultiTermList().