Public Member Functions | Friends | List of all members
Xapian::PostingIterator Class Reference

An iterator pointing to items in a list of postings. More...

Public Types

typedef std::input_iterator_tag iterator_category
 Allow use as an STL iterator.
 
typedef Xapian::docid value_type
 Allow use as an STL iterator.
 
typedef Xapian::doccount_diff difference_type
 Allow use as an STL iterator.
 
typedef Xapian::docidpointer
 Allow use as an STL iterator.
 
typedef Xapian::docidreference
 Allow use as an STL iterator.
 

Public Member Functions

 PostingIterator ()
 Default constructor - for declaring an uninitialised iterator.
 
 ~PostingIterator ()
 Destructor.
 
 PostingIterator (const PostingIterator &other)
 Copying is allowed. More...
 
void operator= (const PostingIterator &other)
 Assignment is allowed. More...
 
PostingIteratoroperator++ ()
 Advance the iterator to the next position.
 
DerefWrapper_< docidoperator++ (int)
 Advance the iterator to the next position (postfix version).
 
void skip_to (Xapian::docid did)
 Advance the iterator to the specified docid. More...
 
Xapian::docid operator* () const
 Get the document id at the current position in the postlist.
 
Xapian::termcount get_doclength () const
 Get the length of the document at the current position in the postlist. More...
 
Xapian::termcount get_wdf () const
 Get the within document frequency of the document at the current position in the postlist.
 
PositionIterator positionlist_begin () const
 Return PositionIterator pointing to start of positionlist for current document.
 
PositionIterator positionlist_end () const
 Return PositionIterator pointing to end of positionlist for current document.
 
std::string get_description () const
 Return a string describing this object.
 

Friends

bool operator== (const PostingIterator &a, const PostingIterator &b)
 Test equality of two PostingIterators.
 

Detailed Description

An iterator pointing to items in a list of postings.

Constructor & Destructor Documentation

Xapian::PostingIterator::PostingIterator ( const PostingIterator other)

Copying is allowed.

The internals are reference counted, so copying is also cheap.

Member Function Documentation

Xapian::termcount Xapian::PostingIterator::get_doclength ( ) const

Get the length of the document at the current position in the postlist.

This information may be stored in the postlist, in which case this lookup should be extremely fast (indeed, not require further disk access). If the information is not present in the postlist, it will be retrieved from the database, at a greater performance cost.

void Xapian::PostingIterator::operator= ( const PostingIterator other)

Assignment is allowed.

The internals are reference counted, so assignment is also cheap.

void Xapian::PostingIterator::skip_to ( Xapian::docid  did)

Advance the iterator to the specified docid.

If the specified docid isn't in the list, position ourselves on the first document after it (or at_end() if no greater docids are present).


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

Documentation for Xapian (version 1.2.23).
Generated on Mon Mar 28 2016 by Doxygen 1.8.5.