xapian-core  1.4.26
Public Member Functions | Private Attributes | List of all members
MapTermList Class Reference

#include <maptermlist.h>

+ Inheritance diagram for MapTermList:
+ Collaboration diagram for MapTermList:

Public Member Functions

 MapTermList (const Xapian::Document::Internal::document_terms::const_iterator &it_, const Xapian::Document::Internal::document_terms::const_iterator &it_end_)
 
Xapian::termcount get_approx_size () const
 Return approximate size of this termlist. More...
 
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...
 
const std::vector< Xapian::termpos > * get_vector_termpos () const
 Get pointer to vector<termpos> if that's the internal representation. More...
 
Xapian::PositionIterator positionlist_begin () const
 Return a PositionIterator for the current position. More...
 
Xapian::termcount positionlist_count () const
 Return the length of the position list for 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 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...
 
- Public Member Functions inherited from Xapian::Internal::intrusive_base
 intrusive_base ()
 Construct with no references. More...
 

Private Attributes

Xapian::Document::Internal::document_terms::const_iterator it
 
Xapian::Document::Internal::document_terms::const_iterator it_end
 
bool started
 

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 Xapian::TermIterator::Internal
 Internal ()
 Only constructable as a base class for derived classes. More...
 

Detailed Description

Definition at line 35 of file maptermlist.h.

Constructor & Destructor Documentation

◆ MapTermList()

MapTermList::MapTermList ( const Xapian::Document::Internal::document_terms::const_iterator &  it_,
const Xapian::Document::Internal::document_terms::const_iterator &  it_end_ 
)
inline

Definition at line 42 of file maptermlist.h.

Member Function Documentation

◆ at_end()

bool MapTermList::at_end ( ) const
inlinevirtual

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

Implements Xapian::TermIterator::Internal.

Definition at line 111 of file maptermlist.h.

References Assert.

◆ get_approx_size()

Xapian::termcount MapTermList::get_approx_size ( ) const
inlinevirtual

Return approximate size of this termlist.

Implements Xapian::TermIterator::Internal.

Definition at line 48 of file maptermlist.h.

References Assert.

◆ get_termfreq()

Xapian::doccount MapTermList::get_termfreq ( ) const
inlinevirtual

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

Implements Xapian::TermIterator::Internal.

Definition at line 69 of file maptermlist.h.

◆ get_termname()

string MapTermList::get_termname ( ) const
inlinevirtual

Return the termname at the current position.

Implements Xapian::TermIterator::Internal.

Definition at line 55 of file maptermlist.h.

References Assert.

◆ get_vector_termpos()

const std::vector<Xapian::termpos>* MapTermList::get_vector_termpos ( ) const
inlinevirtual

Get pointer to vector<termpos> if that's the internal representation.

This avoids unnecessary copying of positions in the common cases - the case it doesn't help with is adding a document back with unmodified positions AND a different docid, which is an unusual thing to do.

Returns
Pointer to vector<termpos> or NULL.

Reimplemented from Xapian::TermIterator::Internal.

Definition at line 73 of file maptermlist.h.

◆ get_wdf()

Xapian::termcount MapTermList::get_wdf ( ) const
inlinevirtual

Return the wdf for the term at the current position.

Implements Xapian::TermIterator::Internal.

Definition at line 62 of file maptermlist.h.

References Assert.

◆ next()

TermList* MapTermList::next ( )
inlinevirtual

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 86 of file maptermlist.h.

References Assert.

◆ positionlist_begin()

Xapian::PositionIterator MapTermList::positionlist_begin ( ) const
inlinevirtual

Return a PositionIterator for the current position.

Implements Xapian::TermIterator::Internal.

Definition at line 77 of file maptermlist.h.

◆ positionlist_count()

Xapian::termcount MapTermList::positionlist_count ( ) const
inlinevirtual

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

Implements Xapian::TermIterator::Internal.

Definition at line 82 of file maptermlist.h.

◆ skip_to()

TermList* MapTermList::skip_to ( const std::string &  term)
inlinevirtual

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 99 of file maptermlist.h.

Member Data Documentation

◆ it

Xapian::Document::Internal::document_terms::const_iterator MapTermList::it
private

Definition at line 37 of file maptermlist.h.

◆ it_end

Xapian::Document::Internal::document_terms::const_iterator MapTermList::it_end
private

Definition at line 38 of file maptermlist.h.

◆ started

bool MapTermList::started
private

Definition at line 39 of file maptermlist.h.


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