xapian-core  1.4.27
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
OrTermList Class Reference

#include <ortermlist.h>

+ Inheritance diagram for OrTermList:
+ Collaboration diagram for OrTermList:

Public Member Functions

 OrTermList (TermList *left_, TermList *right_)
 
 ~OrTermList ()
 
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...
 
std::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...
 
- 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...
 

Protected Member Functions

void check_started () const
 Check that next() has already been called. More...
 
- Protected Member Functions inherited from Xapian::TermIterator::Internal
 Internal ()
 Only constructable as a base class for derived classes. More...
 

Protected Attributes

TermListleft
 The two TermList objects we're merging. More...
 
TermListright
 
std::string left_current
 The current term for left and right respectively. More...
 
std::string right_current
 

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

Detailed Description

Definition at line 32 of file ortermlist.h.

Constructor & Destructor Documentation

◆ OrTermList()

OrTermList::OrTermList ( TermList left_,
TermList right_ 
)
inline

Definition at line 49 of file ortermlist.h.

◆ ~OrTermList()

OrTermList::~OrTermList ( )

Definition at line 39 of file ortermlist.cc.

Member Function Documentation

◆ accumulate_stats()

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

Collate weighting information for the current term.

Reimplemented from Xapian::TermIterator::Internal.

Definition at line 56 of file ortermlist.cc.

References LOGCALL_VOID.

◆ at_end()

bool OrTermList::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 174 of file ortermlist.cc.

References Assert, LOGCALL, and RETURN.

◆ check_started()

void OrTermList::check_started ( ) const
protected

Check that next() has already been called.

Definition at line 33 of file ortermlist.cc.

References Assert.

◆ get_approx_size()

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

Return approximate size of this termlist.

Implements Xapian::TermIterator::Internal.

Definition at line 46 of file ortermlist.cc.

References LOGCALL, and RETURN.

◆ get_termfreq()

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

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

Implements Xapian::TermIterator::Internal.

Reimplemented in FreqAdderOrTermList.

Definition at line 85 of file ortermlist.cc.

References Assert, LOGCALL, and RETURN.

◆ get_termname()

string OrTermList::get_termname ( ) const
virtual

Return the termname at the current position.

Implements Xapian::TermIterator::Internal.

Definition at line 65 of file ortermlist.cc.

References LOGCALL, and RETURN.

◆ get_wdf()

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

Return the wdf for the term at the current position.

Implements Xapian::TermIterator::Internal.

Definition at line 74 of file ortermlist.cc.

References LOGCALL, and RETURN.

◆ next()

TermList * OrTermList::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 105 of file ortermlist.cc.

References AssertEq, handle_prune(), LOGCALL, and RETURN.

◆ positionlist_begin()

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

Return a PositionIterator for the current position.

Implements Xapian::TermIterator::Internal.

Definition at line 192 of file ortermlist.cc.

References Assert.

◆ positionlist_count()

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

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

Implements Xapian::TermIterator::Internal.

Definition at line 185 of file ortermlist.cc.

References Assert.

◆ skip_to()

TermList * OrTermList::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 151 of file ortermlist.cc.

References handle_prune(), LOGCALL, and RETURN.

Member Data Documentation

◆ left

TermList* OrTermList::left
protected

The two TermList objects we're merging.

Definition at line 35 of file ortermlist.h.

◆ left_current

std::string OrTermList::left_current
protected

The current term for left and right respectively.

Until next() is first called, these will be empty strings. Once next() has been called, they won't be empty (since the empty string isn't a valid term).

Definition at line 43 of file ortermlist.h.

◆ right

TermList * OrTermList::right
protected

Definition at line 35 of file ortermlist.h.

◆ right_current

std::string OrTermList::right_current
protected

Definition at line 43 of file ortermlist.h.


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