Xapian Class Reference

Decide if a Xapian::Error exception should be ignored. More...

#include <errorhandler.h>

List of all members.

Public Types

typedef unsigned doccount
 A count of documents.
typedef int doccount_diff
 A signed difference between two counts of documents.
typedef unsigned docid
 A unique identifier for a document.
typedef double doclength
 A normalised document length.
typedef int percent
 The percentage score for a document in an MSet.
typedef unsigned termcount
 A counts of terms.
typedef int termcount_diff
 A signed difference between two counts of terms.
typedef unsigned termpos
 A term position within a document or query.
typedef int termpos_diff
 A signed difference between two term positions.
typedef unsigned timeout
 A timeout value in microseconds.
typedef unsigned valueno
 The number for a value slot in a document.
typedef int valueno_diff
 A signed difference between two value slot numbers.
typedef double weight
 The weight of a document or term.

Public Member Functions

 ErrorHandler ()
 Default constructor.
virtual ~ErrorHandler ()
 We require a virtual destructor because we have virtual methods.
void operator() (Xapian::Error &error)
 Handle a Xapian::Error object.

Public Attributes

const int DB_CREATE_OR_OPEN = 1
 Open for read/write; create if no db exists.
const int DB_CREATE = 2
 Create a new database; fail if db exists.
const int DB_CREATE_OR_OVERWRITE = 3
 Overwrite existing db; create if none exists.
const int DB_OPEN = 4
 Open for read/write; fail if no db exists.
const valueno BAD_VALUENO = static_cast<valueno>(-1)
 Reserved value to indicate "no valueno".

Classes

class  BM25Weight
 BM25 weighting scheme. More...
class  BoolWeight
 Boolean weighting scheme (everything gets 0). More...
class  Database
 This class is used to access a database, or a group of databases. More...
class  Document
 A document in the database - holds data, values, terms, and postings. More...
class  Enquire
 This class provides an interface to the information retrieval system for the purpose of searching. More...
class  ESet
 Class representing an ordered set of expand terms (an ESet). More...
class  ESetIterator
 Iterate through terms in the ESet. More...
class  MatchDecider
 Base class for matcher decision functor. More...
class  MSet
 A match set (MSet). More...
class  MSetIterator
 An iterator pointing to items in an MSet. More...
class  RSet
 A relevance set (R-Set). More...
class  TradWeight
 Traditional probabilistic weighting scheme. More...
class  Weight
 Abstract base class for weighting schemes. More...
class  WritableDatabase
 This class provides read/write access to a database. More...
class  DateValueRangeProcessor
class  DocIDWrapper
 A wrapper class for a docid which returns the docid if dereferenced with *. More...
class  ExpandDecider
 Virtual base class for expand decider functor. More...
class  ExpandDeciderAnd
 ExpandDecider subclass which rejects terms using two ExpandDeciders. More...
class  ExpandDeciderFilterTerms
 ExpandDecider subclass which rejects terms in a specified list. More...
class  NumberValueRangeProcessor
class  PositionIterator
 An iterator pointing to items in a list of positions. More...
class  PostingIterator
 An iterator pointing to items in a list of postings. More...
class  Query
 Internal class, implementing most of Xapian::Query. More...
class  Query
 Class representing a query. More...
class  QueryParser
 Build a Xapian::Query object from a user query string. More...
class  SimpleStopper
 Simple implementation of Stopper class - this will suit most users. More...
class  Stem
 Class representing a stemming algorithm. More...
class  Stopper
 Base class for stop-word decision functor. More...
class  StringValueRangeProcessor
class  TermIterator
 An iterator pointing to items in a list of terms. More...
class  TermNameWrapper
 A wrapper class for a termname which returns the termname if dereferenced with *. More...
class  TermPosWrapper
 A wrapper class for a termpos which returns the termpos if dereferenced with *. More...
class  Utf8Iterator
class  ValueIterator
 An iterator pointing to values associated with a document. More...
struct  ValueRangeProcessor


Detailed Description

Decide if a Xapian::Error exception should be ignored.

You can create your own subclass of this class and pass in an instance of it when you construct a Xapian::Enquire object. Xapian::Error exceptions which happen during the match process are passed to this object and it can decide whether they should propagate or whether Enquire should attempt to continue.

The motivation is to allow searching over remote databases to handle a remote server which has died (both to allow results to be returned, and also so that such errors can be logged and dead servers temporarily removed from use).


Member Typedef Documentation

typedef unsigned Xapian::doccount
 

A count of documents.

This is used to hold values such as the number of documents in a database and the frequency of a term in the database.

typedef int Xapian::doccount_diff
 

A signed difference between two counts of documents.

This is used by the Xapian classes which are STL containers of documents for "difference_type".

typedef unsigned Xapian::docid
 

A unique identifier for a document.

Docid 0 is invalid, providing an "out of range" value which can be used to mean "not a valid document".

typedef double Xapian::doclength
 

A normalised document length.

The normalised document length is the document length divided by the average document length in the database.

typedef int Xapian::percent
 

The percentage score for a document in an MSet.

typedef unsigned Xapian::termcount
 

A counts of terms.

This is used to hold values such as the Within Document Frequency (wdf).

typedef int Xapian::termcount_diff
 

A signed difference between two counts of terms.

This is used by the Xapian classes which are STL containers of terms for "difference_type".

typedef unsigned Xapian::termpos
 

A term position within a document or query.

typedef int Xapian::termpos_diff
 

A signed difference between two term positions.

This is used by the Xapian classes which are STL containers of positions for "difference_type".

typedef unsigned Xapian::timeout
 

A timeout value in microseconds.

There are 1 million microseconds in a second, so for example, to set a timeout of 5 seconds use 5000000.

typedef unsigned Xapian::valueno
 

The number for a value slot in a document.

Any value slot number except Xapian::BAD_VALUENO is valid.

typedef int Xapian::valueno_diff
 

A signed difference between two value slot numbers.

This is used by the Xapian classes which are STL containers of values for "difference_type".

typedef double Xapian::weight
 

The weight of a document or term.


Constructor & Destructor Documentation

virtual Xapian::~ErrorHandler (   )  [virtual]
 

We require a virtual destructor because we have virtual methods.


Member Function Documentation

Xapian::ErrorHandler (   )  [inline]
 

Default constructor.

void Xapian::operator() (  Xapian::Error &  error  ) 
 

Handle a Xapian::Error object.

This method is called when a Xapian::Error object is thrown and caught inside Enquire. If this is the first ErrorHandler that the Error has been passed to, then the handle_error() virtual method is called, which allows the API user to decide how to handle the error.

Parameters:
error The Xapian::Error object under consideration.


Member Data Documentation

const valueno Xapian::BAD_VALUENO = static_cast<valueno>(-1)
 

Reserved value to indicate "no valueno".

const int Xapian::DB_CREATE = 2
 

Create a new database; fail if db exists.

const int Xapian::DB_CREATE_OR_OPEN = 1
 

Open for read/write; create if no db exists.

const int Xapian::DB_CREATE_OR_OVERWRITE = 3
 

Overwrite existing db; create if none exists.

const int Xapian::DB_OPEN = 4
 

Open for read/write; fail if no db exists.


The documentation for this class was generated from the following files:
Documentation for Xapian (version 0.9.10_svn8391).
Generated on 26 Apr 2007 by Doxygen 1.4.6.