Xapian Namespace Reference

The Xapian library lives in the Xapian namespace. More...


Classes

class  ByQueryIndexCmp
class  NumberValueRangeProcessor
 Handle a number range. More...
class  BitReader
class  Database
 This class is used to access a database, or a group of databases. More...
class  WritableDatabase
 This class provides read/write access to a database. More...
class  Document
 A document in the database - holds data, values, terms, and postings. More...
class  MSet
 A match set (MSet). More...
class  MSetIterator
 An iterator pointing to items in an MSet. More...
class  ESet
 Class representing an ordered set of expand terms (an ESet). More...
class  ESetIterator
 Iterate through terms in the ESet. More...
class  RSet
 A relevance set (R-Set). More...
class  MatchDecider
 Base class for matcher decision functor. More...
class  Enquire
 This class provides an interface to the information retrieval system for the purpose of searching. More...
class  Weight
 Abstract base class for weighting schemes. More...
class  BoolWeight
 Boolean weighting scheme (everything gets 0). More...
class  BM25Weight
 BM25 weighting scheme. More...
class  TradWeight
 Traditional probabilistic weighting scheme. More...
class  Error
 All exceptions thrown by Xapian are subclasses of Xapian::Error. More...
class  LogicError
 The base class for exceptions indicating errors in the program logic. More...
class  RuntimeError
 The base class for exceptions indicating errors only detectable at runtime. More...
class  AssertionError
 AssertionError is thrown if a logical assertion inside Xapian fails. More...
class  InvalidArgumentError
 InvalidArgumentError indicates an invalid parameter value was passed to the API. More...
class  InvalidOperationError
 InvalidOperationError indicates the API was used in an invalid way. More...
class  UnimplementedError
 UnimplementedError indicates an attempt to use an unimplemented feature. More...
class  DatabaseError
 DatabaseError indicates some sort of database related error. More...
class  DatabaseCorruptError
 DatabaseCorruptError indicates database corruption was detected. More...
class  DatabaseCreateError
 DatabaseCreateError indicates a failure to create a database. More...
class  DatabaseLockError
 DatabaseLockError indicates failure to lock a database. More...
class  DatabaseModifiedError
 DatabaseModifiedError indicates a database was modified. More...
class  DatabaseOpeningError
 DatabaseOpeningError indicates failure to open a database. More...
class  DatabaseVersionError
 DatabaseVersionError indicates that a database is in an unsupported format. More...
class  DocNotFoundError
 Indicates an attempt to access a document not present in the database. More...
class  FeatureUnavailableError
 Indicates an attempt to use a feature which is unavailable. More...
class  InternalError
 InternalError indicates a runtime problem of some sort. More...
class  NetworkError
 Indicates a problem communicating with a remote database. More...
class  NetworkTimeoutError
 Indicates a timeout expired while communicating with a remote database. More...
class  QueryParserError
 Indicates a query string can't be parsed. More...
class  RangeError
 RangeError indicates an attempt to access outside the bounds of a container. More...
class  ErrorHandler
 Decide if a Xapian::Error exception should be ignored. 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  TermPosWrapper
 

For internal use only.

A wrapper class for a termpos which returns the termpos if dereferenced with *.

More...
class  PositionIterator
 An iterator pointing to items in a list of positions. More...
class  DocIDWrapper
 

For internal use only.

A wrapper class for a docid which returns the docid if dereferenced with *.

More...
class  PostingIterator
 An iterator pointing to items in a list of postings. More...
class  Query
 Class representing a query. More...
class  Stopper
 Base class for stop-word decision functor. More...
class  SimpleStopper
 Simple implementation of Stopper class - this will suit most users. More...
struct  ValueRangeProcessor
 Base class for value range processors. More...
class  StringValueRangeProcessor
 Handle a string range. More...
class  DateValueRangeProcessor
 Handle a date range. More...
class  QueryParser
 Build a Xapian::Query object from a user query string. More...
class  Sorter
 Virtual base class for sorter functor. More...
class  MultiValueSorter
 Sorter subclass which sorts by a several values. More...
class  Stem
 Class representing a stemming algorithm. More...
class  TermGenerator
 Parses a piece of text and generate terms. More...
class  TermNameWrapper
 

For internal use only.

A wrapper class for a termname which returns the termname if dereferenced with *.

More...
class  TermIterator
 An iterator pointing to items in a list of terms. More...
class  Utf8Iterator
 An iterator which returns unicode character values from a UTF-8 encoded string. More...
class  ValueIterator
 An iterator pointing to values associated with a document. More...
class  InternalStemDanish
class  InternalStemDutch
class  InternalStemEnglish
class  InternalStemFinnish
class  InternalStemFrench
class  InternalStemGerman
class  InternalStemGerman2
class  InternalStemHungarian
class  InternalStemItalian
class  InternalStemKraaij_pohlmann
class  InternalStemLovins
class  InternalStemNorwegian
class  InternalStemPorter
class  InternalStemPortuguese
class  InternalStemRomanian
class  InternalStemRussian
class  InternalStemSpanish
class  InternalStemSwedish
class  InternalStemTurkish

Namespaces

namespace  Internal
namespace  Auto
namespace  InMemory
namespace  Quartz
namespace  Flint
namespace  Remote
namespace  Unicode

Typedefs

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.

Functions

static int freq_edit_lower_bound (const vector< unsigned > &a, const vector< unsigned > &b)
 XAPIAN_NORETURN (static void only_one_subdatabase_allowed())
static void only_one_subdatabase_allowed ()
string sortable_serialise (double value)
 Convert a floating point number to a string, preserving sort order.
double sortable_unserialise (const std::string &value)
 Convert a string encoded using sortable_serialise back to a floating point number.
const char * version_string ()
 Report the version string of the library which the program is linked with.
int major_version ()
 Report the major version of the library which the program is linked to.
int minor_version ()
 Report the minor version of the library which the program is linked to.
int revision ()
 Report the revision of the library which the program is linked to.
const char * xapian_version_string ()
 For compatibility with Xapian 0.9.5 and earlier.
int xapian_major_version ()
 For compatibility with Xapian 0.9.5 and earlier.
int xapian_minor_version ()
 For compatibility with Xapian 0.9.5 and earlier.
int xapian_revision ()
 For compatibility with Xapian 0.9.5 and earlier.
static void open_stub (Database *db, const string &file)
bool operator== (const MSetIterator &a, const MSetIterator &b)
bool operator!= (const MSetIterator &a, const MSetIterator &b)
bool operator== (const ESetIterator &a, const ESetIterator &b)
bool operator!= (const ESetIterator &a, const ESetIterator &b)
bool operator== (const PositionIterator &a, const PositionIterator &b)
 Test equality of two PositionIterators.
bool operator!= (const PositionIterator &a, const PositionIterator &b)
 Test inequality of two PositionIterators.
bool operator== (const PostingIterator &a, const PostingIterator &b)
 Test equality of two PostingIterators.
bool operator!= (const PostingIterator &a, const PostingIterator &b)
 Test inequality of two PostingIterators.
bool operator== (const TermIterator &a, const TermIterator &b)
bool operator!= (const TermIterator &a, const TermIterator &b)
bool operator== (const ValueIterator &a, const ValueIterator &b)
bool operator!= (const ValueIterator &a, const ValueIterator &b)
bool U_isupper (unsigned ch)
unsigned check_wordchar (unsigned ch)
bool should_stem (const std::string &term)
unsigned check_infix (unsigned ch)
unsigned check_infix_digit (unsigned ch)
bool is_digit (unsigned ch)
unsigned check_suffix (unsigned ch)

Variables

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".
static const unsigned int MAX_PROB_TERM_LENGTH = 64


Detailed Description

The Xapian library lives in the Xapian namespace.

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.

Definition at line 31 of file types.h.

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".

Definition at line 38 of file types.h.

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".

Definition at line 45 of file types.h.

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.

Definition at line 52 of file types.h.

typedef int Xapian::percent

The percentage score for a document in an MSet.

Definition at line 55 of file types.h.

typedef unsigned Xapian::termcount

A counts of terms.

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

Definition at line 61 of file types.h.

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".

Definition at line 68 of file types.h.

typedef unsigned Xapian::termpos

A term position within a document or query.

Definition at line 72 of file types.h.

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".

Definition at line 79 of file types.h.

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.

Definition at line 86 of file types.h.

typedef unsigned Xapian::valueno

The number for a value slot in a document.

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

Definition at line 92 of file types.h.

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".

Definition at line 99 of file types.h.

typedef double Xapian::weight

The weight of a document or term.

Definition at line 102 of file types.h.


Function Documentation

static int Xapian::freq_edit_lower_bound ( const vector< unsigned > &  a,
const vector< unsigned > &  b 
) [static]

Definition at line 362 of file omdatabase.cc.

References VEC_SIZE.

Xapian::XAPIAN_NORETURN ( static void   only_one_subdatabase_allowed()  ) 

static void Xapian::only_one_subdatabase_allowed (  )  [static]

Definition at line 590 of file omdatabase.cc.

Referenced by Xapian::WritableDatabase::add_document(), Xapian::WritableDatabase::add_spelling(), Xapian::WritableDatabase::add_synonym(), Xapian::WritableDatabase::begin_transaction(), Xapian::WritableDatabase::cancel_transaction(), Xapian::WritableDatabase::clear_synonyms(), Xapian::WritableDatabase::commit_transaction(), Xapian::WritableDatabase::delete_document(), Xapian::WritableDatabase::flush(), Xapian::WritableDatabase::remove_spelling(), Xapian::WritableDatabase::remove_synonym(), and Xapian::WritableDatabase::replace_document().

std::string Xapian::sortable_serialise ( double  value  ) 

Convert a floating point number to a string, preserving sort order.

This method converts a floating point number to a string, suitable for using as a value for numeric range restriction, or for use as a sort key.

The conversion is platform independent.

The conversion attempts to ensure that, for any pair of values supplied to the conversion algorithm, the result of comparing the original values (with a numeric comparison operator) will be the same as the result of comparing the resulting values (with a string comparison operator). On platforms which represent doubles with the precisions specified by IEEE_754, this will be the case: if the representation of doubles is more precise, it is possible that two very close doubles will be mapped to the same string, so will compare equal.

Note also that both zero and -zero will be converted to the same representation: since these compare equal, this satisfies the comparison constraint, but it's worth knowing this if you wish to use the encoding in some situation where this distinction matters.

Handling of NaN isn't (currently) guaranteed to be sensible.

Definition at line 44 of file sortable-serialise.cc.

References Assert.

Referenced by test_qp_value_range3(), and test_value_range_serialise1().

double Xapian::sortable_unserialise ( const std::string &  value  ) 

Convert a string encoded using sortable_serialise back to a floating point number.

This expects the input to be a string produced by sortable_serialise(). If the input is not such a string, the value returned is undefined (but no error will be thrown).

The result of the conversion will be exactly the value which was supplied to sortable_serialise() when making the string on platforms which represent doubles with the precisions specified by IEEE_754, but may be a different (nearby) value on other platforms.

Definition at line 176 of file sortable-serialise.cc.

References Assert, and numfromstr().

Referenced by test_value_range_serialise1().

const char * Xapian::version_string (  ) 

Report the version string of the library which the program is linked with.

This may be different to the version compiled against (given by XAPIAN_VERSION) if shared libraries are being used.

Definition at line 25 of file version.cc.

References XAPIAN_VERSION.

int Xapian::major_version (  ) 

Report the major version of the library which the program is linked to.

This may be different to the version compiled against (given by XAPIAN_MAJOR_VERSION) if shared libraries are being used.

Definition at line 27 of file version.cc.

References XAPIAN_MAJOR_VERSION.

int Xapian::minor_version (  ) 

Report the minor version of the library which the program is linked to.

This may be different to the version compiled against (given by XAPIAN_MINOR_VERSION) if shared libraries are being used.

Definition at line 29 of file version.cc.

References XAPIAN_MINOR_VERSION.

int Xapian::revision (  ) 

Report the revision of the library which the program is linked to.

This may be different to the version compiled against (given by XAPIAN_REVISION) if shared libraries are being used.

Definition at line 31 of file version.cc.

References XAPIAN_REVISION.

Referenced by QuartzDatabase::create_and_open_tables(), FlintDatabase::create_and_open_tables(), Btree_base::get_revision(), FlintTable_base::get_revision(), QuartzDatabase::open_tables_consistent(), FlintDatabase::open_tables_consistent(), Btree_base::set_revision(), and FlintTable_base::set_revision().

const char * Xapian::xapian_version_string (  ) 

For compatibility with Xapian 0.9.5 and earlier.

Deprecated:
This function is now deprecated, use Xapian::version_string() instead.

Definition at line 35 of file version.cc.

References XAPIAN_VERSION.

int Xapian::xapian_major_version (  ) 

For compatibility with Xapian 0.9.5 and earlier.

Deprecated:
This function is now deprecated, use Xapian::major_version() instead.

Definition at line 37 of file version.cc.

References XAPIAN_MAJOR_VERSION.

int Xapian::xapian_minor_version (  ) 

For compatibility with Xapian 0.9.5 and earlier.

Deprecated:
This function is now deprecated, use Xapian::minor_version() instead.

Definition at line 39 of file version.cc.

References XAPIAN_MINOR_VERSION.

int Xapian::xapian_revision (  ) 

For compatibility with Xapian 0.9.5 and earlier.

Deprecated:
This function is now deprecated, use Xapian::revision() instead.

Definition at line 41 of file version.cc.

References XAPIAN_REVISION.

static void Xapian::open_stub ( Database *  db,
const string &  file 
) [static]

Definition at line 95 of file database.cc.

References Xapian::Database::add_database(), atoi(), om_tostring(), Xapian::Remote::open(), Xapian::Quartz::open(), and Xapian::Flint::open().

bool Xapian::operator== ( const MSetIterator &  a,
const MSetIterator &  b 
) [inline]

Definition at line 374 of file enquire.h.

References Xapian::MSetIterator::index.

bool Xapian::operator!= ( const MSetIterator &  a,
const MSetIterator &  b 
) [inline]

Definition at line 379 of file enquire.h.

References Xapian::MSetIterator::index.

bool Xapian::operator== ( const ESetIterator &  a,
const ESetIterator &  b 
) [inline]

Definition at line 520 of file enquire.h.

References Xapian::ESetIterator::index.

bool Xapian::operator!= ( const ESetIterator &  a,
const ESetIterator &  b 
) [inline]

Definition at line 525 of file enquire.h.

References Xapian::ESetIterator::index.

bool Xapian::operator== ( const PositionIterator &  a,
const PositionIterator &  b 
) [inline]

Test equality of two PositionIterators.

Definition at line 112 of file positioniterator.h.

References Xapian::Internal::RefCntPtr< T >::get(), and Xapian::PositionIterator::internal.

bool Xapian::operator!= ( const PositionIterator &  a,
const PositionIterator &  b 
) [inline]

Test inequality of two PositionIterators.

Definition at line 119 of file positioniterator.h.

bool Xapian::operator== ( const PostingIterator &  a,
const PostingIterator &  b 
) [inline]

Test equality of two PostingIterators.

Definition at line 150 of file postingiterator.h.

References Xapian::Internal::RefCntPtr< T >::get(), and Xapian::PostingIterator::internal.

bool Xapian::operator!= ( const PostingIterator &  a,
const PostingIterator &  b 
) [inline]

Test inequality of two PostingIterators.

Definition at line 156 of file postingiterator.h.

bool Xapian::operator== ( const TermIterator &  a,
const TermIterator &  b 
) [inline]

Definition at line 136 of file termiterator.h.

References Xapian::Internal::RefCntPtr< T >::get(), and Xapian::TermIterator::internal.

bool Xapian::operator!= ( const TermIterator &  a,
const TermIterator &  b 
) [inline]

Definition at line 142 of file termiterator.h.

bool Xapian::operator== ( const ValueIterator &  a,
const ValueIterator &  b 
) [inline]

Definition at line 104 of file valueiterator.h.

References Xapian::ValueIterator::index.

bool Xapian::operator!= ( const ValueIterator &  a,
const ValueIterator &  b 
) [inline]

Definition at line 109 of file valueiterator.h.

References Xapian::ValueIterator::index.

bool Xapian::U_isupper ( unsigned  ch  )  [inline]

Definition at line 47 of file termgenerator_internal.cc.

References C_isupper().

Referenced by Xapian::QueryParser::Internal::parse_term().

unsigned Xapian::check_wordchar ( unsigned  ch  )  [inline]

Definition at line 51 of file termgenerator_internal.cc.

References Xapian::Unicode::is_wordchar(), and Xapian::Unicode::tolower().

bool Xapian::should_stem ( const std::string &  term  )  [inline]

Definition at line 57 of file termgenerator_internal.cc.

References Xapian::Unicode::get_category(), Xapian::Unicode::LOWERCASE_LETTER, Xapian::Unicode::MODIFIER_LETTER, Xapian::Unicode::OTHER_LETTER, and Xapian::Unicode::TITLECASE_LETTER.

unsigned Xapian::check_infix ( unsigned  ch  )  [inline]

Definition at line 68 of file termgenerator_internal.cc.

Referenced by Xapian::QueryParser::Internal::parse_term().

unsigned Xapian::check_infix_digit ( unsigned  ch  )  [inline]

Definition at line 82 of file termgenerator_internal.cc.

Referenced by Xapian::QueryParser::Internal::parse_term().

bool Xapian::is_digit ( unsigned  ch  )  [inline]

Definition at line 102 of file termgenerator_internal.cc.

References Xapian::Unicode::DECIMAL_DIGIT_NUMBER, and Xapian::Unicode::get_category().

Referenced by Xapian::QueryParser::Internal::parse_term().

unsigned Xapian::check_suffix ( unsigned  ch  )  [inline]

Definition at line 106 of file termgenerator_internal.cc.


Variable Documentation

const int Xapian::DB_CREATE_OR_OPEN = 1

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

Definition at line 746 of file database.h.

Referenced by DEFINE_TESTCASE(), main(), RemoteServer::RemoteServer(), and test_writelock1().

const int Xapian::DB_CREATE = 2

Create a new database; fail if db exists.

Definition at line 748 of file database.h.

Referenced by DEFINE_TESTCASE(), FlintDatabase::FlintDatabase(), main(), QuartzDatabase::QuartzDatabase(), test_adddoc1(), test_create1(), and test_writelock1().

const int Xapian::DB_CREATE_OR_OVERWRITE = 3

Overwrite existing db; create if none exists.

Definition at line 750 of file database.h.

Referenced by DEFINE_TESTCASE(), FlintDatabase::FlintDatabase(), QuartzDatabase::QuartzDatabase(), test_create1(), test_qp_spell1(), test_qp_spell2(), test_qp_stem_scale1(), test_qp_synonym1(), test_qp_synonym2(), test_qp_synonym3(), test_tg_spell1(), and test_writelock1().

const int Xapian::DB_OPEN = 4

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

Definition at line 752 of file database.h.

Referenced by DEFINE_TESTCASE(), FlintDatabase::FlintDatabase(), BackendManagerQuartz::get_writable_database_again(), BackendManagerFlint::get_writable_database_again(), QuartzDatabase::QuartzDatabase(), and test_writelock1().

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

Reserved value to indicate "no valueno".

Definition at line 105 of file types.h.

Referenced by DEFINE_TESTCASE(), MultiMatch::get_mset(), AuthorValueRangeProcessor::operator()(), State::value_range(), and yy_reduce().

const unsigned int Xapian::MAX_PROB_TERM_LENGTH = 64 [static]

Definition at line 40 of file termgenerator_internal.cc.


Documentation for Xapian (version 1.0.10).
Generated on 24 Dec 2008 by Doxygen 1.5.2.