xapian-core  1.4.26
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
MultiTermList Class Reference

#include <multi_termlist.h>

+ Inheritance diagram for MultiTermList:
+ Collaboration diagram for MultiTermList:

Public Member Functions

Xapian::termcount get_approx_size () const
 Return approximate size of this termlist. More...
 
void accumulate_stats (Xapian::Internal::ExpandStats &stats) const
 Collate weighting information for the current term. More...
 
string get_termname () const
 Return the termname at the current position. 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...
 
TermListnext ()
 Advance the current position to the next term in the termlist. More...
 
TermListskip_to (const std::string &term)
 Skip forward to the specified term. More...
 
bool at_end () const
 Return true if the current position is past the last term in this list. More...
 
Xapian::termcount positionlist_count () const
 Return the length of the position list for the current position. More...
 
Xapian::PositionIterator positionlist_begin () const
 Return a PositionIterator for the current position. More...
 
 ~MultiTermList ()
 
- 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 const std::vector< Xapian::termpos > * get_vector_termpos () const
 Get pointer to vector<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

 MultiTermList (TermList *tl_, const Xapian::Database &db_, size_t db_index_)
 

Private Attributes

TermListtl
 
const Xapian::Databasedb
 
size_t db_index
 

Friends

class Xapian::Database
 

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...
 

Detailed Description

Definition at line 29 of file multi_termlist.h.

Constructor & Destructor Documentation

◆ MultiTermList()

MultiTermList::MultiTermList ( TermList tl_,
const Xapian::Database db_,
size_t  db_index_ 
)
private

Definition at line 31 of file multi_termlist.cc.

◆ ~MultiTermList()

MultiTermList::~MultiTermList ( )

Definition at line 38 of file multi_termlist.cc.

References tl.

Member Function Documentation

◆ accumulate_stats()

void MultiTermList::accumulate_stats ( Xapian::Internal::ExpandStats stats) const
virtual

Collate weighting information for the current term.

Reimplemented from Xapian::TermIterator::Internal.

Definition at line 50 of file multi_termlist.cc.

References Xapian::TermIterator::Internal::accumulate_stats(), and tl.

◆ at_end()

bool MultiTermList::at_end ( ) const
virtual

Return true if the current position is past the last term in this list.

Implements Xapian::TermIterator::Internal.

Definition at line 81 of file multi_termlist.cc.

References Xapian::TermIterator::Internal::at_end(), and tl.

◆ get_approx_size()

Xapian::termcount MultiTermList::get_approx_size ( ) const
virtual

Return approximate size of this termlist.

Implements Xapian::TermIterator::Internal.

Definition at line 44 of file multi_termlist.cc.

References Xapian::TermIterator::Internal::get_approx_size(), and tl.

◆ get_termfreq()

Xapian::doccount MultiTermList::get_termfreq ( ) const
virtual

Return the term frequency for the term at the current position.

Implements Xapian::TermIterator::Internal.

Definition at line 66 of file multi_termlist.cc.

References db, Xapian::Database::get_termfreq(), Xapian::TermIterator::Internal::get_termname(), and tl.

◆ get_termname()

string MultiTermList::get_termname ( ) const
virtual

Return the termname at the current position.

Implements Xapian::TermIterator::Internal.

Definition at line 56 of file multi_termlist.cc.

References Xapian::TermIterator::Internal::get_termname(), and tl.

◆ get_wdf()

Xapian::termcount MultiTermList::get_wdf ( ) const
virtual

Return the wdf for the term at the current position.

Implements Xapian::TermIterator::Internal.

Definition at line 61 of file multi_termlist.cc.

References Xapian::TermIterator::Internal::get_wdf(), and tl.

◆ next()

TermList * MultiTermList::next ( )
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.

Returns
If a non-NULL pointer is returned, then the caller should substitute the returned pointer for its pointer to us, and then delete us. This "pruning" can only happen for a non-leaf subclass of this class.

Implements Xapian::TermIterator::Internal.

Definition at line 71 of file multi_termlist.cc.

References Xapian::TermIterator::Internal::next(), and tl.

◆ positionlist_begin()

Xapian::PositionIterator MultiTermList::positionlist_begin ( ) const
virtual

Return a PositionIterator for the current position.

Implements Xapian::TermIterator::Internal.

Definition at line 93 of file multi_termlist.cc.

References Xapian::TermIterator::Internal::positionlist_begin(), and tl.

◆ positionlist_count()

Xapian::termcount MultiTermList::positionlist_count ( ) const
virtual

Return the length of the position list for the current position.

Implements Xapian::TermIterator::Internal.

Definition at line 87 of file multi_termlist.cc.

References Xapian::TermIterator::Internal::positionlist_count(), and tl.

◆ skip_to()

TermList * MultiTermList::skip_to ( const std::string &  term)
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 76 of file multi_termlist.cc.

References Xapian::TermIterator::Internal::skip_to(), and tl.

Friends And Related Function Documentation

◆ Xapian::Database

friend class Xapian::Database
friend

Definition at line 30 of file multi_termlist.h.

Member Data Documentation

◆ db

const Xapian::Database& MultiTermList::db
private

Definition at line 33 of file multi_termlist.h.

Referenced by get_termfreq().

◆ db_index

size_t MultiTermList::db_index
private

Definition at line 34 of file multi_termlist.h.

◆ tl

TermList* MultiTermList::tl
private

The documentation for this class was generated from the following files: