Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

Xapian::MSetIterator Class Reference

An iterator pointing to items in an MSet. More...

#include <enquire.h>

List of all members.

Public Types

typedef std::input_iterator_tag iterator_category
typedef docid value_type
typedef doccount_diff difference_type
typedef docidpointer
typedef docidreference

Public Methods

 MSetIterator ()
 Create an uninitialised iterator; this cannot be used, but is convenient syntactically. More...

 ~MSetIterator ()
 MSetIterator (const MSetIterator &other)
 Copying is allowed (and is cheap). More...

void operator= (const MSetIterator &other)
 Assignment is allowed (and is cheap). More...

MSetIterator & operator++ ()
 Advance the iterator. More...

void operator++ (int)
docid operator * () const
 Get the document ID for the current position. More...

Document get_document () const
 Get a Document object for the current position. More...

doccount get_rank () const
 Get the rank of the document at the current position. More...

weight get_weight () const
 Get the weight of the document at the current position. More...

percent get_percent () const
 This returns the weight of the document as a percentage score The return value will be in the range 0 to 100: 0 meaning that the item did not match the query at all. More...

std::string get_description () const
 Returns a string describing this object. More...


Public Attributes

Internal * internal

Friends

class MSet
bool operator== (const MSetIterator &a, const MSetIterator &b)


Detailed Description

An iterator pointing to items in an MSet.

This is used for access to individual results of a match.


Constructor & Destructor Documentation

Xapian::MSetIterator::MSetIterator  
 

Create an uninitialised iterator; this cannot be used, but is convenient syntactically.

Xapian::MSetIterator::MSetIterator const MSetIterator &    other
 

Copying is allowed (and is cheap).


Member Function Documentation

std::string Xapian::MSetIterator::get_description   const
 

Returns a string describing this object.

Introspection method.

Document Xapian::MSetIterator::get_document   const
 

Get a Document object for the current position.

This method returns a Document object which provides the information about the document pointed to by the MSetIterator.

If the underlying database has suitable support, using this call (rather than asking the database for a document based on its document ID) will enable the system to ensure that the correct data is returned, and that the document has not been deleted or changed since the query was performed.

Returns:
A Document object containing the document data.
Exceptions:
Xapian::DocNotFoundError  The document specified could not be found in the database.

percent Xapian::MSetIterator::get_percent   const
 

This returns the weight of the document as a percentage score The return value will be in the range 0 to 100: 0 meaning that the item did not match the query at all.

doccount Xapian::MSetIterator::get_rank   const
 

Get the rank of the document at the current position.

The rank is the position that this document is at in the ordered list of results of the query. The document judged "most relevant" will have rank of 0.

weight Xapian::MSetIterator::get_weight   const
 

Get the weight of the document at the current position.

docid Xapian::MSetIterator::operator *   const
 

Get the document ID for the current position.

MSetIterator& Xapian::MSetIterator::operator++  
 

Advance the iterator.

void Xapian::MSetIterator::operator= const MSetIterator &    other
 

Assignment is allowed (and is cheap).


The documentation for this class was generated from the following file:
Documentation for Xapian (version 0.6.3).
Generated on 24 Dec 2002 by Doxygen 1.2.15.