xapian-core  1.4.21
Public Member Functions | Private Member Functions | Private Attributes | List of all members
MultiAllTermsList Class Reference

Class for merging AllTermsList objects from subdatabases. More...

#include <multi_alltermslist.h>

+ Inheritance diagram for MultiAllTermsList:
+ Collaboration diagram for MultiAllTermsList:

Public Member Functions

 MultiAllTermsList (const std::vector< Xapian::Internal::intrusive_ptr< Xapian::Database::Internal > > &dbs, const std::string &prefix)
 Constructor. More...
 
 ~MultiAllTermsList ()
 Destructor. More...
 
std::string get_termname () const
 Return the termname 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...
 
- Public Member Functions inherited from AllTermsList
virtual Xapian::termcount get_approx_size () const
 Return approximate size of this termlist. More...
 
virtual Xapian::termcount get_wdf () const
 Return the wdf for the term at the current position. More...
 
virtual Xapian::termcount positionlist_count () const
 Return true if the current position is past the last term in this list. More...
 
virtual Xapian::PositionIterator 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...
 
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

void operator= (const MultiAllTermsList &)
 Don't allow assignment. More...
 
 MultiAllTermsList (const MultiAllTermsList &)
 Don't allow copying. More...
 

Private Attributes

std::string current_term
 Current termname (or empty if we haven't started yet). More...
 
std::vector< TermList * > termlists
 Vector of sub-termlists which we use as a heap. 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 AllTermsList
 AllTermsList ()
 Only constructable as a base class for derived classes. More...
 
- Protected Member Functions inherited from Xapian::TermIterator::Internal
 Internal ()
 Only constructable as a base class for derived classes. More...
 

Detailed Description

Class for merging AllTermsList objects from subdatabases.

Definition at line 32 of file multi_alltermslist.h.

Constructor & Destructor Documentation

◆ MultiAllTermsList() [1/2]

MultiAllTermsList::MultiAllTermsList ( const MultiAllTermsList )
private

Don't allow copying.

◆ MultiAllTermsList() [2/2]

MultiAllTermsList::MultiAllTermsList ( const std::vector< Xapian::Internal::intrusive_ptr< Xapian::Database::Internal > > &  dbs,
const std::string &  prefix 
)

Constructor.

Definition at line 46 of file multi_alltermslist.cc.

References AssertRel.

◆ ~MultiAllTermsList()

MultiAllTermsList::~MultiAllTermsList ( )

Destructor.

Definition at line 63 of file multi_alltermslist.cc.

Member Function Documentation

◆ at_end()

bool MultiAllTermsList::at_end ( ) const
virtual

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

Implements AllTermsList.

Definition at line 166 of file multi_alltermslist.cc.

◆ get_termfreq()

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

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

Implements AllTermsList.

Definition at line 75 of file multi_alltermslist.cc.

◆ get_termname()

string MultiAllTermsList::get_termname ( ) const
virtual

Return the termname at the current position.

Implements AllTermsList.

Definition at line 69 of file multi_alltermslist.cc.

◆ next()

TermList * MultiAllTermsList::next ( )
virtual

Advance the current position to the next term in the termlist.

Implements AllTermsList.

Definition at line 88 of file multi_alltermslist.cc.

References Xapian::TermIterator::Internal::at_end(), Xapian::TermIterator::Internal::get_termname(), and Xapian::TermIterator::Internal::next().

◆ operator=()

void MultiAllTermsList::operator= ( const MultiAllTermsList )
private

Don't allow assignment.

◆ skip_to()

TermList * MultiAllTermsList::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 term (or at_end() if no terms after term exist).

Implements AllTermsList.

Definition at line 136 of file multi_alltermslist.cc.

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

Member Data Documentation

◆ current_term

std::string MultiAllTermsList::current_term
private

Current termname (or empty if we haven't started yet).

Definition at line 40 of file multi_alltermslist.h.

◆ termlists

std::vector<TermList *> MultiAllTermsList::termlists
private

Vector of sub-termlists which we use as a heap.

Definition at line 43 of file multi_alltermslist.h.


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