xapian-core  1.4.25
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ChertAllTermsList Class Reference

#include <chert_alltermslist.h>

+ Inheritance diagram for ChertAllTermsList:
+ Collaboration diagram for ChertAllTermsList:

Public Member Functions

 ChertAllTermsList (Xapian::Internal::intrusive_ptr< const ChertDatabase > database_, const std::string &prefix_)
 
 ~ChertAllTermsList ()
 Destructor. More...
 
std::string get_termname () const
 Returns the current termname. More...
 
Xapian::doccount get_termfreq () const
 Returns the term frequency of the current term. More...
 
TermListnext ()
 Advance to the next term in the list. More...
 
TermListskip_to (const std::string &tname)
 Advance to the first term which is >= tname. More...
 
bool at_end () const
 True if we're off the end of the 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

 ChertAllTermsList (const ChertAllTermsList &)
 Copying is not allowed. More...
 
void operator= (const ChertAllTermsList &)
 Assignment is not allowed. More...
 
void read_termfreq () const
 Read and cache the term frequency. More...
 

Private Attributes

Xapian::Internal::intrusive_ptr< const ChertDatabasedatabase
 Keep a reference to our database to stop it being deleted. More...
 
ChertCursorcursor
 A cursor which runs through the postlist table reading termnames from the keys. More...
 
std::string current_term
 The termname at the current position. More...
 
std::string prefix
 The prefix to restrict the terms to. More...
 
Xapian::doccount termfreq
 The term frequency of the term at the current position. 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

Definition at line 31 of file chert_alltermslist.h.

Constructor & Destructor Documentation

◆ ChertAllTermsList() [1/2]

ChertAllTermsList::ChertAllTermsList ( const ChertAllTermsList )
private

Copying is not allowed.

◆ ChertAllTermsList() [2/2]

ChertAllTermsList::ChertAllTermsList ( Xapian::Internal::intrusive_ptr< const ChertDatabase database_,
const std::string &  prefix_ 
)
inline

◆ ~ChertAllTermsList()

ChertAllTermsList::~ChertAllTermsList ( )

Destructor.

Definition at line 47 of file chert_alltermslist.cc.

References cursor, and LOGCALL_DTOR.

Referenced by ChertAllTermsList().

Member Function Documentation

◆ at_end()

bool ChertAllTermsList::at_end ( ) const
virtual

True if we're off the end of the list.

Implements AllTermsList.

Definition at line 181 of file chert_alltermslist.cc.

References ChertCursor::after_end(), cursor, LOGCALL, and RETURN.

Referenced by ChertAllTermsList(), get_termfreq(), get_termname(), next(), read_termfreq(), and skip_to().

◆ get_termfreq()

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

Returns the term frequency of the current term.

Either next() or skip_to() must have been called before this method can be called.

Implements AllTermsList.

Definition at line 63 of file chert_alltermslist.cc.

References Assert, at_end(), current_term, LOGCALL, read_termfreq(), RETURN, and termfreq.

Referenced by ChertAllTermsList().

◆ get_termname()

string ChertAllTermsList::get_termname ( ) const
virtual

Returns the current termname.

Either next() or skip_to() must have been called before this method can be called.

Implements AllTermsList.

Definition at line 54 of file chert_alltermslist.cc.

References Assert, at_end(), current_term, LOGCALL, and RETURN.

Referenced by ChertAllTermsList().

◆ next()

TermList * ChertAllTermsList::next ( )
virtual

◆ operator=()

void ChertAllTermsList::operator= ( const ChertAllTermsList )
private

Assignment is not allowed.

◆ read_termfreq()

void ChertAllTermsList::read_termfreq ( ) const
private

◆ skip_to()

TermList * ChertAllTermsList::skip_to ( const std::string &  tname)
virtual

Member Data Documentation

◆ current_term

std::string ChertAllTermsList::current_term
private

The termname at the current position.

Definition at line 47 of file chert_alltermslist.h.

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

◆ cursor

ChertCursor* ChertAllTermsList::cursor
private

A cursor which runs through the postlist table reading termnames from the keys.

Definition at line 44 of file chert_alltermslist.h.

Referenced by at_end(), next(), read_termfreq(), skip_to(), and ~ChertAllTermsList().

◆ database

Xapian::Internal::intrusive_ptr<const ChertDatabase> ChertAllTermsList::database
private

Keep a reference to our database to stop it being deleted.

Definition at line 39 of file chert_alltermslist.h.

Referenced by next(), and skip_to().

◆ prefix

std::string ChertAllTermsList::prefix
private

The prefix to restrict the terms to.

Definition at line 50 of file chert_alltermslist.h.

Referenced by next(), and skip_to().

◆ termfreq

Xapian::doccount ChertAllTermsList::termfreq
mutableprivate

The term frequency of the term at the current position.

If this value is zero, then we haven't read the term frequency for the current term yet. We need to call read_termfreq() to read this.

Definition at line 57 of file chert_alltermslist.h.

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


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