xapian-core
1.4.26
|
Class for iterating over a list of terms. More...
#include <termiterator.h>
Public Member Functions | |
TermIterator (const TermIterator &o) | |
Copy constructor. | |
TermIterator & | operator= (const TermIterator &o) |
Assignment. | |
TermIterator () | |
Default constructor. | |
~TermIterator () | |
Destructor. | |
std::string | operator* () const |
Return the term at the current position. | |
Xapian::termcount | get_wdf () const |
Return the wdf for the term at the current position. | |
Xapian::doccount | get_termfreq () const |
Return the term frequency for the term at the current position. | |
Xapian::termcount | positionlist_count () const |
Return the length of the position list for the current position. | |
PositionIterator | positionlist_begin () const |
Return a PositionIterator for the current term. | |
PositionIterator | positionlist_end () const |
Return an end PositionIterator for the current term. | |
TermIterator & | operator++ () |
Advance the iterator to the next position. | |
DerefWrapper_< std::string > | operator++ (int) |
Advance the iterator to the next position (postfix version). | |
void | skip_to (const std::string &term) |
Advance the iterator to term term. | |
std::string | get_description () const |
Return a string describing this object. | |
Class for iterating over a list of terms.
|
inline |
Default constructor.
Creates an uninitialised iterator, which can't be used before being assigned to, but is sometimes syntactically convenient.
Xapian::doccount Xapian::TermIterator::get_termfreq | ( | ) | const |
Return the term frequency for the term at the current position.
Note that for a TermIterator returned by calling termlist_begin() on a Document object obtained from a sharded database, this method will return the term frequency from the shard that the document is in rather than for the combined database.
void Xapian::TermIterator::skip_to | ( | const std::string & | term | ) |
Advance the iterator to term term.
If the iteration is over an unsorted list of terms, then this method will throw Xapian::InvalidOperationError.
term | The term to advance to. If this term isn't in the stream being iterated, then the iterator is moved to the next term after it which is. |