xapian-core  1.4.21
Public Member Functions | Private Attributes | List of all members
ValueCountTermList Class Referencefinal

A termlist iterator over the contents of a ValueCountMatchSpy. More...

+ Inheritance diagram for ValueCountTermList:
+ Collaboration diagram for ValueCountTermList:

Public Member Functions

 ValueCountTermList (ValueCountMatchSpy::Internal *spy_)
 
string get_termname () const
 Return the termname 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 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 get_approx_size () const
 Return approximate size of this termlist. More...
 
Xapian::termcount get_wdf () const
 Return the wdf for the term at the current position. 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...
 
- 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 Attributes

map< string, Xapian::doccount >::const_iterator it
 
bool started
 
intrusive_ptr< Xapian::ValueCountMatchSpy::Internalspy
 

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

A termlist iterator over the contents of a ValueCountMatchSpy.

Definition at line 94 of file matchspy.cc.

Constructor & Destructor Documentation

◆ ValueCountTermList()

ValueCountTermList::ValueCountTermList ( ValueCountMatchSpy::Internal spy_)
inlineexplicit

Definition at line 101 of file matchspy.cc.

References Xapian::ValueCountMatchSpy::Internal::values.

Member Function Documentation

◆ at_end()

bool ValueCountTermList::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 138 of file matchspy.cc.

References Assert, and Xapian::ValueCountMatchSpy::Internal::values.

◆ get_approx_size()

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

Return approximate size of this termlist.

Implements Xapian::TermIterator::Internal.

Definition at line 143 of file matchspy.cc.

References unsupported_method().

◆ get_termfreq()

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

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

Implements Xapian::TermIterator::Internal.

Definition at line 114 of file matchspy.cc.

References Assert.

◆ get_termname()

string ValueCountTermList::get_termname ( ) const
inlinevirtual

Return the termname at the current position.

Implements Xapian::TermIterator::Internal.

Definition at line 108 of file matchspy.cc.

References Assert.

◆ get_wdf()

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

Return the wdf for the term at the current position.

Implements Xapian::TermIterator::Internal.

Definition at line 144 of file matchspy.cc.

References unsupported_method().

◆ next()

TermList* ValueCountTermList::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 120 of file matchspy.cc.

References Assert.

◆ positionlist_begin()

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

Return a PositionIterator for the current position.

Implements Xapian::TermIterator::Internal.

Definition at line 145 of file matchspy.cc.

References unsupported_method().

◆ positionlist_count()

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

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

Implements Xapian::TermIterator::Internal.

Definition at line 149 of file matchspy.cc.

References unsupported_method().

◆ skip_to()

TermList* ValueCountTermList::skip_to ( const 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 130 of file matchspy.cc.

References Xapian::ValueCountMatchSpy::Internal::values.

Member Data Documentation

◆ it

map<string, Xapian::doccount>::const_iterator ValueCountTermList::it
private

Definition at line 96 of file matchspy.cc.

◆ spy

intrusive_ptr<Xapian::ValueCountMatchSpy::Internal> ValueCountTermList::spy
private

Definition at line 98 of file matchspy.cc.

◆ started

bool ValueCountTermList::started
private

Definition at line 97 of file matchspy.cc.


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