xapian-core  2.0.0
Public Member Functions | Private Member Functions | Private Attributes | List of all members
HoneySpellingWordsList Class Reference

#include <honey_spellingwordslist.h>

+ Inheritance diagram for HoneySpellingWordsList:
+ Collaboration diagram for HoneySpellingWordsList:

Public Member Functions

 HoneySpellingWordsList (const HoneyDatabase *database_, HoneyCursor *cursor_)
 
 ~HoneySpellingWordsList ()
 Destructor. More...
 
Xapian::termcount get_approx_size () const
 Return approximate size of this termlist. 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 (std::string_view term)
 Advance to the first term which is >= 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

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

Private Attributes

Xapian::Internal::intrusive_ptr< const HoneyDatabasedatabase
 Keep a reference to our database to stop it being deleted. More...
 
HoneyCursorcursor
 A cursor which runs through the spelling table reading termnames from the keys. More...
 
Xapian::termcount termfreq = 0
 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...
 
- Protected Attributes inherited from Xapian::TermIterator::Internal
std::string current_term
 The current term. More...
 

Detailed Description

Definition at line 31 of file honey_spellingwordslist.h.

Constructor & Destructor Documentation

◆ HoneySpellingWordsList() [1/2]

HoneySpellingWordsList::HoneySpellingWordsList ( const HoneySpellingWordsList )
private

Copying is not allowed.

◆ HoneySpellingWordsList() [2/2]

HoneySpellingWordsList::HoneySpellingWordsList ( const HoneyDatabase database_,
HoneyCursor cursor_ 
)
inline

Definition at line 58 of file honey_spellingwordslist.h.

References cursor, and HoneyCursor::to_end().

◆ ~HoneySpellingWordsList()

HoneySpellingWordsList::~HoneySpellingWordsList ( )

Destructor.

Definition at line 36 of file honey_spellingwordslist.cc.

References LOGCALL_DTOR.

Member Function Documentation

◆ get_approx_size()

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

Return approximate size of this termlist.

Implements AllTermsList.

Definition at line 43 of file honey_spellingwordslist.cc.

◆ get_termfreq()

Xapian::doccount HoneySpellingWordsList::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 51 of file honey_spellingwordslist.cc.

References Assert, AssertRel, Honey::KEY_PREFIX_WORD, LOGCALL, p, RETURN, and unpack_uint_last().

◆ next()

TermList * HoneySpellingWordsList::next ( )
virtual

Advance to the next term in the list.

Implements AllTermsList.

Definition at line 70 of file honey_spellingwordslist.cc.

References Assert, AssertRel, Honey::KEY_PREFIX_WORD, LOGCALL, and RETURN.

◆ operator=()

void HoneySpellingWordsList::operator= ( const HoneySpellingWordsList )
private

Assignment is not allowed.

◆ read_termfreq()

void HoneySpellingWordsList::read_termfreq ( ) const
private

Read and cache the term frequency.

◆ skip_to()

TermList * HoneySpellingWordsList::skip_to ( std::string_view  term)
virtual

Advance to the first term which is >= term.

Implements AllTermsList.

Definition at line 97 of file honey_spellingwordslist.cc.

References Assert, AssertRel, Honey::KEY_PREFIX_WORD, LOGCALL, Honey::make_spelling_wordlist_key(), RETURN, and term.

Member Data Documentation

◆ cursor

HoneyCursor* HoneySpellingWordsList::cursor
private

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

Definition at line 44 of file honey_spellingwordslist.h.

Referenced by HoneySpellingWordsList().

◆ database

Xapian::Internal::intrusive_ptr<const HoneyDatabase> HoneySpellingWordsList::database
private

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

Definition at line 39 of file honey_spellingwordslist.h.

◆ termfreq

Xapian::termcount HoneySpellingWordsList::termfreq = 0
mutableprivate

The term frequency of the term at the current position.

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

Definition at line 52 of file honey_spellingwordslist.h.


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