xapian-core  2.0.0
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 (size_t count_, TermList **termlists_)
 Constructor. More...
 
 ~MultiAllTermsList ()
 Destructor. More...
 
Xapian::termcount get_approx_size () const
 Return approximate size of this termlist. 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 (std::string_view term)
 Skip forward to the specified term. More...
 
- Public Member Functions inherited from AllTermsList
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 PositionListpositionlist_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 MultiAllTermsList &)
 Don't allow assignment. More...
 
 MultiAllTermsList (const MultiAllTermsList &)
 Don't allow copying. More...
 

Private Attributes

Xapian::doccount current_termfreq
 Current termfreq (or 0 if not yet calculated). More...
 
size_t count
 Number of TermList* entries in termlists. More...
 
TermList ** termlists
 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...
 
- Protected Attributes inherited from Xapian::TermIterator::Internal
std::string current_term
 The current term. More...
 

Detailed Description

Class for merging AllTermsList objects from subdatabases.

Definition at line 33 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 ( size_t  count_,
TermList **  termlists_ 
)

Constructor.

Definition at line 41 of file multi_alltermslist.cc.

◆ ~MultiAllTermsList()

MultiAllTermsList::~MultiAllTermsList ( )

Destructor.

Definition at line 46 of file multi_alltermslist.cc.

References count, and termlists.

Member Function Documentation

◆ get_approx_size()

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

Return approximate size of this termlist.

Implements AllTermsList.

Definition at line 54 of file multi_alltermslist.cc.

References Assert.

◆ get_termfreq()

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

◆ next()

TermList * MultiAllTermsList::next ( )
virtual

◆ operator=()

void MultiAllTermsList::operator= ( const MultiAllTermsList )
private

Don't allow assignment.

◆ skip_to()

TermList * MultiAllTermsList::skip_to ( std::string_view  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 140 of file multi_alltermslist.cc.

References count, Xapian::TermIterator::Internal::current_term, current_termfreq, Xapian::TermIterator::Internal::get_termname(), Heap::make(), term, and termlists.

Member Data Documentation

◆ count

size_t MultiAllTermsList::count
mutableprivate

Number of TermList* entries in termlists.

Definition at line 50 of file multi_alltermslist.h.

Referenced by get_termfreq(), next(), skip_to(), and ~MultiAllTermsList().

◆ current_termfreq

Xapian::doccount MultiAllTermsList::current_termfreq
mutableprivate

Current termfreq (or 0 if not yet calculated).

Definition at line 47 of file multi_alltermslist.h.

Referenced by get_termfreq(), next(), and skip_to().

◆ termlists

TermList** MultiAllTermsList::termlists
private

Sub-termlists which we use as a heap.

Definition at line 53 of file multi_alltermslist.h.

Referenced by get_termfreq(), next(), skip_to(), and ~MultiAllTermsList().


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