o I3b@s3dZddlmZddZddZddZd d lmZd Z Gd d d e Z e ej e _e eje _e eje _e eje _e eje _e eje _e eje _e eje _e eje _e eje _ e ej!e _"e ej#e _$e ej%e _&e ej'e _(e ej)e _*e ej+e _,ej-Z-e-e Gddde.Z/e ej0e/_1e ej2e/_3e ej4e/_5e ej6e/_7e ej8e/_9ej:Z:e:e/Gddde/Z;ejZ>e>e=Gddde;Z?ej@Z@e@e?Gddde;ZAejBZBeBeAGddde;ZCejDZDeDeCGddde;ZEejFZFeFeEGddde=ZGejHZHeHeGGdddeGZIejJZJeJeIGd d!d!eGZKejLZLeLeKGd"d#d#eGZMejNZNeNeMGd$d%d%eGZOejPZPePeOGd&d'd'eGZQejRZReReQGd(d)d)eQZSejTZTeTeSGd*d+d+e=ZUejVZVeVeUGd,d-d-e=ZWejXZXeXeWGd.d/d/e=ZYejZZZeZeYGd0d1d1e=Z[ej\Z\e\e[Gd2d3d3e[Z]ej^Z^e^e]Gd4d5d5e=Z_ej`Z`e`e_Gd6d7d7e=ZaejbZbebeaGd8d9d9e=ZcejdZdedecGd:d;d;e=ZeejfZfefeeGdd?d?eGZiejjZjejeid@dAZkejkZkdBdCZlejlZldDdEZmejmZmdFdGZnejnZnejoZoejpZpejqZqejrZrejsZsejtZtejuZuejvZvejwZwejxZxejyZyejzZzej{Z{ej|Z|ej}Z}ej~Z~ejZejZejZejZejZejZejZGdHdIdIe Ze eje_e eje_9e eje_"e eje_$e eje_e eje_e eje_ejZeeGdJdKdKe Ze eje_e eje_e eje_e eje_e eje_e eje_e eje_9e eje_"e eje_$e eje_e eje_e eje_ejZeeGdLdMdMe Ze eje_e eje_e eje_e eje_e eje_e eje_e eje_9e eje_"e eje_$e eje_e eje_e eje_ejZeeGdNdOdOe Ze eje_e eje_e eje_e eje_e eje_9e eje_"e eje_$e eje_e ej¡e_e ejġe_ejZeeGdPdQdQe Ze ejǡe_e ejȡe_e ejʡe_e ej̡e_e ejΡe_e ejСe_e ejҡe_e ejԡe_e ej֡e_e ejءe_e ejڡe_e ejܡe_e ejޡe_e eje_e eje_e eje_e eje_e eje_e eje_e eje_e eje_e eje_9ejZeeƃdRdSZejZGdTdUdUe Ze eje_e eje_e eje_e eje_e eje_e eje_e eje_e eje_ejZeeGdVdWdWe Ze eje_e eje_e ej e_ e ej e_ e ej e_e eje_e eje_e eje_1e eje_e eje_e eje_9ejZeedXdYZejZGdZd[d[e Ze eje_e eje_9ejZeeGd\d]d]e Ze ej e_e ej!e_"e ej#e_9ej$Z$e$ed^d_Z%ej%Z%Gd`dadae Z&e ej'e&_(e ej)e&_*e ej+e&_,e ej-e&_.e ej/e&_0e ej1e&_2e ej3e&_4e ej5e&_6e ej7e&_8e ej9e&_:e ej;e&_e ej?e&_e ej@e&_Ae ejBe&_9ejCZCeCe&Gdbdcdce ZDe ejEeD_Fe ejGeD_e ejHeD_Ie ejJeD_Ke ejLeD_Me ejNeD_Oe ejPeD_Qe ejReD_Se ejTeD_Ue ejVeD_We ejXeD_Ye ejZeD_[e ej\eD_]e ej^eD__e ej`eD_ae ejbeD_e ejceD_de ejeeD_fe ejgeD_he ejieD_9e ejjeD_e ejkeD_.e ejleD_me ejneD_oejpZpepeDGdddedee Zqe ejreq_se ejteq_.e ejueq_ve ejweq_xe ejyeq_ze ej{eq_|e ej}eq_~e ejeq_9e ejeq_"e ejeq_$e ejeq_e ejeq_e ejeq_e ejeq_ejZeeqGdfdgdge Ze eje_ae eje_e eje_e eje_de eje_fe eje_he eje_9ejZeeGdhdidie Ze eje_ve eje_9e eje_"e eje_$e eje_e eje_e eje_e eje_ejZeedjdkZ"ej"Z"dldmZejZdndoZejZdpdqZejZdrdsZejZdtduZ*ej*Z*Gdvdwdwe Ze eje_ae eje_e eje_e eje_e eje_e eje_9ejZeeGdxdydye Ze eje_ejZeeGdzd{d{e Ze eje_e eje_e eje_e eje_e eje_e eje_e eje_e eje_e eje_e eje_e ejáe_e ejše_e ejǡe_e ejɡe_e ejˡe_e ej͡e_e ejϡe_e ejѡe_e ejӡe_e ejաe_e ejסe_e ej١e_9ejڐZڐeڐeGd|d}d}e Ze ejܡeې_e ejݡeې_ejߐZߐeߐeۃGd~ddeۃZejZeeGdddeۃZejZeeGddde Ze eje_e eje_ejZeeGdddeZe eje_ejZeeejZejZejZGddde Ze eje_e eje_9e eje_ejZeeGdddeZe eje_ejZeeGddde Ze eje_e eje_e eje_ejZeeGdddeZejZeeGdddeZejZeeGddde Ze eje_e eje_ejZeeGdddeZejZeeGdddeZejZeeGdddeZ ej Z e e Gddde Z e ej e _e ej e _ejZee Gddde Ze eje_(e eje_4e eje_*e eje_e eje_e eje_0e eje_e eje_e eje_e eje_e ej e_!e ej"e_#e ej$e_%e ej&e_'e ej(e_)e ej*e_+e ej,e_-e ej.e_/e ej0e_9ej1Z1e1eddZ2ej2Z2ddZ3ej3Z3GdddeZ4e ej5e4_e ej6e4_ej7Z7e7e4Gddde Z8e ej9e8_:e ej;e8_e ej?e8_@e ejAe8_BejCZCeCe8Gddde8ZDejEZEeEeDGddde8ZFejGZGeGeFGddde8ZHejIZIeIeHGddde8ZJejKZKeKeJGddde8ZLejMZMeMeLGddde8ZNejOZOeOeNGddde8ZPejQZQeQePGddde8ZRejSZSeSeRGddde8ZTejUZUeUeTGddde8ZVejWZWeWeVGddde8ZXejYZYeYeXGddde8ZZej[Z[e[eZGddde8Z\ej]Z]e]e\Gddde8Z^ej_Z_e_e^Gddde8Z`e ejae`_bejcZcece`GddÄde Zde ejeed_fe ejged_he ejied_je ejked_le ejmed_ne ejoed_pe ejqed_re ejsed_te ejued_vejwZwewedGddńde Zxe ejyex_ze ej{ex_|e ej}ex_~e ejex_e ejex_e ejex_ve ejex_e ejex_e ejex_e ejex_e ejex_e ejex_:e ejex_be ejex_9e ejex_ejZeexGddDŽdǐexZe eje_ze eje_|e eje_~e eje_e eje_e eje_e eje_e eje_e eje_be eje_e eje_e eje_e eje_e eje_e eje_e eje_e eje_ejZeeGddɄdɐeZe eje_ve eje_:e eje_be eje_9ejZeeGdd˄dːeZejZeeGdd̈́d͐eZe eje_e eje_e eje_ejZeeGddτdϐexZejZeeGddфde Ze eje_e eje_:e eje_e eje_9e eje_ejZeeGddӄdӐeZe ejġeÐ_e ejơeÐ_e ejȡeÐ_e ejʡeÐ_e ej̡eÐ_ejΐZΐeΐeÃddՄZejϐZddׄZejАZGddلde Ze ejҡeѐ_e ejԡe_e ejաe_9ej֐Z֐e֐eуGddۄde Ze ejءe_"e ej١e_e ejڡeא_e ejܡe_ejݐZݐeݐe׃Gdd݄de Ze ejߡeސ_e ejeސ_e ejeސ_ae ejeސ_e ejeސ_e ejeސ_e eje_e eje_9ejZeeރdd߄Z$ej$Z$Gddde Ze eje_e eje_e eje_:ejZeeGdddeZejZeeGdddeZejZeeGdddeZejZeeGddde Ze eje_e eje_ae eje_e eje_e eje_9e eje_e eje_e eje_e eje_e eje_e eje_e ej e_e ej e_ e ej e_ e eje_e eje_e eje_e eje_e eje_e eje_e eje_e eje_e eje_e eje_ e ej!e_"e ej#e_$e ej%e_&e ej'e_(e ej)e_*e ej+e_,e ej-e_e ej.e_e ej/e_0e ej1e_.e ej2e_3e ej4e_5e ej6e_7e ej8e_9e ej:e_;e ej<e_=e ej>e_?e ej@e_Ae ejBe_Ce ejDe_Ee ejFe_Ge ejHe_Ie ejJe_Ke ejLe_rejMZMeMed^ddZNejNZNGdddeZOe ejPeO_Qe ejReO_Se ejTeO_Ue ejVeO_We ejXeO_Ye ejZeO_e ej[eO_\e ej]eO_^e ej_eO_`e ejaeO_be ejceO_de ejeeO_fe ejgeO_he ejieO_jejkZkekeOddZlddZmdZnGddde ZoGddde ZpddZqeqeD_rddeD_sddZteteD_ueteD_vGddde ZwGddde ZxddZyeye_rdde_sGddde ZzGddde Z{d d Z|e|e_}d d Z~e~e_rd_d dZee_ree_ddZee_ddZee_ddZee_d`ddZee_d`ddZee_ddZeeƐ_reeƐ_ddZee_ddZee_d d!ZeeÐ_[d"d!ZeeÐ_[ejZd#d$Zee_[ejZdad%d&Zeje_ee_[ejZd'd(Zeje_ee_[ej-Zd)d*Zeje_ee_-[ej+Zd+d,Zeje_ee_+[ejZd-d.Zeje_ee_[ej!Zdbd0d1Zeje_ee_![ej*Zd2d3Zeje_ee_*[e&j*Zd4d5Zeje_ee&_*[ejƐZd6d7Zeje_ee_Ɛ[ejʐZd8d9Zeje_ee_ʐ[ejΐZd:d;Zeje_ee_ΐ[Gd<d=d=e ZGd>d?d?e Zd@dAZee_GdBdCdCe ZdDdEZee_GdFdGdGe ZGdHdIdIe ZdJdKZeeƐ_GdLdMdMe ZGdNdOdOe ZdPd!Zee_[GdQdRdRe ZdSdTZeeސ_r[[אejZdUdVZejje_ee_ejZdWdXZejje_ee_ejZdYdZZejje_ee_[[[%ede_ee_gZÐeăD])ZŐeŐƐd[sweŐǐd\sweŐǐd]ryqYeÐešqYeȐeÃZdS(ca Xapian is a highly adaptable toolkit which allows developers to easily add advanced indexing and search facilities to their own applications. It has built-in support for several families of weighting models and also supports a rich set of boolean query operators. In addition to the doc strings provided by this python library, you may wish to look at the library's overall documentation, either installed along with the bindings or online at , as well as the library's documentation, possibly installed with the library or with its development files, or again online at . )_xapiancCsf|dkr |j|S|dkrt|jdkr||j|<dS|j|d}|r*|||St|||dS)Nthisownthis SwigPyObject) rowntype__name____dict____swig_setmethods__getobject __setattr__)self class_typenamevaluemethodr1/usr/lib/python3/dist-packages/xapian/__init__.py _swig_setattrs   rcCs>|dkr |jS|j|d}|r||Std|j|f)Nrz!'%s' object has no attribute '%s')rr__swig_getmethods__r AttributeErrorr)rrrrrrr _swig_getattr)s  rcCs4d}t|jdrd|j}d|jj|jj|fS)N__repr__z proxy of z <%s.%s; %s >)hasattrrr __class__ __module__r)rstrthisrrr _swig_repr2s r)proxyz1.4.18c@s<eZdZeddddddZddZeZej Z dd Z d S) SwigPyIteratorcC |jSNrrxrrrB zSwigPyIterator.cC |j|Sr$r%r'vrrrr(B The membership flagdoccOtdNz*No constructor defined - class is abstractrrargskwargsrrr__init__DzSwigPyIterator.__init__cC|Sr$rrrrr__iter__HzSwigPyIterator.__iter__N) rr __qualname__propertyrr7rrrdelete_SwigPyIterator__swig_destroy__r;rrrrr"As  r"c@sZeZdZdZiZddZiZddZddZe Z ddZ d d Z d d Z d dZejZdS)Errorz All exceptions thrown by Xapian are subclasses of Xapian::Error. This class can not be instantiated directly - instead a subclass should be used. cCt|t||Sr$)rrArrrrrrr(hzError.cC t|t|Sr$)rrArrrrrr(jr-cOr1NzNo constructor definedr3r4rrrr7lr8zError.__init__cC t|S)z{ The type of this error (e.g. "DocNotFoundError".) const char* Xapian::Error::get_type() const )rError_get_typer:rrrget_typep zError.get_typecCrH)z Message giving details of the error, intended for human consumption. const std::string& Xapian::Error::get_msg() const )r Error_get_msgr:rrrget_msg{rKz Error.get_msgcCrH)a Optional context information. const std::string& Xapian::Error::get_context() const This context is intended for use by Xapian::ErrorHandler (for example so it can know which remote server is unreliable and report the problem and remove that server from those being searched). But it's typically a plain-text string, and so also fit for human consumption. )rError_get_contextr:rrr get_context zError.get_contextcCrH)aN Returns any system error string associated with this exception. const char* Xapian::Error::get_error_string() const The system error string may come from errno, h_errno (on UNIX), or GetLastError() (on MS Windows). If there is no associated system error string, NULL is returned. )rError_get_error_stringr:rrrget_error_string zError.get_error_stringN)rrr=__doc__r r r __getattr__r7rrrJrMrOrRr delete_Errorr@rrrrrA]s    rAc@veZdZdZiZefD] Zeeediq ddZ iZ efD] Ze eediq ddZ ddZ e ZejZd S) LogicErrorz The base class for exceptions indicating errors in the program logic. A subclass of LogicError will be thrown if Xapian detects a violation of a class invariant or a logical precondition or postcondition, etc. r cCrBr$)rrXrCrrrr(rDzLogicError.rcCrEr$)rrXrFrrrr(r-cOr1rGr3r4rrrr7r8zLogicError.__init__N)rrr=rTr rA_supdategetattrr rrUr7rrrdelete_LogicErrorr@rrrrrXs   rXc@rW) RuntimeErroraM The base class for exceptions indicating errors only detectable at runtime. A subclass of RuntimeError will be thrown if Xapian detects an error which is exception derived from RuntimeError is thrown when an error is caused by problems with the data or environment rather than a programming mistake. r cCrBr$)rr]rCrrrr(rDzRuntimeError.rcCrEr$)rr]rFrrrr(r-cOr1rGr3r4rrrr7r8zRuntimeError.__init__N)rrr=rTr rArYrZr[r rrUr7rrrdelete_RuntimeErrorr@rrrrr]s   r]c@veZdZdZiZefD] Zeeediq ddZ iZ efD] Ze eediq ddZ e Z ddZejZd S) AssertionErroraN AssertionError is thrown if a logical assertion inside Xapian fails. In a debug build of Xapian, a failed assertion in the core library code will cause AssertionError to be thrown. This represents a bug in Xapian (either an invariant, precondition, etc has been violated, or the assertion is incorrect!) r cCrBr$)rr`rCrrrr(rDzAssertionError.rcCrEr$)rr`rFrrrr(r-cGt|tj|dS)ab Construct from message and errno value. Xapian::AssertionError::AssertionError(const std::string &msg_, int errno_) Parameters: ----------- msg_: Message giving details of the error, intended for human consumption. errno_: Optional errno value associated with this error. N)rAssertionError_swiginitnew_AssertionErrorrr5rrrr7zAssertionError.__init__N)rrr=rTr rXrYrZr[r rrUrrr7rdelete_AssertionErrorr@rrrrr`s   r`c@r_) InvalidArgumentErrorza InvalidArgumentError indicates an invalid parameter value was passed to the API. r cCrBr$)rrgrCrrrr(rDzInvalidArgumentError.rcCrEr$)rrgrFrrrr("r-cGra)an Construct from message and errno value. Xapian::InvalidArgumentError::InvalidArgumentError(const std::string &msg_, int errno_) Parameters: ----------- msg_: Message giving details of the error, intended for human consumption. errno_: Optional errno value associated with this error. N)rInvalidArgumentError_swiginitnew_InvalidArgumentErrorrdrrrr7%rezInvalidArgumentError.__init__N)rrr=rTr rXrYrZr[r rrUrrr7rdelete_InvalidArgumentErrorr@rrrrrg   rgc@r_) InvalidOperationErrorzP InvalidOperationError indicates the API was used in an invalid way. r cCrBr$)rrlrCrrrr(ErDzInvalidOperationError.rcCrEr$)rrlrFrrrr(Ir-cGra)ap Construct from message and errno value. Xapian::InvalidOperationError::InvalidOperationError(const std::string &msg_, int errno_) Parameters: ----------- msg_: Message giving details of the error, intended for human consumption. errno_: Optional errno value associated with this error. N)rInvalidOperationError_swiginitnew_InvalidOperationErrorrdrrrr7LrezInvalidOperationError.__init__N)rrr=rTr rXrYrZr[r rrUrrr7rdelete_InvalidOperationErrorr@rrrrrl;   rlc@r_) UnimplementedErrorzY UnimplementedError indicates an attempt to use an unimplemented feature. r cCrBr$)rrqrCrrrr(mrDzUnimplementedError.rcCrEr$)rrqrFrrrr(qr-cGra)aj Construct from message and errno value. Xapian::UnimplementedError::UnimplementedError(const std::string &msg_, int errno_) Parameters: ----------- msg_: Message giving details of the error, intended for human consumption. errno_: Optional errno value associated with this error. N)rUnimplementedError_swiginitnew_UnimplementedErrorrdrrrr7trezUnimplementedError.__init__N)rrr=rTr rXrYrZr[r rrUrrr7rdelete_UnimplementedErrorr@rrrrrqbrkrqc@r_) DatabaseErrorzI DatabaseError indicates some sort of database related error. r cCrBr$)rrurCrrrr(rDzDatabaseError.rcCrEr$)rrurFrrrr(r-cGra)a` Construct from message and errno value. Xapian::DatabaseError::DatabaseError(const std::string &msg_, int errno_) Parameters: ----------- msg_: Message giving details of the error, intended for human consumption. errno_: Optional errno value associated with this error. N)rDatabaseError_swiginitnew_DatabaseErrorrdrrrr7rezDatabaseError.__init__N)rrr=rTr r]rYrZr[r rrUrrr7rdelete_DatabaseErrorr@rrrrrurpruc@r_) DatabaseCorruptErrorzM DatabaseCorruptError indicates database corruption was detected. r cCrBr$)rryrCrrrr(rDzDatabaseCorruptError.rcCrEr$)rryrFrrrr(r-cGra)an Construct from message and errno value. Xapian::DatabaseCorruptError::DatabaseCorruptError(const std::string &msg_, int errno_) Parameters: ----------- msg_: Message giving details of the error, intended for human consumption. errno_: Optional errno value associated with this error. N)rDatabaseCorruptError_swiginitnew_DatabaseCorruptErrorrdrrrr7rezDatabaseCorruptError.__init__N)rrr=rTr rurYrZr[r rrUrrr7rdelete_DatabaseCorruptErrorr@rrrrryrpryc@r_) DatabaseCreateErrorzJ DatabaseCreateError indicates a failure to create a database. r cCrBr$)rr}rCrrrr(rDzDatabaseCreateError.rcCrEr$)rr}rFrrrr(r-cGra)al Construct from message and errno value. Xapian::DatabaseCreateError::DatabaseCreateError(const std::string &msg_, int errno_) Parameters: ----------- msg_: Message giving details of the error, intended for human consumption. errno_: Optional errno value associated with this error. N)rDatabaseCreateError_swiginitnew_DatabaseCreateErrorrdrrrr7rezDatabaseCreateError.__init__N)rrr=rTr rurYrZr[r rrUrrr7rdelete_DatabaseCreateErrorr@rrrrr}rpr}c@r_) DatabaseLockErrorzD DatabaseLockError indicates failure to lock a database. r cCrBr$)rrrCrrrr( rDzDatabaseLockError.rcCrEr$)rrrFrrrr( r-cGra)ah Construct from message and errno value. Xapian::DatabaseLockError::DatabaseLockError(const std::string &msg_, int errno_) Parameters: ----------- msg_: Message giving details of the error, intended for human consumption. errno_: Optional errno value associated with this error. N)rDatabaseLockError_swiginitnew_DatabaseLockErrorrdrrrr7rezDatabaseLockError.__init__N)rrr=rTr rurYrZr[r rrUrrr7rdelete_DatabaseLockErrorr@rrrrrrprc@r_) DatabaseModifiedErrorz DatabaseModifiedError indicates a database was modified. To recover after catching this error, you need to call Xapian::Database::reopen() on the Database and repeat the operation which failed. r cCrBr$)rrrCrrrr(4rDzDatabaseModifiedError.rcCrEr$)rrrFrrrr(8r-cGra)ap Construct from message and errno value. Xapian::DatabaseModifiedError::DatabaseModifiedError(const std::string &msg_, int errno_) Parameters: ----------- msg_: Message giving details of the error, intended for human consumption. errno_: Optional errno value associated with this error. N)rDatabaseModifiedError_swiginitnew_DatabaseModifiedErrorrdrrrr7;rezDatabaseModifiedError.__init__N)rrr=rTr rurYrZr[r rrUrrr7rdelete_DatabaseModifiedErrorr@rrrrr&   rc@r_) DatabaseOpeningErrorzG DatabaseOpeningError indicates failure to open a database. r cCrBr$)rrrCrrrr([rDzDatabaseOpeningError.rcCrEr$)rrrFrrrr(_r-cGra)an Construct from message and errno value. Xapian::DatabaseOpeningError::DatabaseOpeningError(const std::string &msg_, int errno_) Parameters: ----------- msg_: Message giving details of the error, intended for human consumption. errno_: Optional errno value associated with this error. N)rDatabaseOpeningError_swiginitnew_DatabaseOpeningErrorrdrrrr7brezDatabaseOpeningError.__init__N)rrr=rTr rurYrZr[r rrUrrr7rdelete_DatabaseOpeningErrorr@rrrrrQrprc@r_) DatabaseVersionErrora DatabaseVersionError indicates that a database is in an unsupported format. From time to time, new versions of Xapian will require the database format to be changed, to allow new information to be stored or new optimisations to be performed. Backwards compatibility will sometimes be maintained, so that new versions of Xapian can open old databases, but in some cases Xapian will be unable to open a database because it is in too old (or new) a format. This can be resolved either be upgrading or downgrading the version of Xapian in use, or by rebuilding the database from scratch with the current version of Xapian. r cCrBr$)rrrCrrrr(rDzDatabaseVersionError.rcCrEr$)rrrFrrrr(r-cGra)an Construct from message and errno value. Xapian::DatabaseVersionError::DatabaseVersionError(const std::string &msg_, int errno_) Parameters: ----------- msg_: Message giving details of the error, intended for human consumption. errno_: Optional errno value associated with this error. N)rDatabaseVersionError_swiginitnew_DatabaseVersionErrorrdrrrr7rezDatabaseVersionError.__init__N)rrr=rTr rrYrZr[r rrUrrr7rdelete_DatabaseVersionErrorr@rrrrrxs   rc@r_) DocNotFoundErrorzS Indicates an attempt to access a document not present in the database. r cCrBr$)rrrCrrrr(rDzDocNotFoundError.rcCrEr$)rrrFrrrr(r-cGra)af Construct from message and errno value. Xapian::DocNotFoundError::DocNotFoundError(const std::string &msg_, int errno_) Parameters: ----------- msg_: Message giving details of the error, intended for human consumption. errno_: Optional errno value associated with this error. N)rDocNotFoundError_swiginitnew_DocNotFoundErrorrdrrrr7rezDocNotFoundError.__init__N)rrr=rTr r]rYrZr[r rrUrrr7rdelete_DocNotFoundErrorr@rrrrrrkrc@r_) FeatureUnavailableErrorz Indicates an attempt to use a feature which is unavailable. Typically a feature is unavailable because it wasn't compiled in, or because it requires other software or facilities which aren't available. r cCrBr$)rrrCrrrr(rDz FeatureUnavailableError.rcCrEr$)rrrFrrrr(r-cGra)at Construct from message and errno value. Xapian::FeatureUnavailableError::FeatureUnavailableError(const std::string &msg_, int errno_) Parameters: ----------- msg_: Message giving details of the error, intended for human consumption. errno_: Optional errno value associated with this error. N)r FeatureUnavailableError_swiginitnew_FeatureUnavailableErrorrdrrrr7rez FeatureUnavailableError.__init__N)rrr=rTr r]rYrZr[r rrUrrr7rdelete_FeatureUnavailableErrorr@rrrrrrrc@r_) InternalErrorzD InternalError indicates a runtime problem of some sort. r cCrBr$)rrrCrrrr(rDzInternalError.rcCrEr$)rrrFrrrr( r-cGra)a` Construct from message and errno value. Xapian::InternalError::InternalError(const std::string &msg_, int errno_) Parameters: ----------- msg_: Message giving details of the error, intended for human consumption. errno_: Optional errno value associated with this error. N)rInternalError_swiginitnew_InternalErrorrdrrrr7rezInternalError.__init__N)rrr=rTr r]rYrZr[r rrUrrr7rdelete_InternalErrorr@rrrrrrprc@r_) NetworkErrorzF Indicates a problem communicating with a remote database. r cCrBr$)rrrCrrrr(.rDzNetworkError.rcCrEr$)rrrFrrrr(2r-cGra)a^ Construct from message and errno value. Xapian::NetworkError::NetworkError(const std::string &msg_, int errno_) Parameters: ----------- msg_: Message giving details of the error, intended for human consumption. errno_: Optional errno value associated with this error. N)rNetworkError_swiginitnew_NetworkErrorrdrrrr75rezNetworkError.__init__N)rrr=rTr r]rYrZr[r rrUrrr7rdelete_NetworkErrorr@rrrrr$rprc@r_) NetworkTimeoutErrorzX Indicates a timeout expired while communicating with a remote database. r cCrBr$)rrrCrrrr(VrDzNetworkTimeoutError.rcCrEr$)rrrFrrrr(Zr-cGra)al Construct from message and errno value. Xapian::NetworkTimeoutError::NetworkTimeoutError(const std::string &msg_, int errno_) Parameters: ----------- msg_: Message giving details of the error, intended for human consumption. errno_: Optional errno value associated with this error. N)rNetworkTimeoutError_swiginitnew_NetworkTimeoutErrorrdrrrr7]rezNetworkTimeoutError.__init__N)rrr=rTr rrYrZr[r rrUrrr7rdelete_NetworkTimeoutErrorr@rrrrrKrkrc@r_) QueryParserErrorz6 Indicates a query string can't be parsed. r cCrBr$)rrrCrrrr(}rDzQueryParserError.rcCrEr$)rrrFrrrr(r-cGra)af Construct from message and errno value. Xapian::QueryParserError::QueryParserError(const std::string &msg_, int errno_) Parameters: ----------- msg_: Message giving details of the error, intended for human consumption. errno_: Optional errno value associated with this error. N)rQueryParserError_swiginitnew_QueryParserErrorrdrrrr7rezQueryParserError.__init__N)rrr=rTr r]rYrZr[r rrUrrr7rdelete_QueryParserErrorr@rrrrrsrprc@r_) SerialisationErrorzN Indicates an error in the std::string serialisation of an object. r cCrBr$)rrrCrrrr(rDzSerialisationError.rcCrEr$)rrrFrrrr(r-cGra)aj Construct from message and errno value. Xapian::SerialisationError::SerialisationError(const std::string &msg_, int errno_) Parameters: ----------- msg_: Message giving details of the error, intended for human consumption. errno_: Optional errno value associated with this error. N)rSerialisationError_swiginitnew_SerialisationErrorrdrrrr7rezSerialisationError.__init__N)rrr=rTr r]rYrZr[r rrUrrr7rdelete_SerialisationErrorr@rrrrrrprc@r_) RangeErrorz] RangeError indicates an attempt to access outside the bounds of a container. r cCrBr$)rrrCrrrr(rDzRangeError.rcCrEr$)rrrFrrrr(r-cGra)aR Construct from message and errno value. Xapian::RangeError::RangeError(const std::string &msg_, int errno_) Parameters: ----------- msg_: Message giving details of the error, intended for human consumption. errno_: Optional errno value associated with this error. N)rRangeError_swiginitnew_RangeErrorrdrrrr7zRangeError.__init__N)rrr=rTr r]rYrZr[r rrUrrr7rdelete_RangeErrorr@rrrrrs   rc@r_) WildcardErrorzK WildcardError indicates an error expanding a wildcarded query. r cCrBr$)rrrCrrrr(rDzWildcardError.rcCrEr$)rrrFrrrr(r-cGra)a` Construct from message and errno value. Xapian::WildcardError::WildcardError(const std::string &msg_, int errno_) Parameters: ----------- msg_: Message giving details of the error, intended for human consumption. errno_: Optional errno value associated with this error. N)rWildcardError_swiginitnew_WildcardErrorrdrrrr7rezWildcardError.__init__N)rrr=rTr r]rYrZr[r rrUrrr7rdelete_WildcardErrorr@rrrrrrprc@r_) DatabaseNotFoundErrorzC Indicates an attempt to access a database not present. r cCrBr$)rrrCrrrr(rDzDatabaseNotFoundError.rcCrEr$)rrrFrrrr(r-cGra)ap Construct from message and errno value. Xapian::DatabaseNotFoundError::DatabaseNotFoundError(const std::string &msg_, int errno_) Parameters: ----------- msg_: Message giving details of the error, intended for human consumption. errno_: Optional errno value associated with this error. N)rDatabaseNotFoundError_swiginitnew_DatabaseNotFoundErrorrdrrrr7 rezDatabaseNotFoundError.__init__N)rrr=rTr rrYrZr[r rrUrrr7rdelete_DatabaseNotFoundErrorr@rrrrrrprc@r_) DatabaseClosedErrorz> Indicates an attempt to access a closed database. r cCrBr$)rrrCrrrr(@rDzDatabaseClosedError.rcCrEr$)rrrFrrrr(Dr-cGra)al Construct from message and errno value. Xapian::DatabaseClosedError::DatabaseClosedError(const std::string &msg_, int errno_) Parameters: ----------- msg_: Message giving details of the error, intended for human consumption. errno_: Optional errno value associated with this error. N)rDatabaseClosedError_swiginitnew_DatabaseClosedErrorrdrrrr7GrezDatabaseClosedError.__init__N)rrr=rTr rurYrZr[r rrUrrr7rdelete_DatabaseClosedErrorr@rrrrr6rprcCtSr$)rversion_stringrrrrr^r8rcCrr$)r major_versionrrrrrbr8rcCrr$)r minor_versionrrrrrfr8rcCrr$)rrevisionrrrrrjr8rc@HeZdZdZeddddddZeZddZe j Z d d Z d d Z d S)_PositionIteratorz5 Class for iterating over term positions. cCr#r$r%r&rrrr(r)z_PositionIterator.cCr*r$r%r+rrrr(r-r.r/cCt|tdS)z Default constructor. Xapian::PositionIterator::PositionIterator() Creates an uninitialised iterator, which can't be used before being assigned to, but is sometimes syntactically convenient. N)r_PositionIterator_swiginitnew__PositionIteratorr:rrrr7 z_PositionIterator.__init__cC t||S)aq Advance the iterator to term position termpos. void Xapian::PositionIterator::skip_to(Xapian::termpos termpos) Parameters: ----------- termpos: The position to advance to. If this position isn't in the stream being iterated, then the iterator is moved to the next term position after it which is. )r_PositionIterator_skip_tortermposrrrskip_to z_PositionIterator.skip_tocCrH)z Return a string describing this object. std::string Xapian::PositionIterator::get_description() const )r_PositionIterator___str__r:rrr__str__rKz_PositionIterator.__str__N)rrr=rTr>rrrr7rdelete__PositionIteratorr@rrrrrrrs  rc@peZdZdZeddddddZeZddZe j Z d d Z d d Z d dZddZddZddZddZdS)_PostingIterator6 Class for iterating over a list of terms. cCr#r$r%r&rrrr(r)z_PostingIterator.cCr*r$r%r+rrrr(r-r.r/cCr)z Default constructor. Xapian::PostingIterator::PostingIterator() Creates an uninitialised iterator, which can't be used before being assigned to, but is sometimes syntactically convenient. N)r_PostingIterator_swiginitnew__PostingIteratorr:rrrr7rz_PostingIterator.__init__cCrH)z Return the wdf for the document at the current position. Xapian::termcount Xapian::PostingIterator::get_wdf() const )r_PostingIterator_get_wdfr:rrrget_wdfrKz_PostingIterator.get_wdfcCrH)z Return the length of the document at the current position. Xapian::termcount Xapian::PostingIterator::get_doclength() const )r_PostingIterator_get_doclengthr:rrr get_doclengthrKz_PostingIterator.get_doclengthcCrH)z Return the number of unique terms in the current document. Xapian::termcount Xapian::PostingIterator::get_unique_terms() const )r!_PostingIterator_get_unique_termsr:rrrget_unique_termsrKz!_PostingIterator.get_unique_termscCrH)z Return a PositionIterator for the current document. PositionIterator Xapian::PostingIterator::positionlist_begin() const )r$_PostingIterator__positionlist_beginr:rrr_positionlist_begin z$_PostingIterator._positionlist_begincCrH)z Return an end PositionIterator for the current document. PositionIterator Xapian::PostingIterator::positionlist_end() const )r"_PostingIterator__positionlist_endr:rrr_positionlist_endrKz"_PostingIterator._positionlist_endcCr)aa Advance the iterator to document did. void Xapian::PostingIterator::skip_to(Xapian::docid did) Parameters: ----------- did: The document id to advance to. If this document id isn't in the stream being iterated, then the iterator is moved to the next document id after it which is. )r_PostingIterator_skip_tordidrrrrrz_PostingIterator.skip_tocCrH)z Return a string describing this object. std::string Xapian::PostingIterator::get_description() const )r_PostingIterator___str__r:rrrr$rKz_PostingIterator.__str__N)rrr=rTr>rrrr7rdelete__PostingIteratorr@rrrrrrrrrrrrs      rc@r) _TermIteratorrcCr#r$r%r&rrrr(Dr)z_TermIterator.cCr*r$r%r+rrrr(Dr-r.r/cCr)z Default constructor. Xapian::TermIterator::TermIterator() Creates an uninitialised iterator, which can't be used before being assigned to, but is sometimes syntactically convenient. N)r_TermIterator_swiginitnew__TermIteratorr:rrrr7Grz_TermIterator.__init__cCrH)z Return the wdf for the term at the current position. Xapian::termcount Xapian::TermIterator::get_wdf() const )r_TermIterator_get_wdfr:rrrrUrKz_TermIterator.get_wdfcCrH)z Return the term frequency for the term at the current position. Xapian::doccount Xapian::TermIterator::get_termfreq() const )r_TermIterator_get_termfreqr:rrr get_termfreq`rKz_TermIterator.get_termfreqcCrH)z Return the length of the position list for the current position. Xapian::termcount Xapian::TermIterator::positionlist_count() const )r _TermIterator_positionlist_countr:rrrpositionlist_countkrKz _TermIterator.positionlist_countcCrH)z Return a PositionIterator for the current term. PositionIterator Xapian::TermIterator::positionlist_begin() const )r!_TermIterator__positionlist_beginr:rrrrvrKz!_TermIterator._positionlist_begincCrH)z Return an end PositionIterator for the current term. PositionIterator Xapian::TermIterator::positionlist_end() const )r_TermIterator__positionlist_endr:rrrrrKz_TermIterator._positionlist_endcCr)a Advance the iterator to term term. void Xapian::TermIterator::skip_to(const std::string &term) If the iteration is over an unsorted list of terms, then this method will throw Xapian::InvalidOperationError. Parameters: ----------- 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. )r_TermIterator_skip_tortermrrrr z_TermIterator.skip_tocCrH)z Return a string describing this object. std::string Xapian::TermIterator::get_description() const )r_TermIterator___str__r:rrrrrKz_TermIterator.__str__N)rrr=rTr>rrrr7rdelete__TermIteratorr@rrrrrrrrrrrr=s      rc@`eZdZdZeddddddZeZddZe j Z d d Z d d Z d dZddZddZdS)_ValueIteratorz6 Class for iterating over document values. cCr#r$r%r&rrrr(r)z_ValueIterator.cCr*r$r%r+rrrr(r-r.r/cCr)z Default constructor. Xapian::ValueIterator::ValueIterator() Creates an uninitialised iterator, which can't be used before being assigned to, but is sometimes syntactically convenient. N)r_ValueIterator_swiginitnew__ValueIteratorr:rrrr7rz_ValueIterator.__init__cCrH)z Return the docid at the current position. Xapian::docid Xapian::ValueIterator::get_docid() const If we're iterating over values of a document, this method will throw Xapian::InvalidOperationError. )r_ValueIterator_get_docidr:rrr get_docid z_ValueIterator.get_docidcCrH)a` Return the value slot number for the current position. Xapian::valueno Xapian::ValueIterator::get_valueno() const If the iterator is over all values in a slot, this returns that slot's number. If the iterator is over the values in a particular document, it returns the number of each slot in turn. )r_ValueIterator_get_valuenor:rrr get_valuenorSz_ValueIterator.get_valuenocCr)a Advance the iterator to document id or value slot docid_or_slot. void Xapian::ValueIterator::skip_to(Xapian::docid docid_or_slot) If this iterator is over values in a document, then this method advances the iterator to value slot docid_or_slot, or the first slot after it if there is no value in slot slot. If this iterator is over values in a particular slot, then this method advances the iterator to document id docid_or_slot, or the first document id after it if there is no value in the slot we're iterating over for document docid_or_slot. Note: The "two-faced" nature of this method is due to how C++ overloading works. Xapian::docid and Xapian::valueno are both typedefs for the same unsigned integer type, so overloading can't distinguish them. Parameters: ----------- docid_or_slot: The docid/slot to advance to. )r_ValueIterator_skip_to)r docid_or_slotrrrr z_ValueIterator.skip_tocCr)aI Check if the specified docid occurs. bool Xapian::ValueIterator::check(Xapian::docid docid) The caller is required to ensure that the specified document id did actually exists in the database. This method acts like skip_to() if that can be done at little extra cost, in which case it then returns true. This is how chert and glass databases behave because they store values in streams which allow for an efficient implementation of skip_to(). Otherwise it simply checks if a particular docid is present. If it is, it returns true. If it isn't, it returns false, and leaves the position unspecified (and hence the result of calling methods which depend on the current position, such as get_docid(), are also unspecified). In this state, next() will advance to the first matching position after document did, and skip_to() will act as it would if the position was the first matching position after document did. Currently the inmemory and remote backends behave in the latter way because they don't support streamed values and so skip_to() must check each document it skips over which is significantly slower. Parameters: ----------- docid: The document id to check. )r_ValueIterator_checkrdocidrrrcheck  !z_ValueIterator.checkcCrH)z Return a string describing this object. std::string Xapian::ValueIterator::get_description() const )r_ValueIterator___str__r:rrrr1rKz_ValueIterator.__str__N)rrr=rTr>rrrr7rdelete__ValueIteratorr@rrrrrrrrrrs  $rc@seZdZdZeddddddZeZddZe j Z d d Z d d Z d dZddZddZddZd7ddZd7ddZddZd7ddZd7ddZd d!Zd"d#Zd$d%Zd&d'Zd(d)Zd*d+Zd,d-Zd.d/Zd0d1Zd2d3Z e!e j"Z#d4d5Z$d6S)8Documentaa A handle representing a document in a Xapian database. The Document class fetches information from the database lazily. Usually this behaviour isn't visible to users (except for the speed benefits), but if the document in the database is modified or deleted, then preexisting Document objects may return the old or new versions of data (or throw Xapian::DocNotFoundError in the case of deletion). Since Database objects work on a snapshot of the database's state, the situation above can only happen with a WritableDatabase object, or if you call Database::reopen() on a Database object. We recommend you avoid designs where this behaviour is an issue, but if you need a way to make a non-lazy version of a Document object, you can do this like so:doc = Xapian::Document::unserialise(doc.serialise()); cCr#r$r%r&rrrr(^r)zDocument.cCr*r$r%r+rrrr(^r-r.r/cCr)zU Make a new empty Document. Xapian::Document::Document() N)rDocument_swiginit new_Documentr:rrrr7azDocument.__init__cCr)a/ Get value by number. std::string Xapian::Document::get_value(Xapian::valueno slot) const Returns an empty string if no value with the given number is present in the document. Parameters: ----------- slot: The number of the value. )rDocument_get_valuerslotrrr get_valuel zDocument.get_valuecCt|||S)a Add a new value. void Xapian::Document::add_value(Xapian::valueno slot, const std::string &value) The new value will replace any existing value with the same number (or if the new value is empty, it will remove any existing value with the same number). Parameters: ----------- slot: The value slot to add the value in. value: The value to set. )rDocument_add_value)rrrrrr add_valuezDocument.add_valuecCr)z Remove any value with the given number. void Xapian::Document::remove_value(Xapian::valueno slot) )rDocument_remove_valuerrrr remove_value zDocument.remove_valuecCrH)zs Remove all values associated with the document. void Xapian::Document::clear_values() )rDocument_clear_valuesr:rrr clear_valuesrKzDocument.clear_valuescCrH)a^ Get data stored in the document. std::string Xapian::Document::get_data() const This is potentially a relatively expensive operation, and shouldn't normally be used during the match (e.g. in a PostingSource or match decider functor. Put data for use by match deciders in a value instead. )rDocument_get_datar:rrrget_data zDocument.get_datacCr)ai Set data stored in the document. void Xapian::Document::set_data(const std::string &data) Xapian treats the data as an opaque blob. It may try to compress it, but other than that it will just store it and return it when requested. Parameters: ----------- data: The data to store. )rDocument_set_data)rdatarrrset_data zDocument.set_datarcCt||||S)ay Add an occurrence of a term at a particular position. void Xapian::Document::add_posting(const std::string &tname, Xapian::termpos tpos, Xapian::termcount wdfinc=1) Multiple occurrences of the term at the same position are represented only once in the positional information, but do increase the wdf. If the term is not already in the document, it will be added to it. Parameters: ----------- tname: The name of the term. tpos: The position of the term. wdfinc: The increment that will be applied to the wdf for this term. )rDocument_add_posting)rtnametposwdfincrrr add_postingszDocument.add_postingcCr)a Add a term to the document, without positional information. void Xapian::Document::add_term(const std::string &tname, Xapian::termcount wdfinc=1) Any existing positional information for the term will be left unmodified. Parameters: ----------- tname: The name of the term. wdfinc: The increment that will be applied to the wdf for this term (default: 1). )rDocument_add_term)rr&r(rrradd_termrzDocument.add_termcCr)a Add a boolean filter term to the document. void Xapian::Document::add_boolean_term(const std::string &term) This method adds term to the document with wdf of 0 - this is generally what you want for a term used for boolean filtering as the wdf of such terms is ignored, and it doesn't make sense for them to contribute to the document's length. If the specified term already indexes this document, this method has no effect. It is exactly the same as add_term(term, 0). This method was added in Xapian 1.0.18. Parameters: ----------- term: The term to add. )rDocument_add_boolean_termrrrradd_boolean_term zDocument.add_boolean_termcCr$)a Remove a posting of a term from the document. void Xapian::Document::remove_posting(const std::string &tname, Xapian::termpos tpos, Xapian::termcount wdfdec=1) Note that the term will still index the document even if all occurrences are removed. To remove a term from a document completely, use remove_term(). Parameters: ----------- tname: The name of the term. tpos: The position of the term. wdfdec: The decrement that will be applied to the wdf when removing this posting. The wdf will not go below the value of 0. Parameters: ----------- Xapian::InvalidArgumentError: will be thrown if the term is not at the position specified in the position list for this term in this document. Xapian::InvalidArgumentError: will be thrown if the term is not in the document )rDocument_remove_posting)rr&r'wdfdecrrrremove_postings!zDocument.remove_postingcCst|||||S)aj Remove a range of postings for a term. Xapian::termpos Xapian::Document::remove_postings(const std::string &term, Xapian::termpos term_pos_first, Xapian::termpos term_pos_last, Xapian::termcount wdf_dec=1) Any instances of the term at positions >= term_pos_first and <= term_pos_last will be removed, and the wdf reduced by wdf_dec for each instance removed (the wdf will not ever go below zero though). It's OK if the term doesn't occur in the range of positions specified (unlike remove_posting()). And if term_pos_first > term_pos_last, this method does nothing. The number of postings removed. Parameters: ----------- Xapian::InvalidArgumentError: will be thrown if the term is not in the document Added in Xapian 1.4.8. )rDocument_remove_postings)rrterm_pos_first term_pos_lastwdf_decrrrremove_postingsBzDocument.remove_postingscCr)ah Remove a term and all postings associated with it. void Xapian::Document::remove_term(const std::string &tname) Parameters: ----------- tname: The name of the term. Parameters: ----------- Xapian::InvalidArgumentError: will be thrown if the term is not in the document )rDocument_remove_termrr&rrr remove_terma zDocument.remove_termcCrH)zu Remove all terms (and postings) from the document. void Xapian::Document::clear_terms() )rDocument_clear_termsr:rrr clear_termswrKzDocument.clear_termscCrH)z The length of the termlist - i.e. Xapian::termcount Xapian::Document::termlist_count() const the number of different terms which index this document. )rDocument_termlist_countr:rrrtermlist_count zDocument.termlist_countcCrH)z| Iterator for the terms in this document. TermIterator Xapian::Document::termlist_begin() const )rDocument__termlist_beginr:rrr_termlist_beginrKzDocument._termlist_begincCrH)z Equivalent end iterator for termlist_begin(). TermIterator Xapian::Document::termlist_end() const )rDocument__termlist_endr:rrr _termlist_endrKzDocument._termlist_endcCrH)zy Count the values in this document. Xapian::termcount Xapian::Document::values_count() const )rDocument_values_countr:rrr values_countrKzDocument.values_countcCrH)z| Iterator for the values in this document. ValueIterator Xapian::Document::values_begin() const )rDocument__values_beginr:rrr _values_beginrKzDocument._values_begincCrH)z| Equivalent end iterator for values_begin(). ValueIterator Xapian::Document::values_end() const )rDocument__values_endr:rrr _values_endrKzDocument._values_endcCrH)a Get the document id which is associated with this document (if any). docid Xapian::Document::get_docid() const NB If multiple databases are being searched together, then this will be the document id in the individual database, not the merged database! If this document came from a database, return the document id in that database. Otherwise, return 0 (in Xapian 1.0.22/1.2.4 or later; prior to this the returned value was uninitialised). )rDocument_get_docidr:rrrr zDocument.get_docidcCrH)aO Serialise document into a string. std::string Xapian::Document::serialise() const The document representation may change between Xapian releases: even between minor versions. However, it is guaranteed not to change if the remote database protocol has not changed between releases. )rDocument_serialiser:rrr serialiserSzDocument.serialisecCrH)z{ Return a string describing this object. std::string Xapian::Document::get_description() const )rDocument___str__r:rrrrrKzDocument.__str__Nr)%rrr=rTr>rrrr7rdelete_Documentr@rrrrrr"r)r+r-r1r6r:r=r?rBrDrFrHrJrrN staticmethodDocument_unserialise unserialiserrrrrr Hs:       $         r cCrHr$)rrS serialisedrrrrS  rSc@sxeZdZdZeddddddZeZddZe j Z d d Z d d Z d dZddZddZddZddZddZdS)Registryz Registry for user subclasses. This class provides a way for the remote server to look up user subclasses when unserialising. cCr#r$r%r&rrrr(r)zRegistry.cCr*r$r%r+rrrr(r-r.r/cCr)z Default constructor. Xapian::Registry::Registry() The registry will contain all standard subclasses of user-subclassable classes. N)rRegistry_swiginit new_Registryr:rrrr7rzRegistry.__init__cCr)z Register a weighting scheme. void Xapian::Registry::register_weighting_scheme(const Xapian::Weight &wt) Parameters: ----------- wt: The weighting scheme to register. )r"Registry_register_weighting_schemerwtrrrregister_weighting_scheme+ z"Registry.register_weighting_schemecCr)a Get the weighting scheme given a name. const Xapian::Weight* Xapian::Registry::get_weighting_scheme(const std::string &name) const Parameters: ----------- name: The name of the weighting scheme to find. An object with the requested name, or NULL if the weighting scheme could not be found. The returned object is owned by the registry and so must not be deleted by the caller. )rRegistry_get_weighting_schemerFrrrget_weighting_scheme<rzRegistry.get_weighting_schemecCr)a Register a user-defined posting source class. void Xapian::Registry::register_posting_source(const Xapian::PostingSource &source) Parameters: ----------- source: The posting source to register. )r Registry_register_posting_source)rsourcerrrregister_posting_sourceQr_z Registry.register_posting_sourcecCr)a Get a posting source given a name. const Xapian::PostingSource* Xapian::Registry::get_posting_source(const std::string &name) const Parameters: ----------- name: The name of the posting source to find. An object with the requested name, or NULL if the posting source could not be found. The returned object is owned by the registry and so must not be deleted by the caller. )rRegistry_get_posting_sourcerFrrrget_posting_sourcebrzRegistry.get_posting_sourcecCr)z Register a user-defined match spy class. void Xapian::Registry::register_match_spy(const Xapian::MatchSpy &spy) Parameters: ----------- spy: The match spy to register. )rRegistry_register_match_spyrspyrrrregister_match_spyw zRegistry.register_match_spycCr)a Get a match spy given a name. const Xapian::MatchSpy* Xapian::Registry::get_match_spy(const std::string &name) const Parameters: ----------- name: The name of the match spy to find. An object with the requested name, or NULL if the match spy could not be found. The returned object is owned by the registry and so must not be deleted by the caller. )rRegistry_get_match_spyrFrrr get_match_spyrzRegistry.get_match_spycCr)z Register a user-defined lat-long metric class. void Xapian::Registry::register_lat_long_metric(const Xapian::LatLongMetric &metric) )r!Registry_register_lat_long_metric)rmetricrrrregister_lat_long_metric z!Registry.register_lat_long_metriccCr)a! Get a lat-long metric given a name. const Xapian::LatLongMetric* Xapian::Registry::get_lat_long_metric(const std::string &name) const The returned metric is owned by the registry object. Returns NULL if the metric could not be found. )rRegistry_get_lat_long_metricrFrrrget_lat_long_metricrkzRegistry.get_lat_long_metricN)rrr=rTr>rrrr7rdelete_Registryr@r^rardrfrjrmrprsrrrrrXs   rXc@seZdZdZeddddddZeZej Z ej Z ej ZejZejZejZejZejZejZejZejZejZ ej!Z"ej#Z$ej%Z&ej'Z(ej)Z*ej+Z,ej-Z.ej/Z0ej1Z2ddZ3d d Z4d d Z5d dZ6ddZ7ddZ8ddZ9e:ej;ZddZ?ddZ@ddZAdS) Queryz( Class representing a query. cCr#r$r%r&rrrr(r)zQuery.cCr*r$r%r+rrrr(r-r.r/cCrH)a Begin iterator for terms in the query object. const TermIterator Xapian::Query::get_terms_begin() const The iterator returns terms in ascending query position order, and will return the same term in each unique position it occurs in. If you want the terms in sorted order and without duplicates, see get_unique_terms_begin(). )rQuery__get_terms_beginr:rrr_get_terms_beginrzQuery._get_terms_begincCrH)z End iterator for terms in the query object. const TermIterator Xapian::Query::get_terms_end() const )rQuery__get_terms_endr:rrr_get_terms_endrKzQuery._get_terms_endcCrH)aB Begin iterator for unique terms in the query object. const TermIterator Xapian::Query::get_unique_terms_begin() const Terms are sorted and terms with the same name removed from the list. If you want the terms in ascending query position order, see get_terms_begin(). )rQuery_get_unique_terms_beginr:rrrget_unique_terms_beginrzQuery.get_unique_terms_begincCrH)z End iterator for unique terms in the query object. const TermIterator Xapian::Query::get_unique_terms_end() const )rQuery_get_unique_terms_endr:rrrget_unique_terms_end rKzQuery.get_unique_terms_endcCrH)zy Return the length of this query object. Xapian::termcount Xapian::Query::get_length() const )rQuery_get_lengthr:rrr get_length rKzQuery.get_lengthcCrH)zs Check if this query is Xapian::Query::MatchNothing. bool Xapian::Query::empty() const )r Query_emptyr:rrrempty" rKz Query.emptycCrH)zo Serialise this object into a string. std::string Xapian::Query::serialise() const )rQuery_serialiser:rrrrN- rKzQuery.serialisecCrH)zl Get the type of the top level of the query. op Xapian::Query::get_type() const )rQuery_get_typer:rrrrJ9 rKzQuery.get_typecCrH)z Get the number of subqueries of the top level query. size_t Xapian::Query::get_num_subqueries() const )rQuery_get_num_subqueriesr:rrrget_num_subqueriesD rKzQuery.get_num_subqueriescCr)a  Read a top level subquery. const Query Xapian::Query::get_subquery(size_t n) const Parameters: ----------- n: Return the n-th subquery (starting from 0) - only valid when 0 <= n < get_num_subqueries(). )rQuery_get_subquery)rnrrr get_subqueryO r_zQuery.get_subquerycCrH)zx Return a string describing this object. std::string Xapian::Query::get_description() const )r Query___str__r:rrrr` rKz Query.__str__cGra)z Construct with just an operator. Xapian::Query::Query(Query::op op_) Parameters: ----------- op_: The operator to use - currently only OP_INVALID is useful. N)rQuery_swiginit new_Queryrdrrrr7k  zQuery.__init__N)Brrr=rTr>rrrr Query_OP_ANDOP_AND Query_OP_OROP_ORQuery_OP_AND_NOT OP_AND_NOT Query_OP_XOROP_XORQuery_OP_AND_MAYBE OP_AND_MAYBEQuery_OP_FILTER OP_FILTER Query_OP_NEAROP_NEARQuery_OP_PHRASE OP_PHRASEQuery_OP_VALUE_RANGEOP_VALUE_RANGEQuery_OP_SCALE_WEIGHTOP_SCALE_WEIGHTQuery_OP_ELITE_SET OP_ELITE_SETQuery_OP_VALUE_GE OP_VALUE_GEQuery_OP_VALUE_LE OP_VALUE_LEQuery_OP_SYNONYM OP_SYNONYM Query_OP_MAXOP_MAXQuery_OP_WILDCARD OP_WILDCARDQuery_OP_INVALID OP_INVALIDQuery_WILDCARD_LIMIT_ERRORWILDCARD_LIMIT_ERRORQuery_WILDCARD_LIMIT_FIRSTWILDCARD_LIMIT_FIRST"Query_WILDCARD_LIMIT_MOST_FREQUENTWILDCARD_LIMIT_MOST_FREQUENT delete_Queryr@rwryr{r}rrrNrRQuery_unserialiserTrJrrrr7rrrrrusL       rucG tj|Sr$)rrr5rrrr rWrc@r)StemImplementationzD Class representing a stemming algorithm implementation. cCr#r$r%r&rrrr( r)zStemImplementation.cCr*r$r%r+rrrr( r-r.r/cC*|jtkrd}n|}t|t|dS)zc Default constructor. Xapian::StemImplementation::StemImplementation() N)rrrStemImplementation_swiginitnew_StemImplementationr_selfrrrr7  zStemImplementation.__init__cCrH)z Return a string describing this object. virtual std::string Xapian::StemImplementation::get_description() const =0 )rStemImplementation___str__r:rrrr rzStemImplementation.__str__cC|jt|t|Sr$)rdisownrdisown_StemImplementation weakref_proxyr:rrr __disown__   zStemImplementation.__disown__N)rrr=rTr>rrrr7rdelete_StemImplementationr@rrrrrrr s  rc@sReZdZdZeddddddZeZddZe j Z d d Z d d Z ee jZd S)Stemz5 Class representing a stemming algorithm. cCr#r$r%r&rrrr( r)z Stem.cCr*r$r%r+rrrr( r-r.r/cGra)as Construct a Xapian::Stem object with a user-provided stemming algorithm. Xapian::Stem::Stem(StemImplementation *p) You can subclass Xapian::StemImplementation to implement your own stemming algorithm (or to wrap a third-party algorithm) and then wrap your implementation in a Xapian::Stem object to pass to the Xapian API. Parameters: ----------- p: The user-subclassed StemImplementation object. This is reference counted, and so will be automatically deleted by the Xapian::Stem wrapper when no longer required. N)r Stem_swiginitnew_Stemrdrrrr7 z Stem.__init__cCrH)zh Return true if this is a no-op stemmer. bool Xapian::Stem::is_none() const )r Stem_is_noner:rrris_none rKz Stem.is_nonecCrH)zw Return a string describing this object. std::string Xapian::Stem::get_description() const )r Stem___str__r:rrrr rKz Stem.__str__N)rrr=rTr>rrrr7r delete_Stemr@rrrRStem_get_available_languagesget_available_languagesrrrrr s  rcCrr$)rrrrrrr r8rc@seZdZdZeddddddZeZddZe j Z d d Z d)d d Z ddZddZddZe jZe jZe jZe jZe jZe jZe jZe jZ e j!Z"e j#Z$ddZ%ddZ&ddZ'ddZ(ddZ)ddZ*d*d!d"Z+d#d$Z,d%d&Z-d'd(Z.d S)+ TermGeneratora% Parses a piece of text and generate terms. This module takes a piece of text and parses it to produce words which are then used to generate suitable terms for indexing. The terms generated are suitable for use with Query objects produced by the QueryParser class. cCr#r$r%r&rrrr( r)zTermGenerator.cCr*r$r%r+rrrr( r-r.r/cCr)zY Default constructor. Xapian::TermGenerator::TermGenerator() N)rTermGenerator_swiginitnew_TermGeneratorr:rrrr7 rzTermGenerator.__init__cCr)z Set the Xapian::Stem object to be used for generating stemmed terms. void Xapian::TermGenerator::set_stemmer(const Xapian::Stem &stemmer) )rTermGenerator_set_stemmerrstemmerrrr set_stemmer rqzTermGenerator.set_stemmerNcCr)a Set the Xapian::Stopper object to be used for identifying stopwords. void Xapian::TermGenerator::set_stopper(const Xapian::Stopper *stop=NULL) Stemmed forms of stopwords aren't indexed, but unstemmed forms still are so that searches for phrases including stop words still work. Parameters: ----------- stop: The Stopper object to set (default NULL, which means no stopwords). )rTermGenerator_set_stopperrstoprrr set_stopper rzTermGenerator.set_stoppercCr)z} Set the current document. void Xapian::TermGenerator::set_document(const Xapian::Document &doc) )rTermGenerator_set_document)rr0rrr set_document5 rqzTermGenerator.set_documentcCrH)z{ Get the current document. const Xapian::Document& Xapian::TermGenerator::get_document() const )rTermGenerator_get_documentr:rrr get_documentA rKzTermGenerator.get_documentcCr)z Set the database to index spelling data to. void Xapian::TermGenerator::set_database(const Xapian::WritableDatabase &db) )rTermGenerator_set_databaserdbrrr set_databaseL rqzTermGenerator.set_databasecGtj|g|RS)a Set flags. flags Xapian::TermGenerator::set_flags(flags toggle, flags mask=flags(0)) The new value of flags is: (flags & mask) ^ toggle To just set the flags, pass the new flags in toggle and the default value for mask. Parameters: ----------- toggle: Flags to XOR. mask: Flags to AND with first. The old flags setting. )rTermGenerator_set_flagsrdrrr set_flagsb zTermGenerator.set_flagscCr)a Set the stemming strategy. void Xapian::TermGenerator::set_stemming_strategy(stem_strategy strategy) This method controls how the stemming algorithm is applied. It was new in Xapian 1.3.1. Parameters: ----------- strategy: The strategy to use - possible values are: STEM_NONE: Don't perform any stemming - only unstemmed terms are generated. STEM_SOME: Generate both stemmed (with a "Z" prefix) and unstemmed terms. No positional information is stored for unstemmed terms. This is the default strategy. STEM_SOME_FULL_POS: Like STEM_SOME but positional information is stored for both stemmed and unstemmed terms. Added in Xapian 1.4.8. STEM_ALL: Generate only stemmed terms (but without a "Z" prefix). STEM_ALL_Z: Generate only stemmed terms (with a "Z" prefix). )r#TermGenerator_set_stemming_strategyrstrategyrrrset_stemming_strategy| s z#TermGenerator.set_stemming_strategycCr)a= Set the stopper strategy. void Xapian::TermGenerator::set_stopper_strategy(stop_strategy strategy) The method controls how the stopper is used. It was added in Xapian 1.4.1. You need to also call set_stopper() for this to have any effect. Parameters: ----------- strategy: The strategy to use - possible values are: STOP_NONE: Don't use the stopper. STOP_ALL: If a word is identified as a stop word, skip it completely. STOP_STEMMED: If a word is identified as a stop word, index its unstemmed form but skip the stem. Unstemmed forms are indexed with positional information by default, so this allows searches for phrases containing stopwords to be supported. (This is the default mode). )r"TermGenerator_set_stopper_strategyrrrrset_stopper_strategy rz"TermGenerator.set_stopper_strategycCr)a Set the maximum length word to index. void Xapian::TermGenerator::set_max_word_length(unsigned max_word_length) The limit is on the length of a word prior to stemming and prior to adding any term prefix. The backends mostly impose a limit on the length of terms (often of about 240 bytes), but it's generally useful to have a lower limit to help prevent the index being bloated by useless junk terms from trying to indexing things like binary data, uuencoded data, ASCII art, etc. This method was new in Xapian 1.3.1. Parameters: ----------- max_word_length: The maximum length word to index, in bytes in UTF-8 representation. Default is 64. )r!TermGenerator_set_max_word_length)rmax_word_lengthrrrset_max_word_length r.z!TermGenerator.set_max_word_lengthcGr)a Index some text in a std::string. void Xapian::TermGenerator::index_text(const std::string &text, Xapian::termcount wdf_inc=1, const std::string &prefix=std::string()) Parameters: ----------- text: The text to index. wdf_inc: The wdf increment (default 1). prefix: The term prefix to use (default is no prefix). )rTermGenerator_index_textrdrrr index_text szTermGenerator.index_textcGr)a Index some text in a std::string without positional information. void Xapian::TermGenerator::index_text_without_positions(const std::string &text, Xapian::termcount wdf_inc=1, const std::string &prefix=std::string()) Just like index_text, but no positional information is generated. This means that the database will be significantly smaller, but that phrase searching and NEAR won't be supported. Parameters: ----------- text: The text to index. wdf_inc: The wdf increment (default 1). prefix: The term prefix to use (default is no prefix). )r*TermGenerator_index_text_without_positionsrdrrrindex_text_without_positions rz*TermGenerator.index_text_without_positionsdcCr)a Increase the term position used by index_text. void Xapian::TermGenerator::increase_termpos(Xapian::termpos delta=100) This can be used between indexing text from different fields or other places to prevent phrase searches from spanning between them (e.g. between the title and body text, or between two chapters in a book). Parameters: ----------- delta: Amount to increase the term position by (default: 100). )rTermGenerator_increase_termpos)rdeltarrrincrease_termpos rzTermGenerator.increase_termposcCrH)zw Get the current term position. Xapian::termpos Xapian::TermGenerator::get_termpos() const )rTermGenerator_get_termposr:rrr get_termpos rKzTermGenerator.get_termposcCr)z Set the current term position. void Xapian::TermGenerator::set_termpos(Xapian::termpos termpos) Parameters: ----------- termpos: The new term position to set. )rTermGenerator_set_termposrrrr set_termpos% rkzTermGenerator.set_termposcCrH)z Return a string describing this object. std::string Xapian::TermGenerator::get_description() const )rTermGenerator___str__r:rrrr5 rKzTermGenerator.__str__r$)r)/rrr=rTr>rrrr7rdelete_TermGeneratorr@rrrrrTermGenerator_FLAG_SPELLING FLAG_SPELLINGTermGenerator_FLAG_CJK_NGRAMFLAG_CJK_NGRAMTermGenerator_STEM_NONE STEM_NONETermGenerator_STEM_SOME STEM_SOMETermGenerator_STEM_ALLSTEM_ALLTermGenerator_STEM_ALL_Z STEM_ALL_Z TermGenerator_STEM_SOME_FULL_POSSTEM_SOME_FULL_POSTermGenerator_STOP_NONE STOP_NONETermGenerator_STOP_ALLSTOP_ALLTermGenerator_STOP_STEMMED STOP_STEMMEDrrrrrrrrrrrrrrr s>         rc@seZdZdZeddddddZeZddZe j Z d d Z d d Z d dZddZddZddZddZddZddZddZddZdd Ze jZe jZe jZe jZd!d"Z d#d$Z!d%d&Z"d'd(Z#d)d*Z$d+d,Z%d-d.Z&d/d0Z'd1d2Z(d3S)4MSet9 Class representing a list of search results. cCr#r$r%r&rrrr(X r)z MSet.cCr*r$r%r+rrrr(X r-r.r/cCr)z Default constructor. Xapian::MSet::MSet() Creates an empty MSet, mostly useful as a placeholder. N)r MSet_swiginitnew_MSetr:rrrr7[  z MSet.__init__cGr)aa Convert the weight of the current iterator position to a percentage. int Xapian::MSet::convert_to_percent(const MSetIterator &it) const The matching document with the highest weight will get 100% if it matches all the weighted query terms, and proportionally less if it only matches some, and other weights are scaled by the same factor. Documents with a non-zero score will always score at least 1%. Note that these generally aren't percentages of anything meaningful (unless you use a custom weighting formula where they are!) )rMSet_convert_to_percentrdrrrconvert_to_percenth szMSet.convert_to_percentcCr)a Get the termfreq of a term. Xapian::doccount Xapian::MSet::get_termfreq(const std::string &term) const The number of documents which term occurs in. This considers all documents in the database being searched, so gives the same answer as db.get_termfreq(term) (but is more efficient for query terms as it returns a value cached during the search.) )rMSet_get_termfreqrrrrr| r_zMSet.get_termfreqcCr)z Get the term weight of a term. double Xapian::MSet::get_termweight(const std::string &term) const The maximum weight that term could have contributed to a document. )rMSet_get_termweightrrrrget_termweight s zMSet.get_termweightcCrH)z Rank of first item in this MSet. Xapian::doccount Xapian::MSet::get_firstitem() const This is the parameter first passed to Xapian::Enquire::get_mset(). )rMSet_get_firstitemr:rrr get_firstitem r@zMSet.get_firstitemcCrH)z Lower bound on the total number of matching documents. Xapian::doccount Xapian::MSet::get_matches_lower_bound() const )rMSet_get_matches_lower_boundr:rrrget_matches_lower_bound rKzMSet.get_matches_lower_boundcCrH)z Estimate of the total number of matching documents. Xapian::doccount Xapian::MSet::get_matches_estimated() const )rMSet_get_matches_estimatedr:rrrget_matches_estimated rKzMSet.get_matches_estimatedcCrH)z Upper bound on the total number of matching documents. Xapian::doccount Xapian::MSet::get_matches_upper_bound() const )rMSet_get_matches_upper_boundr:rrrget_matches_upper_bound rKzMSet.get_matches_upper_boundcCrH)aX Lower bound on the total number of matching documents before collapsing. Xapian::doccount Xapian::MSet::get_uncollapsed_matches_lower_bound() const Conceptually the same as get_matches_lower_bound() for the same query without any collapse part (though the actual value may differ). )r(MSet_get_uncollapsed_matches_lower_boundr:rrr#get_uncollapsed_matches_lower_bound rz(MSet.get_uncollapsed_matches_lower_boundcCrH)aI Estimate of the total number of matching documents before collapsing. Xapian::doccount Xapian::MSet::get_uncollapsed_matches_estimated() const Conceptually the same as get_matches_estimated() for the same query without any collapse part (though the actual value may differ). )r&MSet_get_uncollapsed_matches_estimatedr:rrr!get_uncollapsed_matches_estimated rSz&MSet.get_uncollapsed_matches_estimatedcCrH)aX Upper bound on the total number of matching documents before collapsing. Xapian::doccount Xapian::MSet::get_uncollapsed_matches_upper_bound() const Conceptually the same as get_matches_upper_bound() for the same query without any collapse part (though the actual value may differ). )r(MSet_get_uncollapsed_matches_upper_boundr:rrr#get_uncollapsed_matches_upper_bound rz(MSet.get_uncollapsed_matches_upper_boundcCrH)zx The maximum weight attained by any document. double Xapian::MSet::get_max_attained() const )rMSet_get_max_attainedr:rrrget_max_attained rKzMSet.get_max_attainedcCrH)z The maximum possible weight any document could achieve. double Xapian::MSet::get_max_possible() const )rMSet_get_max_possibler:rrrget_max_possible rKzMSet.get_max_possiblecGr)a Generate a snippet. std::string Xapian::MSet::snippet(const std::string &text, size_t length=500, const Xapian::Stem &stemmer=Xapian::Stem(), unsigned flags=SNIPPET_BACKGROUND_MODEL|SNIPPET_EXHAUSTIVE, const std::string &hi_start="", const std::string &hi_end="", const std::string &omit="...") const This method selects a continuous run of words from text, based mainly on where the query matches (currently terms, exact phrases and wildcards are taken into account). If flag SNIPPET_BACKGROUND_MODEL is used (which it is by default) then the selection algorithm also considers the non-query terms in the text with the aim of showing a context which provides more useful information. The size of the text selected can be controlled by the length parameter, which specifies a number of bytes of text to aim to select. However slightly more text may be selected. Also the size of any escaping, highlighting or omission markers is not considered. The returned text is escaped to make it suitable for use in HTML (though beware that in upstream releases 1.4.5 and earlier this escaping was sometimes incomplete), and matches with the query will be highlighted using hi_start and hi_end. If the snippet seems to start or end mid-sentence, then omit is prepended or append (respectively) to indicate this. The same stemming algorithm which was used to build the query should be specified in stemmer. And flags contains flags controlling behaviour. Added in 1.3.5. )r MSet_snippetrdrrrsnippet 'z MSet.snippetcGr)a Prefetch hint the whole MSet. void Xapian::MSet::fetch() const For a remote database, this may start a pipelined fetch of the requested documents from the remote server. For a disk-based database, this may send prefetch hints to the operating system such that the disk blocks the requested documents are stored in are more likely to be in the cache when we come to actually read them. )r MSet_fetchrdrrrfetch; sz MSet.fetchcCrH)zu Return number of items in this MSet object. Xapian::doccount Xapian::MSet::size() const )r MSet_sizer:rrrsizeN rKz MSet.sizecCrH)zh Return true if this MSet object is empty. bool Xapian::MSet::empty() const )r MSet_emptyr:rrrrY rKz MSet.emptycCrH)z Return iterator pointing to the first item in this MSet. MSetIterator Xapian::MSet::begin() const )r MSet__beginr:rrr_begind rKz MSet._begincCrH)z Return iterator pointing to just after the last item in this MSet. MSetIterator Xapian::MSet::end() const )r MSet__endr:rrr_endo rKz MSet._endcCrH)z Return iterator pointing to the last object in this MSet. MSetIterator Xapian::MSet::back() const )r MSet_backr:rrrbackz rKz MSet.backcCrH)zw Return a string describing this object. std::string Xapian::MSet::get_description() const )r MSet___str__r:rrrr rKz MSet.__str__cCr)z Get an item from the MSet. The supplied index is relative to the start of the MSet, not the absolute rank of the item. )rMSet__get_hit_internal)rirrr_get_hit_internal s zMSet._get_hit_internalN))rrr=rTr>rrrr7r delete_MSetr@rrrrr!r#r%r'r)r+r-r/MSet_SNIPPET_BACKGROUND_MODELSNIPPET_BACKGROUND_MODELMSet_SNIPPET_EXHAUSTIVESNIPPET_EXHAUSTIVE MSet_SNIPPET_EMPTY_WITHOUT_MATCHSNIPPET_EMPTY_WITHOUT_MATCHMSet_SNIPPET_CJK_NGRAMSNIPPET_CJK_NGRAMr1r4r6rr9r;r=rrArrrrrQ s>        *     rc@seZdZdZeddddddZeZeej ej Z eej ej ZddZd d Zd d Zd dZddZddZddZddZddZejZdS) _MSetIteratorz* Iterator over a Xapian::MSet. cCr#r$r%r&rrrr( r)z_MSetIterator.cCr*r$r%r+rrrr( r-r.r/cCr)zg Create an unpositioned MSetIterator. Xapian::MSetIterator::MSetIterator() N)r_MSetIterator_swiginitnew__MSetIteratorr:rrrr7 rz_MSetIterator.__init__cCrH)z Return the MSet rank for the current position. Xapian::doccount Xapian::MSetIterator::get_rank() const The rank of mset[0] is mset.get_firstitem(). )r_MSetIterator_get_rankr:rrrget_rank r@z_MSetIterator.get_rankcCrH)z Get the Document object for the current position. Xapian::Document Xapian::MSetIterator::get_document() const )r_MSetIterator_get_documentr:rrrr rKz_MSetIterator.get_documentcCrH)zv Get the weight for the current position. double Xapian::MSetIterator::get_weight() const )r_MSetIterator_get_weightr:rrr get_weight rKz_MSetIterator.get_weightcCrH)z Return the collapse key for the current position. std::string Xapian::MSetIterator::get_collapse_key() const If collapsing isn't in use, an empty string will be returned. )r_MSetIterator_get_collapse_keyr:rrrget_collapse_key r@z_MSetIterator.get_collapse_keycCrH)a Return a count of the number of collapses done onto the current key. Xapian::doccount Xapian::MSetIterator::get_collapse_count() const This starts at 0, and is incremented each time an item is eliminated because its key is the same as that of the current item (as returned by get_collapse_key()). Note that this is NOT necessarily one less than the total number of matching documents with this collapse key due to various optimisations implemented in the matcher - for example, it can skip documents completely if it can prove their weight wouldn't be enough to make the result set. You can say is that if get_collapse_count() > 0 then there are >= get_collapse_count() other documents with the current collapse key. But if get_collapse_count() == 0 then there may or may not be other such documents. )r _MSetIterator_get_collapse_countr:rrrget_collapse_count  z _MSetIterator.get_collapse_countcCrH)z Return the sort key for the current position. std::string Xapian::MSetIterator::get_sort_key() const If sorting didn't use a key then an empty string will be returned. Added in Xapian 1.4.6. )r_MSetIterator_get_sort_keyr:rrr get_sort_key rSz_MSetIterator.get_sort_keycCrH)aL Convert the weight of the current iterator position to a percentage. int Xapian::MSetIterator::get_percent() const The matching document with the highest weight will get 100% if it matches all the weighted query terms, and proportionally less if it only matches some, and other weights are scaled by the same factor. Documents with a non-zero score will always score at least 1%. Note that these generally aren't percentages of anything meaningful (unless you use a custom weighting formula where they are!) )r_MSetIterator_get_percentr:rrr get_percent#  z_MSetIterator.get_percentcCrH)z Return a string describing this object. std::string Xapian::MSetIterator::get_description() const )r_MSetIterator___str__r:rrrr7 rKz_MSetIterator.__str__N)rrr=rTr>rrrr_MSetIterator_mset_get_MSetIterator_mset_setmset_MSetIterator_off_from_end_get_MSetIterator_off_from_end_set off_from_endr7rOrrRrTrVrYr[rdelete__MSetIteratorr@rrrrrK s       rKc@r)ESetrcCr#r$r%r&rrrr(Z r)z ESet.cCr*r$r%r+rrrr(Z r-r.r/cCr)z Default constructor. Xapian::ESet::ESet() Creates an empty ESet, mostly useful as a placeholder. N)r ESet_swiginitnew_ESetr:rrrr7] rz ESet.__init__cCrH)zu Return number of items in this ESet object. Xapian::doccount Xapian::ESet::size() const )r ESet_sizer:rrrr6j rKz ESet.sizecCrH)zh Return true if this ESet object is empty. bool Xapian::ESet::empty() const )r ESet_emptyr:rrrru rKz ESet.emptycCrH)a  Return a bound on the full size of this ESet object. Xapian::termcount Xapian::ESet::get_ebound() const This is a bound on size() if get_eset() had been called with maxitems set high enough that all results were returned. )rESet_get_eboundr:rrr get_ebound rzESet.get_eboundcCrH)z Return iterator pointing to the first item in this ESet. ESetIterator Xapian::ESet::begin() const )r ESet__beginr:rrrr9 rKz ESet._begincCrH)z Return iterator pointing to just after the last item in this ESet. ESetIterator Xapian::ESet::end() const )r ESet__endr:rrrr; rKz ESet._endcCrH)z Return iterator pointing to the last object in this ESet. ESetIterator Xapian::ESet::back() const )r ESet_backr:rrrr= rKz ESet.backcCrH)zw Return a string describing this object. std::string Xapian::ESet::get_description() const )r ESet___str__r:rrrr rKz ESet.__str__N)rrr=rTr>rrrr7r delete_ESetr@r6rrkr9r;r=rrrrrreS s     rec@sdeZdZdZeddddddZeZeej ej Z eej ej ZddZd d Zd d ZejZd S) _ESetIteratorz* Iterator over a Xapian::ESet. cCr#r$r%r&rrrr( r)z_ESetIterator.cCr*r$r%r+rrrr( r-r.r/cCr)zg Create an unpositioned ESetIterator. Xapian::ESetIterator::ESetIterator() N)r_ESetIterator_swiginitnew__ESetIteratorr:rrrr7 rz_ESetIterator.__init__cCrH)zv Get the weight for the current position. double Xapian::ESetIterator::get_weight() const )r_ESetIterator_get_weightr:rrrrR rKz_ESetIterator.get_weightcCrH)z Return a string describing this object. std::string Xapian::ESetIterator::get_description() const )r_ESetIterator___str__r:rrrr rKz_ESetIterator.__str__N)rrr=rTr>rrrr_ESetIterator_eset_get_ESetIterator_eset_seteset_ESetIterator_off_from_end_get_ESetIterator_off_from_end_setrcr7rRrdelete__ESetIteratorr@rrrrrq s  rqcGrr$)r__eq__rrrrr| rWr|cGrr$)r__lt__rrrrr} rWr}cGrr$)r__gt__rrrrr~rWr~cGrr$)r__ge__rrrrrrWrcGrr$)r__le__rrrrr rWrcGrr$)r__add__rrrrrrWrc@sheZdZdZeddddddZeZddZe j Z d d Z d d Z d dZddZddZddZdS)RSetz A relevance set (R-Set). This is the set of documents which are marked as relevant, for use in modifying the term weights, and in performing query expansion. cCr#r$r%r&rrrr(r)z RSet.cCr*r$r%r+rrrr(r-r.r/cCr)zG Default constructor. Xapian::RSet::RSet() N)r RSet_swiginitnew_RSetr:rrrr7rz RSet.__init__cCrH)zp The number of documents in this R-Set. Xapian::doccount Xapian::RSet::size() const )r RSet_sizer:rrrr6*rKz RSet.sizecCrH)z[ Test if this R-Set is empty. bool Xapian::RSet::empty() const )r RSet_emptyr:rrrr5rKz RSet.emptycGr)z Add a document to the relevance set. void Xapian::RSet::add_document(const Xapian::MSetIterator &i) )rRSet_add_documentrdrrr add_document@zRSet.add_documentcGr)z Remove a document from the relevance set. void Xapian::RSet::remove_document(const Xapian::MSetIterator &i) )rRSet_remove_documentrdrrrremove_documentKrzRSet.remove_documentcGr)z Test if a given document in the relevance set. bool Xapian::RSet::contains(const Xapian::MSetIterator &i) const )r RSet_containsrdrrrcontainsVrz RSet.containscCrH)zw Return a string describing this object. std::string Xapian::RSet::get_description() const )r RSet___str__r:rrrrarKz RSet.__str__N)rrr=rTr>rrrr7r delete_RSetr@r6rrrrrrrrrrs      rc@s@eZdZdZeddddddZeZddZe j Z d d Z d S) MatchDeciderz5 Base class for matcher decision functor. cCr#r$r%r&rrrr({r)zMatchDecider.cCr*r$r%r+rrrr({r-r.r/cCr)zW Default constructor. Xapian::MatchDecider::MatchDecider() N)rrrMatchDecider_swiginitnew_MatchDeciderrrrrr7~rzMatchDecider.__init__cCrr$)rrrdisown_MatchDeciderrr:rrrrrzMatchDecider.__disown__N) rrr=rTr>rrrr7rdelete_MatchDeciderr@rrrrrrts rc@seZdZdZeddddddZeZddZe j Z d9d d Z d d Z ddZddZddZd:ddZd;ddZe jZe jZe jZddZd9ddZddZd d!Zd"d#Zd$d%Zd&d'Zd(d)Z d*d+Z!d,d-Z"d.d/Z#e j$Z%e j&Z'd0d1Z(d2d3Z)d4d5Z*d6d7Z+d8S)<Enquirea This class provides an interface to the information retrieval system for the purpose of searching. Databases are usually opened lazily, so exceptions may not be thrown where you would expect them to be. You should catch Xapian::Error exceptions when calling any method in Xapian::Enquire. Parameters: ----------- Xapian::InvalidArgumentError: will be thrown if an invalid argument is supplied, for example, an unknown database type. cCr#r$r%r&rrrr(r)zEnquire.cCr*r$r%r+rrrr(r-r.r/cCt|t|dS)a1 Create a Xapian::Enquire object. Xapian::Enquire::Enquire(const Database &database, ErrorHandler *errorhandler_) This specification cannot be changed once the Xapian::Enquire is opened: you must create a new Xapian::Enquire object to access a different database, or set of databases. The database supplied must have been initialised (ie, must not be the result of calling the Database::Database() constructor). If you need to handle a situation where you have no databases gracefully, a database created with DB_BACKEND_INMEMORY can be passed here to provide a completely empty database. Parameters: ----------- database: Specification of the database or databases to use. errorhandler_: This parameter is deprecated (since Xapian 1.3.1), and as of 1.3.5 it's ignored completely. Parameters: ----------- Xapian::InvalidArgumentError: will be thrown if an empty Database object is supplied. N)rEnquire_swiginit new_Enquirerdatabaserrrr7s!zEnquire.__init__r cCr)a^ Set the query to run. void Xapian::Enquire::set_query(const Xapian::Query &query, Xapian::termcount qlen=0) Parameters: ----------- query: the new query to run. qlen: the query length to use in weight calculations - by default the sum of the wqf of all terms is used. )rEnquire_set_queryrqueryqlenrrr set_queryzEnquire.set_querycCrH)z Get the current query. const Xapian::Query& Xapian::Enquire::get_query() const If called before set_query(), this will return a default initialised Query object. )rEnquire_get_queryr:rrr get_queryrzEnquire.get_querycCr)a Add a matchspy. void Xapian::Enquire::add_matchspy(MatchSpy *spy) This matchspy will be called with some of the documents which match the query, during the match process. Exactly which of the matching documents are passed to it depends on exactly when certain optimisations occur during the match process, but it can be controlled to some extent by setting the checkatleast parameter to get_mset(). In particular, if there are enough matching documents, at least the number specified by checkatleast will be passed to the matchspy. This means that you can force the matchspy to be shown all matching documents by setting checkatleast to the number of documents in the database. Parameters: ----------- spy: The MatchSpy subclass to add. The caller must ensure that this remains valid while the Enquire object remains active, or until clear_matchspies() is called. )rEnquire_add_matchspyrhrrr add_matchspyrzEnquire.add_matchspycCrH)za Remove all the matchspies. void Xapian::Enquire::clear_matchspies() )rEnquire_clear_matchspiesr:rrrclear_matchspies rKzEnquire.clear_matchspiescCr)a@ Set the weighting scheme to use for queries. void Xapian::Enquire::set_weighting_scheme(const Weight &weight_) Parameters: ----------- weight_: the new weighting scheme. If no weighting scheme is specified, the default is BM25 with the default parameters. )rEnquire_set_weighting_scheme)rweight_rrrset_weighting_schemer_zEnquire.set_weighting_scheme?cCr)a Set the weighting scheme to use for expansion. void Xapian::Enquire::set_expansion_scheme(const std::string &eweightname_, double expand_k_=1.0) const If you don't call this method, the default is as if you'd used: get_expansion_scheme("trad"); Parameters: ----------- eweightname_: A string in lowercase specifying the name of the scheme to be used. The following schemes are currently available: "bo1" : The Bo1 scheme for query expansion. "trad" : The TradWeight scheme for query expansion. expand_k_: The parameter required for TradWeight query expansion. A default value of 1.0 is used if none is specified. )rEnquire_set_expansion_scheme)r eweightname_ expand_k_rrrset_expansion_scheme)zEnquire.set_expansion_schemercCr)a Set the collapse key to use for queries. void Xapian::Enquire::set_collapse_key(Xapian::valueno collapse_key, Xapian::doccount collapse_max=1) Parameters: ----------- collapse_key: value number to collapse on - at most one MSet entry with each particular value will be returned (default is Xapian::BAD_VALUENO which means no collapsing). collapse_max: Max number of items with the same key to leave after collapsing (default 1). The MSet returned by get_mset() will have only the "best" (at most) collapse_max entries with each particular value of collapse_key ("best" being highest ranked - i.e. highest weight or highest sorting key). An example use might be to create a value for each document containing an MD5 hash of the document contents. Then duplicate documents from different sources can be eliminated at search time by collapsing with collapse_max = 1 (it's better to eliminate duplicates at index time, but this may not be always be possible - for example the search may be over more than one Xapian database). Another use is to group matches in a particular category (e.g. you might collapse a mailing list search on the Subject: so that there's only one result per discussion thread). In this case you can use get_collapse_count() to give the user some idea how many other results there are. And if you index the Subject: as a boolean term as well as putting it in a value, you can offer a link to a non-collapsed search restricted to that thread using a boolean filter. )rEnquire_set_collapse_key)r collapse_key collapse_maxrrrset_collapse_keyD'zEnquire.set_collapse_keycCr)a Set sort order for document IDs. void Xapian::Enquire::set_docid_order(docid_order order) This order only has an effect on documents which would otherwise have equal rank. When ordering by relevance without a sort key, this means documents with equal weight. For a boolean match with no sort key, this means all documents. And if a sort key is used, this means documents with the same sort key (and also equal weight if ordering on relevance before or after the sort key). Parameters: ----------- order: This can be: Xapian::Enquire::ASCENDING docids sort in ascending order (default) Xapian::Enquire::DESCENDING docids sort in descending order Xapian::Enquire::DONT_CARE docids sort in whatever order is most efficient for the backend Note: If you add documents in strict date order, then a boolean search - i.e. set_weighting_scheme(Xapian::BoolWeight()) - with set_docid_order(Xapian::Enquire::DESCENDING) is an efficient way to perform "sort by date, newest first", and with set_docid_order(Xapian::Enquire::ASCENDING) a very efficient way to perform "sort by date, oldest first". )rEnquire_set_docid_order)rorderrrrset_docid_orderqrzEnquire.set_docid_ordercCr)a^ Set the percentage and/or weight cutoffs. void Xapian::Enquire::set_cutoff(int percent_cutoff, double weight_cutoff=0) Parameters: ----------- percent_cutoff: Minimum percentage score for returned documents. If a document has a lower percentage score than this, it will not appear in the MSet. If your intention is to return only matches which contain all the terms in the query, then it's more efficient to use Xapian::Query::OP_AND instead of Xapian::Query::OP_OR in the query than to use set_cutoff(100). (default 0 => no percentage cut-off). weight_cutoff: Minimum weight for a document to be returned. If a document has a lower score that this, it will not appear in the MSet. It is usually only possible to choose an appropriate weight for cutoff based on the results of a previous run of the same query; this is thus mainly useful for alerting operations. The other potential use is with a user specified weighting scheme. (default 0 => no weight cut-off). )rEnquire_set_cutoff)rpercent_cutoff weight_cutoffrrr set_cutoffzEnquire.set_cutoffcCrH)z Set the sorting to be by relevance only. void Xapian::Enquire::set_sort_by_relevance() This is the default. )rEnquire_set_sort_by_relevancer:rrrset_sort_by_relevancer@zEnquire.set_sort_by_relevancecCr)a Set the sorting to be by value only. void Xapian::Enquire::set_sort_by_value(Xapian::valueno sort_key, bool reverse) Note that sorting by values uses a string comparison, so to use this to sort by a numeric value you'll need to store the numeric values in a manner which sorts appropriately. For example, you could use Xapian::sortable_serialise() (which works for floating point numbers as well as integers), or store numbers padded with leading zeros or spaces, or with the number of digits prepended. Parameters: ----------- sort_key: value number to sort on. reverse: If true, reverses the sort order. )rEnquire_set_sort_by_valuersort_keyreverserrrset_sort_by_valueszEnquire.set_sort_by_valuecCr)aD Set the sorting to be by key generated from values only. void Xapian::Enquire::set_sort_by_key(Xapian::KeyMaker *sorter, bool reverse) Parameters: ----------- sorter: The functor to use for generating keys. reverse: If true, reverses the sort order. )rEnquire_set_sort_by_keyrsorterrrrrset_sort_by_keyzEnquire.set_sort_by_keycCr)a  Set the sorting to be by value, then by relevance for documents with the same value. void Xapian::Enquire::set_sort_by_value_then_relevance(Xapian::valueno sort_key, bool reverse) Note that sorting by values uses a string comparison, so to use this to sort by a numeric value you'll need to store the numeric values in a manner which sorts appropriately. For example, you could use Xapian::sortable_serialise() (which works for floating point numbers as well as integers), or store numbers padded with leading zeros or spaces, or with the number of digits prepended. Parameters: ----------- sort_key: value number to sort on. reverse: If true, reverses the sort order. )r(Enquire_set_sort_by_value_then_relevancerrrr set_sort_by_value_then_relevancerz(Enquire.set_sort_by_value_then_relevancecCr)a Set the sorting to be by keys generated from values, then by relevance for documents with identical keys. void Xapian::Enquire::set_sort_by_key_then_relevance(Xapian::KeyMaker *sorter, bool reverse) Parameters: ----------- sorter: The functor to use for generating keys. reverse: If true, reverses the sort order. )r&Enquire_set_sort_by_key_then_relevancerrrrset_sort_by_key_then_relevancerz&Enquire.set_sort_by_key_then_relevancecCr)a Set the sorting to be by relevance then value. void Xapian::Enquire::set_sort_by_relevance_then_value(Xapian::valueno sort_key, bool reverse) Note that sorting by values uses a string comparison, so to use this to sort by a numeric value you'll need to store the numeric values in a manner which sorts appropriately. For example, you could use Xapian::sortable_serialise() (which works for floating point numbers as well as integers), or store numbers padded with leading zeros or spaces, or with the number of digits prepended. Note that with the default BM25 weighting scheme parameters, non- identical documents will rarely have the same weight, so this setting will give very similar results to set_sort_by_relevance(). It becomes more useful with particular BM25 parameter settings (e.g. BM25Weight(1,0,1,0,0)) or custom weighting schemes. Parameters: ----------- sort_key: value number to sort on. reverse: If true, reverses the sort order of sort_key. Beware that in 1.2.16 and earlier, the sense of this parameter was incorrectly inverted and inconsistent with the other set_sort_by_... methods. This was fixed in 1.2.17, so make that version a minimum requirement if this detail matters to your application. )r(Enquire_set_sort_by_relevance_then_valuerrrr set_sort_by_relevance_then_values!z(Enquire.set_sort_by_relevance_then_valuecCr)a Set the sorting to be by relevance, then by keys generated from values. void Xapian::Enquire::set_sort_by_relevance_then_key(Xapian::KeyMaker *sorter, bool reverse) Note that with the default BM25 weighting scheme parameters, non- identical documents will rarely have the same weight, so this setting will give very similar results to set_sort_by_relevance(). It becomes more useful with particular BM25 parameter settings (e.g. BM25Weight(1,0,1,0,0)) or custom weighting schemes. Parameters: ----------- sorter: The functor to use for generating keys. reverse: If true, reverses the sort order of the generated keys. Beware that in 1.2.16 and earlier, the sense of this parameter was incorrectly inverted and inconsistent with the other set_sort_by_... methods. This was fixed in 1.2.17, so make that version a minimum requirement if this detail matters to your application. )r&Enquire_set_sort_by_relevance_then_keyrrrrset_sort_by_relevance_then_key@rz&Enquire.set_sort_by_relevance_then_keycCr)a Set a time limit for the match. void Xapian::Enquire::set_time_limit(double time_limit) Matches with check_at_least set high can take a long time in some cases. You can set a time limit on this, after which check_at_least will be turned off. Parameters: ----------- time_limit: time in seconds after which to disable check_at_least (default: 0.0 which means no time limit) Limitations: This feature is currently supported on platforms which support POSIX interval timers. Interaction with the remote backend when using multiple databases may have bugs. There's not currently a way to force the match to end after a certain time. )rEnquire_set_time_limit)r time_limitrrrset_time_limit^r.zEnquire.set_time_limitcGr)a. Get (a portion of) the match set for the current query. MSet Xapian::Enquire::get_mset(Xapian::doccount first, Xapian::doccount maxitems, const RSet *omrset, const MatchDecider *mdecider=0) const Parameters: ----------- first: the first item in the result set to return. A value of zero corresponds to the first item returned being that with the highest score. A value of 10 corresponds to the first 10 items being ignored, and the returned items starting at the eleventh. maxitems: the maximum number of items to return. If you want all matches, then you can pass the result of calling get_doccount() on the Database object (though if you are doing this so you can filter results, you are likely to get much better performance by using Xapian's match-time filtering features instead). You can pass 0 for maxitems which will give you an empty MSet with valid statistics (such as get_matches_estimated()) calculated without looking at any postings, which is very quick, but means the estimates may be more approximate and the bounds may be much looser. omrset: the relevance set to use when performing the query. mdecider: a decision functor to use to decide whether a given document should be put in the MSet. A Xapian::MSet object containing the results of the query. Parameters: ----------- Xapian::InvalidArgumentError: See class documentation. )rEnquire_get_msetrdrrrget_msetzs(zEnquire.get_msetcGr)a Get the expand set for the given rset. ESet Xapian::Enquire::get_eset(Xapian::termcount maxitems, const RSet &rset, int flags, double k, const Xapian::ExpandDecider *edecider=NULL, double min_wt=0.0) const Parameters: ----------- maxitems: the maximum number of items to return. rset: the relevance set to use when performing the expand operation. flags: zero or more of these values |-ed together: Xapian::Enquire::INCLUDE_QUERY_TERMS query terms may be returned from expand Xapian::Enquire::USE_EXACT_TERMFREQ for multi dbs, calculate the exact termfreq; otherwise an approximation is used which can greatly improve efficiency, but still returns good results. k: the parameter k in the query expansion algorithm (default is 1.0) edecider: a decision functor to use to decide whether a given term should be put in the ESet min_wt: the minimum weight for included terms An ESet object containing the results of the expand. Parameters: ----------- Xapian::InvalidArgumentError: See class documentation. )rEnquire_get_esetrdrrrget_esetr2zEnquire.get_esetcGr)a Get terms which match a given document, by match set item. TermIterator Xapian::Enquire::get_matching_terms_begin(const MSetIterator &it) const This method returns the terms in the current query which match the given document. If the underlying database has suitable support, using this call (rather than passing a Xapian::docid) 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. Parameters: ----------- it: The iterator for which to retrieve the matching terms. An iterator returning the terms which match the document. The terms will be returned (as far as this makes any sense) in the same order as the terms in the query. Terms will not occur more than once, even if they do in the query. Parameters: ----------- Xapian::InvalidArgumentError: See class documentation. Xapian::DocNotFoundError: The document specified could not be found in the database. )r!Enquire__get_matching_terms_beginrdrrr_get_matching_terms_begins#z!Enquire._get_matching_terms_begincGr)z End iterator corresponding to get_matching_terms_begin() TermIterator Xapian::Enquire::get_matching_terms_end(const MSetIterator &) const )rEnquire__get_matching_terms_endrdrrr_get_matching_terms_end zEnquire._get_matching_terms_endcCrH)zz Return a string describing this object. std::string Xapian::Enquire::get_description() const )rEnquire___str__r:rrrrrKzEnquire.__str__Nr rrP),rrr=rTr>rrrr7rdelete_Enquirer@rrrrrrrEnquire_ASCENDING ASCENDINGEnquire_DESCENDING DESCENDINGEnquire_DONT_CARE DONT_CARErrrrrrrrrrrEnquire_INCLUDE_QUERY_TERMSINCLUDE_QUERY_TERMSEnquire_USE_EXACT_TERMFREQUSE_EXACT_TERMFREQrrrrrrrrrsB"   ) $ $**& rc@r) ExpandDeciderz; Virtual base class for expand decider functor. cCr#r$r%r&rrrr(-r)zExpandDecider.cCr*r$r%r+rrrr(-r-r.r/cCr)zY Default constructor. Xapian::ExpandDecider::ExpandDecider() N)rrrExpandDecider_swiginitnew_ExpandDeciderrrrrr70rzExpandDecider.__init__cCrH)a~ Start reference counting this object. const ExpandDecider* Xapian::ExpandDecider::release() const You can hand ownership of a dynamically allocated ExpandDecider object to Xapian by calling release() and then passing the object to a Xapian method. Xapian will arrange to delete the object once it is no longer required. )rExpandDecider_releaser:rrrrelease?rzExpandDecider.releasecCrr$)rrrdisown_ExpandDeciderrr:rrrrNrzExpandDecider.__disown__N)rrr=rTr>rrrr7rdelete_ExpandDeciderr@rrrrrrr&  rc@8eZdZdZeddddddZeZddZe j Z d S) ExpandDeciderAndz ExpandDecider subclass which rejects terms using two ExpandDeciders. Terms are only accepted if they are accepted by both of the specified ExpandDecider objects. cCr#r$r%r&rrrr(ar)zExpandDeciderAnd.cCr*r$r%r+rrrr(ar-r.r/cCt|t||dS)aN Compatibility method. Xapian::ExpandDeciderAnd::ExpandDeciderAnd(const ExpandDecider *first_, const ExpandDecider *second_) Parameters: ----------- first_: First ExpandDecider object to test with. second_: ExpandDecider object to test with if first_ accepts. N)rExpandDeciderAnd_swiginitnew_ExpandDeciderAnd)rfirst_second_rrrr7dszExpandDeciderAnd.__init__N) rrr=rTr>rrrr7rdelete_ExpandDeciderAndr@rrrrrWs   rc@r) ExpandDeciderFilterPrefixz ExpandDecider subclass which restrict terms to a particular prefix. ExpandDeciderFilterPrefix provides an easy way to choose terms with a particular prefix when generating an ESet. cCr#r$r%r&rrrr(r)z"ExpandDeciderFilterPrefix.cCr*r$r%r+rrrr(r-r.r/cCr)a The parameter specify the prefix of terms to be retained. Xapian::ExpandDeciderFilterPrefix::ExpandDeciderFilterPrefix(const std::string &prefix_) Parameters: ----------- prefix_: restrict terms to the particular prefix_ N)r"ExpandDeciderFilterPrefix_swiginitnew_ExpandDeciderFilterPrefix)rprefix_rrrr7z"ExpandDeciderFilterPrefix.__init__N) rrr=rTr>rrrr7r delete_ExpandDeciderFilterPrefixr@rrrrrys   rc@r)KeyMakerz8 Virtual base class for key making functors. cCr#r$r%r&rrrr(r)zKeyMaker.cCr*r$r%r+rrrr(r-r.r/cCr)zO Default constructor. Xapian::KeyMaker::KeyMaker() N)rrrKeyMaker_swiginit new_KeyMakerrrrrr7rzKeyMaker.__init__cCrH)ao Start reference counting this object. const KeyMaker* Xapian::KeyMaker::release() const You can hand ownership of a dynamically allocated KeyMaker object to Xapian by calling release() and then passing the object to a Xapian method. Xapian will arrange to delete the object once it is no longer required. )rKeyMaker_releaser:rrrrrzKeyMaker.releasecCrr$)rrrdisown_KeyMakerrr:rrrrrzKeyMaker.__disown__N)rrr=rTr>rrrr7rdelete_KeyMakerr@rrrrrrrrrc@@eZdZdZeddddddZeZddZd d Z e j Z d S) MultiValueKeyMakerae KeyMaker subclass which combines several values. When the result is used for sorting, results are ordered by the first value. In the event of a tie, the second is used. If this is the same for both, the third is used, and so on. If reverse is true for a value, then the sort order for that value is reversed. When used for collapsing, the documents will only be considered equal if all the values specified match. If none of the specified values are set then the generated key will be empty, so such documents won't be collapsed (which is consistent with the behaviour in the "collapse on a value" case). If you'd prefer that documents with none of the keys set are collapsed together, then you can set reverse for at least one of the values. Other than this, it isn't useful to set reverse for collapsing. cCr#r$r%r&rrrr(r)zMultiValueKeyMaker.cCr*r$r%r+rrrr(r-r.r/cCr)a' Construct a MultiValueKeyMaker from a pair of iterators. Xapian::MultiValueKeyMaker::MultiValueKeyMaker(Iterator begin, Iterator end) The iterators must be a begin/end pair returning Xapian::valueno (or a compatible type) when dereferenced. N)rMultiValueKeyMaker_swiginitnew_MultiValueKeyMakerr:rrrr7s zMultiValueKeyMaker.__init__cGr)a Add a value slot to the list to build a key from. void Xapian::MultiValueKeyMaker::add_value(Xapian::valueno slot, bool reverse=false, const std::string &defvalue=std::string()) Parameters: ----------- slot: The value slot to add reverse: Adjust values from this slot to reverse their sort order (default: false) defvalue: Value to use for documents which don't have a value set in this slot (default: empty). This can be used to make such documents sort after all others by passing get_value_upper_bound(slot) + "x" this is guaranteed to be greater than any value in this slot. )rMultiValueKeyMaker_add_valuerdrrrrszMultiValueKeyMaker.add_valueN) rrr=rTr>rrrr7rrdelete_MultiValueKeyMakerr@rrrrrs rc@PeZdZdZeddddddZeZddZe j Z d d Z d d Z d dZdS)Stopperz7 Base class for stop-word decision functor. cCr#r$r%r&rrrr(r)zStopper.cCr*r$r%r+rrrr(r-r.r/cCr)zM Default constructor. Xapian::Stopper::Stopper() N)rrrStopper_swiginit new_Stopperrrrrr7rzStopper.__init__cCrH)z Return a string describing this object. virtual std::string Xapian::Stopper::get_description() const )rStopper___str__r:rrrr)rKzStopper.__str__cCrH)al Start reference counting this object. const Stopper* Xapian::Stopper::release() const You can hand ownership of a dynamically allocated Stopper object to Xapian by calling release() and then passing the object to a Xapian method. Xapian will arrange to delete the object once it is no longer required. )rStopper_releaser:rrrr4rzStopper.releasecCrr$)rrrdisown_Stopperrr:rrrrCrzStopper.__disown__N)rrr=rTr>rrrr7rdelete_Stopperr@rrrrrrrrs  rc@r) SimpleStopperzP Simple implementation of Stopper class - this will suit most users. cCr#r$r%r&rrrr(Tr)zSimpleStopper.cCr*r$r%r+rrrr(Tr-r.r/cCr)zn Add a single stop word. void Xapian::SimpleStopper::add(const std::string &word) )rSimpleStopper_add)rwordrrraddWrzSimpleStopper.addcGra)z Initialise from a pair of iterators. Xapian::SimpleStopper::SimpleStopper(Iterator begin, Iterator end) Xapian includes stop list files for many languages. You can initialise from a file like that: N)rSimpleStopper_swiginitnew_SimpleStopperrdrrrr7bs zSimpleStopper.__init__N) rrr=rTr>rrrrr7rdelete_SimpleStopperr@rrrrrMs rc@r )RangeProcessorz- Base class for range processors. cCr#r$r%r&rrrr(zr)zRangeProcessor.cCr*r$r%r+rrrr(zr-r.r/cGs2|jtkrd}n|}t|tj|g|RdS)ax Constructor. Xapian::RangeProcessor::RangeProcessor(Xapian::valueno slot_, const std::string &str_=std::string(), unsigned flags_=0) Parameters: ----------- slot_: Which value slot to generate ranges over. str_: A string to look for to recognise values as belonging to this range (as a prefix by default, or as a suffix if flags Xapian::RP_SUFFIX is specified). flags_: Zero or more of the following flags, combined with bitwise-or (| in C++): Xapian::RP_SUFFIX - require str_ as a suffix instead of a prefix. Xapian::RP_REPEATED - optionally allow str_ on both ends of the range - e.g. $1..$10 or 5m..50m. By default a prefix is only checked for on the start (e.g. date:1/1/1980..31/12/1989), and a suffix only on the end (e.g. 2..12kg). N)rrrRangeProcessor_swiginitnew_RangeProcessor)rr5rrrrr7}s zRangeProcessor.__init__cCr)a Check prefix/suffix on range. Xapian::Query Xapian::RangeProcessor::check_range(const std::string &b, const std::string &e) If they match, remove the prefix/suffix and then call operator()() to try to handle the range. )rRangeProcessor_check_range)rberrr check_ranges zRangeProcessor.check_rangecCrH)a Start reference counting this object. const RangeProcessor* Xapian::RangeProcessor::release() const You can hand ownership of a dynamically allocated RangeProcessor object to Xapian by calling release() and then passing the object to a Xapian method. Xapian will arrange to delete the object once it is no longer required. )rRangeProcessor_releaser:rrrrrzRangeProcessor.releasecCrr$)rrrdisown_RangeProcessorrr:rrrrrzRangeProcessor.__disown__N)rrr=rTr>rrrr7rdelete_RangeProcessorr@r"rrrrrrrss  rc@r) DateRangeProcessorzZ Handle a date range. Begin and end must be dates in a recognised format. cCr#r$r%r&rrrr(r)zDateRangeProcessor.cCr*r$r%r+rrrr(r-r.r/cGra)a Constructor. Xapian::DateRangeProcessor::DateRangeProcessor(Xapian::valueno slot_, const std::string &str_, unsigned flags_=0, int epoch_year_=1970) Parameters: ----------- slot_: The value slot number to query. str_: A string to look for to recognise values as belonging to this date range. flags_: Zero or more of the following flags, combined with bitwise- or: Xapian::RP_SUFFIX - require str_ as a suffix instead of a prefix. Xapian::RP_REPEATED - optionally allow str_ on both ends of the range - e.g. $1..$10 or 5m..50m. By default a prefix is only checked for on the start (e.g. date:1/1/1980..31/12/1989), and a suffix only on the end (e.g. 2..12kg). Xapian::RP_DATE_PREFER_MDY - interpret ambiguous dates as month/day/year rather than day/month/year. epoch_year_: Year to use as the epoch for dates with 2 digit years (default: 1970, so 1/1/69 is 2069 while 1/1/70 is 1970). The string supplied in str_ is used by operator() to decide whether the pair of strings supplied to it constitute a valid range. If prefix_ is true, the first value in a range must begin with str_ (and the second value may optionally begin with str_); if prefix_ is false, the second value in a range must end with str_ (and the first value may optionally end with str_). If str_ is empty, the Xapian::RP_SUFFIX and Xapian::RP_REPEATED are irrelevant, and no special strings are required at the start or end of the strings defining the range. The remainder of both strings defining the endpoints must be valid dates. For example, if str_ is "created:", Xapian::RP_SUFFIX is not specified, and the range processor has been added to the queryparser, the queryparser will accept "created:1/1/2000..31/12/2001". N)rDateRangeProcessor_swiginitnew_DateRangeProcessorrdrrrr7s1zDateRangeProcessor.__init__N) rrr=rTr>rrrr7rdelete_DateRangeProcessorr@rrrrr&s  2r&c@r) NumberRangeProcessora Handle a number range. This class must be used on values which have been encoded using Xapian::sortable_serialise() which turns numbers into strings which will sort in the same order as the numbers (the same values can be used to implement a numeric sort). cCr#r$r%r&rrrr(r)zNumberRangeProcessor.cCr*r$r%r+rrrr(r-r.r/cGra)a Constructor. Xapian::NumberRangeProcessor::NumberRangeProcessor(Xapian::valueno slot_, const std::string &str_=std::string(), unsigned flags_=0) Parameters: ----------- slot_: The value slot number to query. str_: A string to look for to recognise values as belonging to this numeric range. flags_: Zero or more of the following flags, combined with bitwise- or: Xapian::RP_SUFFIX - require str_ as a suffix instead of a prefix. Xapian::RP_REPEATED - optionally allow str_ on both ends of the range - e.g. $1..$10 or 5m..50m. By default a prefix is only checked for on the start (e.g. date:1/1/1980..31/12/1989), and a suffix only on the end (e.g. 2..12kg). The string supplied in str_ is used by operator() to decide whether the pair of strings supplied to it constitute a valid range. If prefix_ is true, the first value in a range must begin with str_ (and the second value may optionally begin with str_); if prefix_ is false, the second value in a range must end with str_ (and the first value may optionally end with str_). If str_ is empty, the setting of prefix_ is irrelevant, and no special strings are required at the start or end of the strings defining the range. The remainder of both strings defining the endpoints must be valid floating point numbers. (FIXME: define format recognised). For example, if str_ is "$" and prefix_ is true, and the range processor has been added to the queryparser, the queryparser will accept "$10..50" or "$10..$50", but not "10..50" or "10..$50" as valid ranges. If str_ is "kg" and prefix_ is false, the queryparser will accept "10..50kg" or "10kg..50kg", but not "10..50" or "10kg..50" as valid ranges. N)rNumberRangeProcessor_swiginitnew_NumberRangeProcessorrdrrrr7s.zNumberRangeProcessor.__init__N) rrr=rTr>rrrr7rdelete_NumberRangeProcessorr@rrrrr* s   /r*c@r)ValueRangeProcessorz3 Base class for value range processors. cCr#r$r%r&rrrr(Rr)zValueRangeProcessor.cCr*r$r%r+rrrr(Rr-r.r/cCr)ze Default constructor. Xapian::ValueRangeProcessor::ValueRangeProcessor() N)rr.rValueRangeProcessor_swiginitnew_ValueRangeProcessorrrrrr7UrzValueRangeProcessor.__init__cCrH)a Start reference counting this object. const ValueRangeProcessor* Xapian::ValueRangeProcessor::release() const You can hand ownership of a dynamically allocated ValueRangeProcessor object to Xapian by calling release() and then passing the object to a Xapian method. Xapian will arrange to delete the object once it is no longer required. )rValueRangeProcessor_releaser:rrrrdrPzValueRangeProcessor.releasecCrr$)rrrdisown_ValueRangeProcessorrr:rrrrtrzValueRangeProcessor.__disown__N)rrr=rTr>rrrr7rdelete_ValueRangeProcessorr@rrrrrrr.Ks  r.c@r) StringValueRangeProcessorz Handle a string range. The end points can be any strings. Deprecated Use Xapian::RangeProcessor instead (added in 1.3.6). cCr#r$r%r&rrrr(r)z"StringValueRangeProcessor.cCr*r$r%r+rrrr(r-r.r/cGra)a Constructor. Xapian::StringValueRangeProcessor::StringValueRangeProcessor(Xapian::valueno slot_, const std::string &str_, bool prefix_=true) Parameters: ----------- slot_: The value number to return from operator(). str_: A string to look for to recognise values as belonging to this range. prefix_: Flag specifying whether to check for str_ as a prefix or a suffix. N)r"StringValueRangeProcessor_swiginitnew_StringValueRangeProcessorrdrrrr7sz"StringValueRangeProcessor.__init__N) rrr=rTr>rrrr7r delete_StringValueRangeProcessorr@rrrrr4}s   r4c@r) DateValueRangeProcessorz Handle a date range. Begin and end must be dates in a recognised format. Deprecated Use Xapian::DateRangeProcessor instead (added in 1.3.6). cCr#r$r%r&rrrr(r)z DateValueRangeProcessor.cCr*r$r%r+rrrr(r-r.r/cGra)a Constructor. Xapian::DateValueRangeProcessor::DateValueRangeProcessor(Xapian::valueno slot_, const char *str_, bool prefix_=true, bool prefer_mdy_=false, int epoch_year_=1970) This is like the previous version, but with const char * instead of std::string - we need this overload as otherwise DateValueRangeProcessor(1, "date:") quietly interprets the second argument as a boolean in preference to std::string. If you want to be compatible with 1.2.12 and earlier, then explicitly convert to std::string, i.e.: DateValueRangeProcessor(1, std::string("date:")) Parameters: ----------- slot_: The value number to return from operator(). str_: A string to look for to recognise values as belonging to this date range. prefix_: Whether to look for the string at the start or end of the values. If true, the string is a prefix; if false, the string is a suffix (default: true). prefer_mdy_: Should ambiguous dates be interpreted as month/day/year rather than day/month/year? (default: false) epoch_year_: Year to use as the epoch for dates with 2 digit years (default: 1970, so 1/1/69 is 2069 while 1/1/70 is 1970). The string supplied in str_ is used by operator() to decide whether the pair of strings supplied to it constitute a valid range. If prefix_ is true, the first value in a range must begin with str_ (and the second value may optionally begin with str_); if prefix_ is false, the second value in a range must end with str_ (and the first value may optionally end with str_). If str_ is empty, the setting of prefix_ is irrelevant, and no special strings are required at the start or end of the strings defining the range. The remainder of both strings defining the endpoints must be valid dates. For example, if str_ is "created:" and prefix_ is true, and the range processor has been added to the queryparser, the queryparser will accept "created:1/1/2000..31/12/2001". N)r DateValueRangeProcessor_swiginitnew_DateValueRangeProcessorrdrrrr7s5z DateValueRangeProcessor.__init__N) rrr=rTr>rrrr7rdelete_DateValueRangeProcessorr@rrrrr8s   6r8c@r) NumberValueRangeProcessorai Handle a number range. This class must be used on values which have been encoded using Xapian::sortable_serialise() which turns numbers into strings which will sort in the same order as the numbers (the same values can be used to implement a numeric sort). Deprecated Use Xapian::NumberRangeProcessor instead (added in 1.3.6). cCr#r$r%r&rrrr(r)z"NumberValueRangeProcessor.cCr*r$r%r+rrrr(r-r.r/cGra)a Constructor. Xapian::NumberValueRangeProcessor::NumberValueRangeProcessor(Xapian::valueno slot_, const std::string &str_, bool prefix_=true) Parameters: ----------- slot_: The value number to return from operator(). str_: A string to look for to recognise values as belonging to this numeric range. prefix_: Whether to look for the string at the start or end of the values. If true, the string is a prefix; if false, the string is a suffix (default: true). The string supplied in str_ is used by operator() to decide whether the pair of strings supplied to it constitute a valid range. If prefix_ is true, the first value in a range must begin with str_ (and the second value may optionally begin with str_); if prefix_ is false, the second value in a range must end with str_ (and the first value may optionally end with str_). If str_ is empty, the setting of prefix_ is irrelevant, and no special strings are required at the start or end of the strings defining the range. The remainder of both strings defining the endpoints must be valid floating point numbers. (FIXME: define format recognised). For example, if str_ is "$" and prefix_ is true, and the range processor has been added to the queryparser, the queryparser will accept "$10..50" or "$10..$50", but not "10..50" or "10..$50" as valid ranges. If str_ is "kg" and prefix_ is false, the queryparser will accept "10..50kg" or "10kg..50kg", but not "10..50" or "10kg..50" as valid ranges. N)r"NumberValueRangeProcessor_swiginitnew_NumberValueRangeProcessorrdrrrr7s*z"NumberValueRangeProcessor.__init__N) rrr=rTr>rrrr7r delete_NumberValueRangeProcessorr@rrrrr<s  +r<c@r)FieldProcessorz- Base class for field processors. cCr#r$r%r&rrrr(4r)zFieldProcessor.cCr*r$r%r+rrrr(4r-r.r/cCr)z[ Default constructor. Xapian::FieldProcessor::FieldProcessor() N)rr@rFieldProcessor_swiginitnew_FieldProcessorrrrrr77rzFieldProcessor.__init__cCrH)a Start reference counting this object. const FieldProcessor* Xapian::FieldProcessor::release() const You can hand ownership of a dynamically allocated FieldProcessor object to Xapian by calling release() and then passing the object to a Xapian method. Xapian will arrange to delete the object once it is no longer required. )rFieldProcessor_releaser:rrrrFrzFieldProcessor.releasecCrr$)rrrdisown_FieldProcessorrr:rrrrUrzFieldProcessor.__disown__N)rrr=rTr>rrrr7rdelete_FieldProcessorr@rrrrrrr@-rr@c@sFeZdZdZeddddddZeZej Z ej Z ej ZejZejZejZejZejZejZejZejZejZ ej!Z"ej#Z$ej%Z&ej'Z(ej)Z*ej+Z,ej-Z.ddZ/ej0Z1d d Z2d d Z3d0ddZ4ddZ5ddZ6ddZ7ddZ8ddZ9ddZ:ddZ;ddZd$d%Z?d&d'Z@d0d(d)ZAd*d+ZBd,d-ZCd.d/ZDd S)1 QueryParserzC Build a Xapian::Query object from a user query string. cCr#r$r%r&rrrr(er)zQueryParser.cCr*r$r%r+rrrr(er-r.r/cCr)zU Default constructor. Xapian::QueryParser::QueryParser() N)rQueryParser_swiginitnew_QueryParserr:rrrr7{rzQueryParser.__init__cCr)a Set the stemmer. void Xapian::QueryParser::set_stemmer(const Xapian::Stem &stemmer) This sets the stemming algorithm which will be used by the query parser. The stemming algorithm will be used according to the stemming strategy set by set_stemming_strategy(). As of 1.3.1, this defaults to STEM_SOME, but in earlier versions the default was STEM_NONE. If you want to work with older versions, you should explicitly set a stemming strategy as well as setting a stemmer, otherwise your stemmer won't actually be used. Parameters: ----------- stemmer: The Xapian::Stem object to set. )rQueryParser_set_stemmerrrrrr zQueryParser.set_stemmercCr)a Set the stemming strategy. void Xapian::QueryParser::set_stemming_strategy(stem_strategy strategy) This controls how the query parser will apply the stemming algorithm. Note that the stemming algorithm is only applied to words in free-text fields - boolean filter terms are never stemmed. Parameters: ----------- strategy: The strategy to use - possible values are: STEM_NONE: Don't perform any stemming. (default in Xapian <= 1.3.0) STEM_SOME: Stem all terms except for those which start with a capital letter, or are followed by certain characters (currently: (/@<>=*[{" ), or are used with operators which need positional information. Stemmed terms are prefixed with 'Z'. (default in Xapian >= 1.3.1) STEM_SOME_FULL_POS: Like STEM_SOME but also stems terms used with operators which need positional information. Added in Xapian 1.4.8. STEM_ALL: Stem all terms (note: no 'Z' prefix is added). STEM_ALL_Z: Stem all terms (note: 'Z' prefix is added). (new in Xapian 1.2.11 and 1.3.1) )r!QueryParser_set_stemming_strategyrrrrrs z!QueryParser.set_stemming_strategyNcCr)z Set the stopper. void Xapian::QueryParser::set_stopper(const Stopper *stop=NULL) Parameters: ----------- stop: The Stopper object to set (default NULL, which means no stopwords). )rQueryParser_set_stopperrrrrrr_zQueryParser.set_stoppercCr)a| Set the default operator. void Xapian::QueryParser::set_default_op(Query::op default_op) Parameters: ----------- default_op: The operator to use to combine non-filter query items when no explicit operator is used. So for example, 'weather forecast' is parsed as if it were 'weather OR forecast' by default. The most useful values for this are OP_OR (the default) and OP_AND. OP_NEAR, OP_PHRASE, OP_ELITE_SET, OP_SYNONYM and OP_MAX are also permitted. Passing other values will result in InvalidArgumentError being thrown. )rQueryParser_set_default_op)r default_oprrrset_default_op zQueryParser.set_default_opcCrH)zu Get the current default operator. Query::op Xapian::QueryParser::get_default_op() const )rQueryParser_get_default_opr:rrrget_default_oprKzQueryParser.get_default_opcCr)a_ Specify the database being searched. void Xapian::QueryParser::set_database(const Database &db) Parameters: ----------- db: The database to use for spelling correction (FLAG_SPELLING_CORRECTION), and synonyms (FLAG_SYNONYM, FLAG_AUTO_SYNONYMS, and FLAG_AUTO_MULTIWORD_SYNONYMS). )rQueryParser_set_databaserrrrrrzQueryParser.set_databasecGr)aX Specify the maximum expansion of a wildcard and/or partial term. void Xapian::QueryParser::set_max_expansion(Xapian::termcount max_expansion, int max_type=Xapian::Query::WILDCARD_LIMIT_ERROR, unsigned flags=FLAG_WILDCARD|FLAG_PARTIAL) Note: you must also set FLAG_WILDCARD and/or FLAG_PARTIAL in the flags parameter to parse_query() for this setting to have anything to affect. If you don't call this method, the default settings are no limit on wildcard expansion, and partial terms expanding to the most frequent 100 terms - i.e. as if you'd called: set_max_expansion(0); set_max_expansion(100, Xapian::Query::WILDCARD_LIMIT_MOST_FREQUENT, Xapian::QueryParser::FLAG_PARTIAL); Parameters: ----------- max_expansion: The maximum number of terms each wildcard in the query can expand to, or 0 for no limit (which is the default). max_type: Xapian::Query::WILDCARD_LIMIT_ERROR, Xapian::Query::WILDCARD_LIMIT_FIRST or Xapian::Query::WILDCARD_LIMIT_MOST_FREQUENT (default: Xapian::Query::WILDCARD_LIMIT_ERROR). flags: What to set the limit for (default: FLAG_WILDCARD|FLAG_PARTIAL, setting the limit for both wildcards and partial terms). 1.3.3 )rQueryParser_set_max_expansionrdrrrset_max_expansionr2zQueryParser.set_max_expansioncCr)a Specify the maximum expansion of a wildcard. void Xapian::QueryParser::set_max_wildcard_expansion(Xapian::termcount) If any wildcard expands to more than max_expansion terms, an exception will be thrown. This method is provided for API compatibility with Xapian 1.2.x and is deprecated - replace it with: set_max_wildcard_expansion(max_expansion, Xapian::Query::WILDCARD_LIMIT_ERROR, Xapian::QueryParser::FLAG_WILDCARD); )r&QueryParser_set_max_wildcard_expansionrarg2rrrset_max_wildcard_expansion2r;z&QueryParser.set_max_wildcard_expansioncGr)a  Parse a query. Query Xapian::QueryParser::parse_query(const std::string &query_string, unsigned flags=FLAG_DEFAULT, const std::string &default_prefix=std::string()) Parameters: ----------- query_string: A free-text query as entered by a user flags: Zero or more QueryParser::feature_flag specifying what features the QueryParser should support. Combine multiple values with bitwise-or (|) (default FLAG_DEFAULT). default_prefix: The default term prefix to use (default none). For example, you can pass "A" when parsing an "Author" field. Parameters: ----------- If: the query string can't be parsed, then Xapian::QueryParserError is thrown. You can get an English error message to report to the user by catching it and calling get_msg() on the caught exception. The current possible values (in case you want to translate them) are: Unknown range operation parse error Syntax: AND Syntax: AND NOT Syntax: NOT Syntax: OR Syntax: XOR )rQueryParser_parse_queryrdrrr parse_queryHs,zQueryParser.parse_querycGr)z Register a FieldProcessor. void Xapian::QueryParser::add_prefix(const std::string &field, Xapian::FieldProcessor *proc) )rQueryParser_add_prefixrdrrr add_prefixwrzQueryParser.add_prefixcGr)aL Register a FieldProcessor for a boolean prefix. void Xapian::QueryParser::add_boolean_prefix(const std::string &field, Xapian::FieldProcessor *proc, bool exclusive) This is an older version of this method - use the version with the grouping parameter in preference to this one. )rQueryParser_add_boolean_prefixrdrrradd_boolean_prefixs zQueryParser.add_boolean_prefixcCrH)z Begin iterator over terms omitted from the query as stopwords. TermIterator Xapian::QueryParser::stoplist_begin() const )rQueryParser__stoplist_beginr:rrr_stoplist_beginrKzQueryParser._stoplist_begincCrH)z End iterator over terms omitted from the query as stopwords. TermIterator Xapian::QueryParser::stoplist_end() const )rQueryParser__stoplist_endr:rrr _stoplist_endrKzQueryParser._stoplist_endcCr)z Begin iterator over unstemmed forms of the given stemmed query term. TermIterator Xapian::QueryParser::unstem_begin(const std::string &term) const )rQueryParser__unstem_beginrrrr _unstem_beginrqzQueryParser._unstem_begincCr)z End iterator over unstemmed forms of the given stemmed query term. TermIterator Xapian::QueryParser::unstem_end(const std::string &) const )rQueryParser__unstem_endrWrrr _unstem_endrqzQueryParser._unstem_endcCr)z Register a RangeProcessor. void Xapian::QueryParser::add_rangeprocessor(Xapian::RangeProcessor *range_proc, const std::string *grouping=NULL) )rQueryParser_add_rangeprocessor)r range_procgroupingrrradd_rangeprocessor zQueryParser.add_rangeprocessorcCr)a_ Register a ValueRangeProcessor. void Xapian::QueryParser::add_valuerangeprocessor(Xapian::ValueRangeProcessor *vrproc) This method is provided for API compatibility with Xapian 1.2.x and is deprecated - use add_rangeprocessor() with a RangeProcessor instead. Compatibility shim. )r#QueryParser_add_valuerangeprocessorrvrprocrrradd_valuerangeprocessorrz#QueryParser.add_valuerangeprocessorcCrH)aO Get the spelling-corrected query string. std::string Xapian::QueryParser::get_corrected_query_string() const This will only be set if FLAG_SPELLING_CORRECTION is specified when QueryParser::parse_query() was last called. If there were no corrections, an empty string is returned. )r&QueryParser_get_corrected_query_stringr:rrrget_corrected_query_stringrz&QueryParser.get_corrected_query_stringcCrH)z~ Return a string describing this object. std::string Xapian::QueryParser::get_description() const )rQueryParser___str__r:rrrrrKzQueryParser.__str__r$)Errr=rTr>rrrrQueryParser_FLAG_BOOLEAN FLAG_BOOLEANQueryParser_FLAG_PHRASE FLAG_PHRASEQueryParser_FLAG_LOVEHATE FLAG_LOVEHATE!QueryParser_FLAG_BOOLEAN_ANY_CASEFLAG_BOOLEAN_ANY_CASEQueryParser_FLAG_WILDCARD FLAG_WILDCARDQueryParser_FLAG_PURE_NOT FLAG_PURE_NOTQueryParser_FLAG_PARTIAL FLAG_PARTIAL$QueryParser_FLAG_SPELLING_CORRECTIONFLAG_SPELLING_CORRECTIONQueryParser_FLAG_SYNONYM FLAG_SYNONYMQueryParser_FLAG_AUTO_SYNONYMSFLAG_AUTO_SYNONYMS(QueryParser_FLAG_AUTO_MULTIWORD_SYNONYMSFLAG_AUTO_MULTIWORD_SYNONYMSQueryParser_FLAG_CJK_NGRAMrQueryParser_FLAG_ACCUMULATEFLAG_ACCUMULATEQueryParser_FLAG_DEFAULT FLAG_DEFAULTQueryParser_STEM_NONErQueryParser_STEM_SOMErQueryParser_STEM_ALLr QueryParser_STEM_ALL_Zr QueryParser_STEM_SOME_FULL_POSr r7delete_QueryParserr@rrrrOrRrrUrYr[r]r_rarcrergrkrprrrrrrrrF^sX  # */      rFcCrHr$)rsortable_serialise)rrrrrrWrcCrHr$)rsortable_unserialiserUrrrrrWrc@sHeZdZdZeddddddZeZddZd d Z d d Z e j Z d S)ValueSetMatchDeciderzl MatchDecider filtering results based on whether document values are in a user- defined set. cCr#r$r%r&rrrr(r)zValueSetMatchDecider.cCr*r$r%r+rrrr(r-r.r/cCr)a Construct a ValueSetMatchDecider. Xapian::ValueSetMatchDecider::ValueSetMatchDecider(Xapian::valueno slot, bool inclusive_) Parameters: ----------- slot: The value slot number to look in. inclusive_: If true, match decider accepts documents which have a value in the specified slot which is a member of the test set; if false, match decider accepts documents which do not have a value in the specified slot. N)rValueSetMatchDecider_swiginitnew_ValueSetMatchDecider)rr inclusive_rrrr7!szValueSetMatchDecider.__init__cCr)z Add a value to the test set. void Xapian::ValueSetMatchDecider::add_value(const std::string &value) Parameters: ----------- value: The value to add to the test set. )rValueSetMatchDecider_add_valuerrrrrr6rkzValueSetMatchDecider.add_valuecCr)z Remove a value from the test set. void Xapian::ValueSetMatchDecider::remove_value(const std::string &value) Parameters: ----------- value: The value to remove from the test set. )r!ValueSetMatchDecider_remove_valuerrrrrFr_z!ValueSetMatchDecider.remove_valueN)rrr=rTr>rrrr7rrrdelete_ValueSetMatchDeciderr@rrrrrs rc@s~eZdZdZeddddddZddZeZe j Z e j Z e jZe jZe jZe jZd d Zd d Zd dZddZddZdS)Weightz7 Abstract base class for weighting schemes. cCr#r$r%r&rrrr(cr)zWeight.cCr*r$r%r+rrrr(cr-r.r/cOr1r2r3r4rrrr7er8zWeight.__init__cCrH)a Return the name of this weighting scheme. virtual std::string Xapian::Weight::name() const This name is used by the remote backend. It is passed along with the serialised parameters to the remote server so that it knows which class to create. Return the full namespace-qualified name of your class here - if your class is called FooWeight, return "FooWeight" from this method ( Xapian::BM25Weight returns "Xapian::BM25Weight" here). If you don't want to support the remote backend, you can use the default implementation which simply returns an empty string. )r Weight_namer:rrrro z Weight.namecCr$)ap Calculate the weight contribution for this object's term to a document. virtual double Xapian::Weight::get_sumpart(Xapian::termcount wdf, Xapian::termcount doclen, Xapian::termcount uniqterms) const =0 The parameters give information about the document which may be used in the calculations: Parameters: ----------- wdf: The within document frequency of the term in the document. doclen: The document's length (unnormalised). uniqterms: Number of unique terms in the document (used for absolute smoothing). )rWeight_get_sumpart)rwdfdoclen uniqtermsrrr get_sumpartszWeight.get_sumpartcCrH)a1 Return an upper bound on what get_sumpart() can return for any document. virtual double Xapian::Weight::get_maxpart() const =0 This information is used by the matcher to perform various optimisations, so strive to make the bound as tight as possible. )rWeight_get_maxpartr:rrr get_maxpartrSzWeight.get_maxpartcCr)a Calculate the term-independent weight component for a document. virtual double Xapian::Weight::get_sumextra(Xapian::termcount doclen, Xapian::termcount uniqterms) const =0 The parameter gives information about the document which may be used in the calculations: Parameters: ----------- doclen: The document's length (unnormalised). uniqterms: The number of unique terms in the document. )rWeight_get_sumextra)rrrrrr get_sumextrazWeight.get_sumextracCrH)a3 Return an upper bound on what get_sumextra() can return for any document. virtual double Xapian::Weight::get_maxextra() const =0 This information is used by the matcher to perform various optimisations, so strive to make the bound as tight as possible. )rWeight_get_maxextrar:rrr get_maxextrarSzWeight.get_maxextraN)rrr=rTr>rr7rrrWeight_TWO_STAGE_SMOOTHINGTWO_STAGE_SMOOTHINGWeight_DIRICHLET_SMOOTHINGDIRICHLET_SMOOTHING"Weight_ABSOLUTE_DISCOUNT_SMOOTHINGABSOLUTE_DISCOUNT_SMOOTHINGWeight_JELINEK_MERCER_SMOOTHINGJELINEK_MERCER_SMOOTHINGWeight_DIRICHLET_PLUS_SMOOTHINGDIRICHLET_PLUS_SMOOTHING delete_Weightr@rrrrrrrrrr\s  rc@r) BoolWeightzy Class implementing a "boolean" weighting scheme. This weighting scheme gives all documents zero weight. cCr#r$r%r&rrrr(r)zBoolWeight.cCr*r$r%r+rrrr(r-r.r/cCr)zV Construct a BoolWeight. Xapian::BoolWeight::BoolWeight() N)rBoolWeight_swiginitnew_BoolWeightr:rrrr7rzBoolWeight.__init__N) rrr=rTr>rrrr7rdelete_BoolWeightr@rrrrrs  rc@r) TfIdfWeightzN Xapian::Weight subclass implementing the tf-idf weighting scheme. cCr#r$r%r&rrrr(r)zTfIdfWeight.cCr*r$r%r+rrrr(r-r.r/cGra)z Construct a TfIdfWeight using the default normalizations ("ntn"). Xapian::TfIdfWeight::TfIdfWeight() N)rTfIdfWeight_swiginitnew_TfIdfWeightrdrrrr7zTfIdfWeight.__init__N) rrr=rTr>rrrr7rdelete_TfIdfWeightr@rrrrrs  rc@r) BM25WeightzQ Xapian::Weight subclass implementing the BM25 probabilistic formula. cCr#r$r%r&rrrr(r)zBM25Weight.cCr*r$r%r+rrrr(r-r.r/cGra)z!Xapian::BM25Weight::BM25Weight() N)rBM25Weight_swiginitnew_BM25Weightrdrrrr7zBM25Weight.__init__N) rrr=rTr>rrrr7rdelete_BM25Weightr@rrrrr   rc@r) BM25PlusWeightzR Xapian::Weight subclass implementing the BM25+ probabilistic formula. cCr#r$r%r&rrrr($r)zBM25PlusWeight.cCr*r$r%r+rrrr($r-r.r/cGra)z)Xapian::BM25PlusWeight::BM25PlusWeight() N)rBM25PlusWeight_swiginitnew_BM25PlusWeightrdrrrr7'rzBM25PlusWeight.__init__N) rrr=rTr>rrrr7rdelete_BM25PlusWeightr@rrrrrrrc@:eZdZdZeddddddZeZd dd Ze j Z d S) TradWeighta Xapian::Weight subclass implementing the traditional probabilistic formula. This class implements the "traditional" Probabilistic Weighting scheme, as described by the early papers on Probabilistic Retrieval. BM25 generally gives better results. TradWeight(k) is equivalent to BM25Weight(k, 0, 0, 1, 0), except that the latter returns weights (k+1) times larger. cCr#r$r%r&rrrr(=r)zTradWeight.cCr*r$r%r+rrrr(=r-r.r/rcCr)a Construct a TradWeight. Xapian::TradWeight::TradWeight(double k=1.0) Parameters: ----------- k: A non-negative parameter controlling how influential within- document- frequency (wdf) and document length are. k=0 means that wdf and document length don't affect the weights. The larger k is, the more they do. (default 1) N)rTradWeight_swiginitnew_TradWeight)rkrrrr7@rzTradWeight.__init__Nr) rrr=rTr>rrrr7rdelete_TradWeightr@rrrrr.s   rc@r) InL2Weighta1 This class implements the InL2 weighting scheme. InL2 is a representative scheme of the Divergence from Randomness Framework by Gianni Amati. This weighting scheme is useful for tasks that require early precision. It uses the Inverse document frequency model (In), the Laplace method to find the aftereffect of sampling (L) and the second wdf normalization proposed by Amati to normalize the wdf in the document to the length of the document (H2). For more information about the DFR Framework and the InL2 scheme, please refer to: Gianni Amati and Cornelis Joost Van Rijsbergen Probabilistic models of information retrieval based on measuring the divergence from randomness ACM Transactions on Information Systems (TOIS) 20, (4), 2002, pp. 357-389. cCr#r$r%r&rrrr(mr)zInL2Weight.cCr*r$r%r+rrrr(mr-r.r/cGra)z!Xapian::InL2Weight::InL2Weight() N)rInL2Weight_swiginitnew_InL2Weightrdrrrr7przInL2Weight.__init__N) rrr=rTr>rrrr7rdelete_InL2Weightr@rrrrrUs  rc@r) IfB2Weighta This class implements the IfB2 weighting scheme. IfB2 is a representative scheme of the Divergence from Randomness Framework by Gianni Amati. It uses the Inverse term frequency model (If), the Bernoulli method to find the aftereffect of sampling (B) and the second wdf normalization proposed by Amati to normalize the wdf in the document to the length of the document (H2). For more information about the DFR Framework and the IfB2 scheme, please refer to: Gianni Amati and Cornelis Joost Van Rijsbergen Probabilistic models of information retrieval based on measuring the divergence from randomness ACM Transactions on Information Systems (TOIS) 20, (4), 2002, pp. 357-389. cCr#r$r%r&rrrr(r)zIfB2Weight.cCr*r$r%r+rrrr(r-r.r/cGra)z!Xapian::IfB2Weight::IfB2Weight() N)rIfB2Weight_swiginitnew_IfB2Weightrdrrrr7rzIfB2Weight.__init__N) rrr=rTr>rrrr7rdelete_IfB2Weightr@rrrrrw  rc@r) IneB2Weighta This class implements the IneB2 weighting scheme. IneB2 is a representative scheme of the Divergence from Randomness Framework by Gianni Amati. It uses the Inverse expected document frequency model (Ine), the Bernoulli method to find the aftereffect of sampling (B) and the second wdf normalization proposed by Amati to normalize the wdf in the document to the length of the document (H2). For more information about the DFR Framework and the IneB2 scheme, please refer to: Gianni Amati and Cornelis Joost Van Rijsbergen Probabilistic models of information retrieval based on measuring the divergence from randomness ACM Transactions on Information Systems (TOIS) 20, (4), 2002, pp. 357-389. cCr#r$r%r&rrrr(r)zIneB2Weight.cCr*r$r%r+rrrr(r-r.r/cGra)z#Xapian::IneB2Weight::IneB2Weight() N)rIneB2Weight_swiginitnew_IneB2Weightrdrrrr7rzIneB2Weight.__init__N) rrr=rTr>rrrr7rdelete_IneB2Weightr@rrrrrrrc@r) BB2Weighta This class implements the BB2 weighting scheme. BB2 is a representative scheme of the Divergence from Randomness Framework by Gianni Amati. It uses the Bose-Einstein probabilistic distribution (B) along with Stirling's power approximation, the Bernoulli method to find the aftereffect of sampling (B) and the second wdf normalization proposed by Amati to normalize the wdf in the document to the length of the document (H2). For more information about the DFR Framework and the BB2 scheme, please refer to : Gianni Amati and Cornelis Joost Van Rijsbergen Probabilistic models of information retrieval based on measuring the divergence from randomness ACM Transactions on Information Systems (TOIS) 20, (4), 2002, pp. 357-389. cCr#r$r%r&rrrr(r)zBB2Weight.cCr*r$r%r+rrrr(r-r.r/cGra)zXapian::BB2Weight::BB2Weight() N)rBB2Weight_swiginit new_BB2Weightrdrrrr7rzBB2Weight.__init__N) rrr=rTr>rrrr7rdelete_BB2Weightr@rrrrrs  rc@r) DLHWeighta This class implements the DLH weighting scheme, which is a representative scheme of the Divergence from Randomness Framework by Gianni Amati. This is a parameter free weighting scheme and it should be used with query expansion to obtain better results. It uses the HyperGeometric Probabilistic model and Laplace's normalization to calculate the risk gain. For more information about the DFR Framework and the DLH scheme, please refer to : a.) Gianni Amati and Cornelis Joost Van Rijsbergen Probabilistic models of information retrieval based on measuring the divergence from randomness ACM Transactions on Information Systems (TOIS) 20, (4), 2002, pp. 357-389. b.) FUB, IASI-CNR and University of Tor Vergata at TREC 2007 Blog Track. G. Amati and E. Ambrosi and M. Bianchi and C. Gaibisso and G. Gambosi. Proceedings of the 16th Text REtrieval Conference (TREC-2007), 2008. cCr#r$r%r&rrrr(r)zDLHWeight.cCr*r$r%r+rrrr(r-r.r/cCr)zXapian::DLHWeight::DLHWeight() N)rDLHWeight_swiginit new_DLHWeightr:rrrr7szDLHWeight.__init__N) rrr=rTr>rrrr7rdelete_DLHWeightr@rrrrrs  rc@r) PL2Weighta This class implements the PL2 weighting scheme. PL2 is a representative scheme of the Divergence from Randomness Framework by Gianni Amati. This weighting scheme is useful for tasks that require early precision. It uses the Poisson approximation of the Binomial Probabilistic distribution (P) along with Stirling's approximation for the factorial value, the Laplace method to find the aftereffect of sampling (L) and the second wdf normalization proposed by Amati to normalize the wdf in the document to the length of the document (H2). For more information about the DFR Framework and the PL2 scheme, please refer to : Gianni Amati and Cornelis Joost Van Rijsbergen Probabilistic models of information retrieval based on measuring the divergence from randomness ACM Transactions on Information Systems (TOIS) 20, (4), 2002, pp. 357-389. cCr#r$r%r&rrrr(r)zPL2Weight.cCr*r$r%r+rrrr(r-r.r/cGra)zXapian::PL2Weight::PL2Weight() N)rPL2Weight_swiginit new_PL2Weightrdrrrr7rzPL2Weight.__init__N) rrr=rTr>rrrr7rdelete_PL2Weightr@rrrrrs  rc@r) PL2PlusWeightzQ Xapian::Weight subclass implementing the PL2+ probabilistic formula. cCr#r$r%r&rrrr(!r)zPL2PlusWeight.cCr*r$r%r+rrrr(!r-r.r/cGra)z'Xapian::PL2PlusWeight::PL2PlusWeight() N)rPL2PlusWeight_swiginitnew_PL2PlusWeightrdrrrr7$rzPL2PlusWeight.__init__N) rrr=rTr>rrrr7rdelete_PL2PlusWeightr@rrrrrrrc@r) DPHWeighta This class implements the DPH weighting scheme. DPH is a representative scheme of the Divergence from Randomness Framework by Gianni Amati. This is a parameter free weighting scheme and it should be used with query expansion to obtain better results. It uses the HyperGeometric Probabilistic model and Popper's normalization to calculate the risk gain. For more information about the DFR Framework and the DPH scheme, please refer to : a.) Gianni Amati and Cornelis Joost Van Rijsbergen Probabilistic models of information retrieval based on measuring the divergence from randomness ACM Transactions on Information Systems (TOIS) 20, (4), 2002, pp. 357-389. b.) FUB, IASI-CNR and University of Tor Vergata at TREC 2007 Blog Track. G. Amati and E. Ambrosi and M. Bianchi and C. Gaibisso and G. Gambosi. Proceedings of the 16th Text Retrieval Conference (TREC-2007), 2008. cCr#r$r%r&rrrr(Cr)zDPHWeight.cCr*r$r%r+rrrr(Cr-r.r/cCr)zS Construct a DPHWeight. Xapian::DPHWeight::DPHWeight() N)rDPHWeight_swiginit new_DPHWeightr:rrrr7FrzDPHWeight.__init__N) rrr=rTr>rrrr7rdelete_DPHWeightr@rrrrr+s  rc@r) LMWeighta Xapian::Weight subclass implementing the Language Model formula. This class implements the "Language Model" Weighting scheme, as described by the early papers on LM by Bruce Croft. LM works by comparing the query to a Language Model of the document. The language model itself is parameter-free, though LMWeight takes parameters which specify the smoothing used. cCr#r$r%r&rrrr(ar)zLMWeight.cCr*r$r%r+rrrr(ar-r.r/cGra)af Construct a LMWeight. Xapian::LMWeight::LMWeight(double param_log_=0.0, type_smoothing select_smoothing_=TWO_STAGE_SMOOTHING, double param_smoothing1_=-1.0, double param_smoothing2_=-1.0) Parameters: ----------- param_log_: A non-negative parameter controlling how much to clamp negative values returned by the log. The log is calculated by multiplying the actual weight by param_log. If param_log is 0.0, then the document length upper bound will be used (default: document length upper bound) select_smoothing_: A parameter of type enum type_smoothing. This parameter controls which smoothing type to use. (default: TWO_STAGE_SMOOTHING) param_smoothing1_: A non-negative parameter for smoothing whose meaning depends on select_smoothing_. In JELINEK_MERCER_SMOOTHING, it plays the role of estimation and in DIRICHLET_SMOOTHING the role of query modelling. (default JELINEK_MERCER, ABSOLUTE, TWOSTAGE(0.7), DIRCHLET(2000)) param_smoothing2_: A non-negative parameter which is used with TWO_STAGE_SMOOTHING as parameter for Dirichlet's smoothing (default: 2000) and as parameter delta to control the scale of the tf lower bound in the DIRICHLET_PLUS_SMOOTHING (default 0.05). N)rLMWeight_swiginit new_LMWeightrdrrrr7ds"zLMWeight.__init__N) rrr=rTr>rrrr7rdelete_LMWeightr@rrrrrSs   #rc@r) CoordWeightz Xapian::Weight subclass implementing Coordinate Matching. Each matching term score one point. See Managing Gigabytes, Second Edition p181. cCr#r$r%r&rrrr(r)zCoordWeight.cCr*r$r%r+rrrr(r-r.r/cCr)a Allow the subclass to perform any initialisation it needs to. void Xapian::CoordWeight::init(double factor_) Parameters: ----------- factor: Any scaling factor (e.g. from OP_SCALE_WEIGHT). If the Weight object is for the term-independent weight supplied by get_sumextra()/get_maxextra(), then init(0.0) is called (starting from Xapian 1.2.11 and 1.3.1 - earlier versions failed to call init() for such Weight objects). )rCoordWeight_init)rfactor_rrrinitr#zCoordWeight.initcCr)zY Construct a CoordWeight. Xapian::CoordWeight::CoordWeight() N)rCoordWeight_swiginitnew_CoordWeightr:rrrr7rzCoordWeight.__init__N) rrr=rTr>rrrrr7rdelete_CoordWeightr@rrrrrs  rc@seZdZdZeddddddZeZej Z ej Z ej ZddZejZd d Zd d Zd dZddZddZddZddZddZddZddZdS) Compactorz> Compact a database, or merge and compact several. cCr#r$r%r&rrrr(r)zCompactor.cCr*r$r%r+rrrr(r-r.r/cCr)zXapian::Compactor::Compactor() N)rrrCompactor_swiginit new_Compactorrrrrr7s zCompactor.__init__cCr)a Set the block size to use for tables in the output database. void Xapian::Compactor::set_block_size(size_t block_size) Parameters: ----------- block_size: The block size to use. Valid block sizes are currently powers of two between 2048 and 65536, with the default being 8192, but the valid sizes and default may change in the future. )rCompactor_set_block_size)r block_sizerrrset_block_sizerzCompactor.set_block_sizecCr)ah Set whether to preserve existing document id values. void Xapian::Compactor::set_renumber(bool renumber) Parameters: ----------- renumber: The default is true, which means that document ids will be renumbered - currently by applying the same offset to all the document ids in a particular source database. If false, then the document ids must be unique over all source databases. Currently the ranges of document ids in each source must not overlap either, though this restriction may be removed in the future. )rCompactor_set_renumber)rrenumberrrr set_renumber zCompactor.set_renumbercCr)a Set whether to merge postlists in multiple passes. void Xapian::Compactor::set_multipass(bool multipass) Parameters: ----------- multipass: If true and merging more than 3 databases, merge the postlists in multiple passes, which is generally faster but requires more disk space for temporary files. By default we don't do this. )rCompactor_set_multipass)r multipassrrr set_multipassrzCompactor.set_multipasscCr)a Set the compaction level. void Xapian::Compactor::set_compaction_level(compaction_level compaction) Parameters: ----------- compaction: Available values are: Xapian::Compactor::STANDARD - Don't split items unnecessarily. Xapian::Compactor::FULL - Split items whenever it saves space (the default). Xapian::Compactor::FULLER - Allow oversize items to save more space (not recommended if you ever plan to update the compacted database). )rCompactor_set_compaction_level)r compactionrrrset_compaction_level rPzCompactor.set_compaction_levelcCr)a  Set where to write the output. void Xapian::Compactor::set_destdir(const std::string &destdir) Deprecated Use Database::compact(destdir[, compactor]) instead. Parameters: ----------- destdir: Output path. This can be the same as an input if that input is a stub database (in which case the database(s) listed in the stub will be compacted to a new database and then the stub will be atomically updated to point to this new database). )rCompactor_set_destdir)rdestdirrrr set_destdir$rzCompactor.set_destdircCr)a Add a source database. void Xapian::Compactor::add_source(const std::string &srcdir) Deprecated Use Database::compact(destdir[, compactor]) instead. Parameters: ----------- srcdir: The path to the source database to add. )rCompactor_add_source)rsrcdirrrr add_source9rzCompactor.add_sourcecCrH)z Perform the actual compaction/merging operation. void Xapian::Compactor::compact() Deprecated Use Database::compact(destdir[, compactor]) instead. )rCompactor_compactr:rrrcompactKr@zCompactor.compactcCr)a Update progress. virtual void Xapian::Compactor::set_status(const std::string &table, const std::string &status) Subclass this method if you want to get progress updates during compaction. This is called for each table first with empty status, And then one or more times with non-empty status. The default implementation does nothing. Parameters: ----------- table: The table currently being compacted. status: A status message. )rCompactor_set_status)rtablestatusrrr set_statusXszCompactor.set_statuscCr$)a Resolve multiple user metadata entries with the same key. virtual std::string Xapian::Compactor::resolve_duplicate_metadata(const std::string &key, size_t num_tags, const std::string tags[]) When merging, if the same user metadata key is set in more than one input, then this method is called to allow this to be resolving in an appropriate way. The default implementation just returns tags[0]. For multipass this will currently get called multiple times for the same key if there are duplicates to resolve in each pass, but this may change in the future. Since 1.4.6, an implementation of this method can return an empty string to indicate that the appropriate result is to not set a value for this user metadata key in the output database. In older versions, you should not return an empty string. Parameters: ----------- key: The metadata key with duplicate entries. num_tags: How many tags there are. tags: An array of num_tags strings containing the tags to merge. )r$Compactor_resolve_duplicate_metadata)rkeynum_tagstagsrrrresolve_duplicate_metadataqs"z$Compactor.resolve_duplicate_metadatacCrr$)rrrdisown_Compactorrr:rrrrrzCompactor.__disown__N)rrr=rTr>rrrrCompactor_STANDARDSTANDARDCompactor_FULLFULLCompactor_FULLERFULLERr7delete_Compactorr@rrr r rrrrrrrrrrrs&  $rc@seZdZdZeddddddZeZddZe j Z d d Z d d Z d dZddZddZddZddZddZddZddZddZdd Zd!d"Zd#d$Zd%d&Zd'd(Zd)S)* PostingSourcezH Base class which provides an "external" source of postings. cCr#r$r%r&rrrr(r)zPostingSource.cCr*r$r%r+rrrr(r-r.r/cCr)zi Allow subclasses to be instantiated. Xapian::PostingSource::PostingSource() N)rr'rPostingSource_swiginitnew_PostingSourcerrrrr7rzPostingSource.__init__cCrH)a A lower bound on the number of documents this object can return. virtual Xapian::doccount Xapian::PostingSource::get_termfreq_min() const =0 Xapian will always call init() on a PostingSource before calling this for the first time. )rPostingSource_get_termfreq_minr:rrrget_termfreq_minrSzPostingSource.get_termfreq_mincCrH)a An estimate of the number of documents this object can return. virtual Xapian::doccount Xapian::PostingSource::get_termfreq_est() const =0 It must always be true that: get_termfreq_min() <= get_termfreq_est() <= get_termfreq_max() Xapian will always call init() on a PostingSource before calling this for the first time. )rPostingSource_get_termfreq_estr:rrrget_termfreq_estrLzPostingSource.get_termfreq_estcCrH)a An upper bound on the number of documents this object can return. virtual Xapian::doccount Xapian::PostingSource::get_termfreq_max() const =0 Xapian will always call init() on a PostingSource before calling this for the first time. )rPostingSource_get_termfreq_maxr:rrrget_termfreq_maxrSzPostingSource.get_termfreq_maxcCr)a Specify an upper bound on what get_weight() will return from now on. void Xapian::PostingSource::set_maxweight(double max_weight) This upper bound is used by the matcher to perform various optimisations, so if you can return a good bound, then matches will generally run faster. This method should be called after calling init(), and may be called during iteration if the upper bound drops. It is probably only useful to call from subclasses (it was actually a "protected" method prior to Xapian 1.3.4, but that makes it tricky to wrap for other languages). It is valid for the posting source to have returned a higher value from get_weight() earlier in the iteration, but the posting source must not return a higher value from get_weight() than the currently set upper bound, and the upper bound must not be increased (until init() has been called). If you don't call this method, the upper bound will default to 0, for convenience when implementing "weight-less" PostingSource subclasses. Parameters: ----------- max_weight: The upper bound to set. )rPostingSource_set_maxweight)r max_weightrrr set_maxweightrzPostingSource.set_maxweightcCrH)z Return the currently set upper bound on what get_weight() can return. double Xapian::PostingSource::get_maxweight() const )rPostingSource_get_maxweightr:rrr get_maxweightrKzPostingSource.get_maxweightcCrH)a Return the weight contribution for the current document. virtual double Xapian::PostingSource::get_weight() const This default implementation always returns 0, for convenience when implementing "weight-less" PostingSource subclasses. This method may assume that it will only be called when there is a "current document". In detail: Xapian will always call init() on a PostingSource before calling this for the first time. It will also only call this if the PostingSource reports that it is pointing to a valid document (ie, it will not call it before calling at least one of next(), skip_to() or check(), and will ensure that the PostingSource is not at the end by calling at_end()). )rPostingSource_get_weightr:rrrrRrzPostingSource.get_weightcCrH)a Return the current docid. virtual Xapian::docid Xapian::PostingSource::get_docid() const =0 This method may assume that it will only be called when there is a "current document". See get_weight() for details. Note: in the case of a multi-database search, the returned docid should be in the single subdatabase relevant to this posting source. See the init() method for details. )rPostingSource_get_docidr:rrrr4 zPostingSource.get_docidcCr)ak Advance the current position to the next matching document. virtual void Xapian::PostingSource::next(double min_wt)=0 The PostingSource starts before the first entry in the list, so next(), skip_to() or check() must be called before any methods which need the context of the current position. Xapian will always call init() on a PostingSource before calling this for the first time. Parameters: ----------- min_wt: The minimum weight contribution that is needed (this is just a hint which subclasses may ignore). )rPostingSource___next__rmin_wtrrr__next__FrJzPostingSource.__next__cCr)aC Advance to the specified docid. virtual void Xapian::PostingSource::skip_to(Xapian::docid did, double min_wt) 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). If the current position is already the specified docid, this method will leave the position unmodified. If the specified docid is earlier than the current position, the behaviour is unspecified. A sensible behaviour would be to leave the current position unmodified, but it is also reasonable to move to the specified docid. The default implementation calls next() repeatedly, which works but skip_to() can often be implemented much more efficiently. Xapian will always call init() on a PostingSource before calling this for the first time. Note: in the case of a multi-database search, the docid specified is the docid in the single subdatabase relevant to this posting source. See the init() method for details. Parameters: ----------- did: The document id to advance to. min_wt: The minimum weight contribution that is needed (this is just a hint which subclasses may ignore). )rPostingSource_skip_torrr:rrrr^rzPostingSource.skip_tocCr)a' Check if the specified docid occurs. virtual bool Xapian::PostingSource::check(Xapian::docid did, double min_wt) The caller is required to ensure that the specified document id did actually exists in the database. If it does, it must move to that document id, and return true. If it does not, it may either: return true, having moved to a definite position (including "at_end"), which must be the same position as skip_to() would have moved to. or return false, having moved to an "indeterminate" position, such that a subsequent call to next() or skip_to() will move to the next matching position after did. Generally, this method should act like skip_to() and return true if that can be done at little extra cost. Otherwise it should simply check if a particular docid is present, returning true if it is, and false if it isn't. The default implementation calls skip_to() and always returns true. Xapian will always call init() on a PostingSource before calling this for the first time. Note: in the case of a multi-database search, the docid specified is the docid in the single subdatabase relevant to this posting source. See the init() method for details. Parameters: ----------- did: The document id to check. min_wt: The minimum weight contribution that is needed (this is just a hint which subclasses may ignore). )rPostingSource_checkr=rrrr.zPostingSource.checkcCrH)a Return true if the current position is past the last entry in this list. virtual bool Xapian::PostingSource::at_end() const =0 At least one of next(), skip_to() or check() will be called before this method is first called. )rPostingSource_at_endr:rrrat_endrSzPostingSource.at_endcCrH)aD Name of the posting source class. virtual std::string Xapian::PostingSource::name() const This is used when serialising and unserialising posting sources; for example, for performing remote searches. If the subclass is in a C++ namespace, the namespace should be included in the name, using "::" as a separator. For example, for a PostingSource subclass called "FooPostingSource" in the "Xapian" namespace the result of this call should be "Xapian::FooPostingSource". This should only be implemented if serialise() and unserialise() are also implemented. The default implementation returns an empty string. If this returns an empty string, Xapian will assume that serialise() and unserialise() are not implemented. )rPostingSource_namer:rrrrrWzPostingSource.namecCr)a7 Set this PostingSource to the start of the list of postings. virtual void Xapian::PostingSource::init(const Database &db)=0 This is called automatically by the matcher prior to each query being processed. If a PostingSource is used for multiple searches, init() will therefore be called multiple times, and must handle this by using the database passed in the most recent call. Parameters: ----------- db: The database which the PostingSource should iterate through. Note: in the case of a multi-database search, a separate PostingSource will be used for each database (the separate PostingSources will be obtained using clone()), and each PostingSource will be passed one of the sub-databases as the db parameter here. The db parameter will therefore always refer to a single database. All docids passed to, or returned from, the PostingSource refer to docids in that single database, rather than in the multi- database. )rPostingSource_initrrrrr zPostingSource.initcCrH)a Return a string describing this object. virtual std::string Xapian::PostingSource::get_description() const This default implementation returns a generic answer. This default it provided to avoid forcing those deriving their own PostingSource subclass from having to implement this (they may not care what get_description() gives for their subclass). )rPostingSource___str__r:rrrrrzPostingSource.__str__cCrH)a~ Start reference counting this object. const PostingSource* Xapian::PostingSource::release() const You can hand ownership of a dynamically allocated PostingSource object to Xapian by calling release() and then passing the object to a Xapian method. Xapian will arrange to delete the object once it is no longer required. )rPostingSource_releaser:rrrrrzPostingSource.releasecCrr$)rrrdisown_PostingSourcerr:rrrr rzPostingSource.__disown__N)rrr=rTr>rrrr7rdelete_PostingSourcer@r+r-r/r2r4rRrr;rrrArrrrrrrrrr's, $ *1 r'c@seZdZdZeddddddZeZddZd d Z d d Z d dZ ddZ ddZ ddZddZddZddZddZddZdd Zd!d"Zd#d$Zd%d&Zd'd(Zd)d*ZejZd+d,Zd-S).ValuePostingSourcea A posting source which generates weights from a value slot. This is a base class for classes which generate weights using values stored in the specified slot. For example, ValueWeightPostingSource uses sortable_unserialise to convert values directly to weights. The upper bound on the weight returned is set to DBL_MAX. Subclasses should call set_maxweight() in their init() methods after calling ValuePostingSource::init() if they know a tighter bound on the weight. cCr#r$r%r&rrrr(Fr)zValuePostingSource.cCr*r$r%r+rrrr(Fr-r.r/cC,|jtkrd}n|}t|t||dS)z Construct a ValuePostingSource. Xapian::ValuePostingSource::ValuePostingSource(Xapian::valueno slot_) Parameters: ----------- slot_: The value slot to read values from. N)rrIrValuePostingSource_swiginitnew_ValuePostingSourcerslot_rrrrr7Is zValuePostingSource.__init__cCrH)a A lower bound on the number of documents this object can return. Xapian::doccount Xapian::ValuePostingSource::get_termfreq_min() const Xapian will always call init() on a PostingSource before calling this for the first time. )r#ValuePostingSource_get_termfreq_minr:rrrr+\rz#ValuePostingSource.get_termfreq_mincCrH)a{ An estimate of the number of documents this object can return. Xapian::doccount Xapian::ValuePostingSource::get_termfreq_est() const It must always be true that: get_termfreq_min() <= get_termfreq_est() <= get_termfreq_max() Xapian will always call init() on a PostingSource before calling this for the first time. )r#ValuePostingSource_get_termfreq_estr:rrrr-jr7z#ValuePostingSource.get_termfreq_estcCrH)a An upper bound on the number of documents this object can return. Xapian::doccount Xapian::ValuePostingSource::get_termfreq_max() const Xapian will always call init() on a PostingSource before calling this for the first time. )r#ValuePostingSource_get_termfreq_maxr:rrrr/|rz#ValuePostingSource.get_termfreq_maxcCr)af Advance the current position to the next matching document. void Xapian::ValuePostingSource::next(double min_wt) The PostingSource starts before the first entry in the list, so next(), skip_to() or check() must be called before any methods which need the context of the current position. Xapian will always call init() on a PostingSource before calling this for the first time. Parameters: ----------- min_wt: The minimum weight contribution that is needed (this is just a hint which subclasses may ignore). )rValuePostingSource___next__r9rrrr;rJzValuePostingSource.__next__cCr)aF Advance to the specified docid. void Xapian::ValuePostingSource::skip_to(Xapian::docid min_docid, double min_wt) 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). If the current position is already the specified docid, this method will leave the position unmodified. If the specified docid is earlier than the current position, the behaviour is unspecified. A sensible behaviour would be to leave the current position unmodified, but it is also reasonable to move to the specified docid. The default implementation calls next() repeatedly, which works but skip_to() can often be implemented much more efficiently. Xapian will always call init() on a PostingSource before calling this for the first time. Note: in the case of a multi-database search, the docid specified is the docid in the single subdatabase relevant to this posting source. See the init() method for details. Parameters: ----------- did: The document id to advance to. min_wt: The minimum weight contribution that is needed (this is just a hint which subclasses may ignore). )rValuePostingSource_skip_tor min_docidr:rrrrrzValuePostingSource.skip_tocCr)a* Check if the specified docid occurs. bool Xapian::ValuePostingSource::check(Xapian::docid min_docid, double min_wt) The caller is required to ensure that the specified document id did actually exists in the database. If it does, it must move to that document id, and return true. If it does not, it may either: return true, having moved to a definite position (including "at_end"), which must be the same position as skip_to() would have moved to. or return false, having moved to an "indeterminate" position, such that a subsequent call to next() or skip_to() will move to the next matching position after did. Generally, this method should act like skip_to() and return true if that can be done at little extra cost. Otherwise it should simply check if a particular docid is present, returning true if it is, and false if it isn't. The default implementation calls skip_to() and always returns true. Xapian will always call init() on a PostingSource before calling this for the first time. Note: in the case of a multi-database search, the docid specified is the docid in the single subdatabase relevant to this posting source. See the init() method for details. Parameters: ----------- did: The document id to check. min_wt: The minimum weight contribution that is needed (this is just a hint which subclasses may ignore). )rValuePostingSource_checkrTrrrrr?zValuePostingSource.checkcCrH)a Return true if the current position is past the last entry in this list. bool Xapian::ValuePostingSource::at_end() const At least one of next(), skip_to() or check() will be called before this method is first called. )rValuePostingSource_at_endr:rrrrArSzValuePostingSource.at_endcCrH)a Return the current docid. Xapian::docid Xapian::ValuePostingSource::get_docid() const This method may assume that it will only be called when there is a "current document". See get_weight() for details. Note: in the case of a multi-database search, the returned docid should be in the single subdatabase relevant to this posting source. See the init() method for details. )rValuePostingSource_get_docidr:rrrr r7zValuePostingSource.get_docidcCr)a3 Set this PostingSource to the start of the list of postings. void Xapian::ValuePostingSource::init(const Database &db_) This is called automatically by the matcher prior to each query being processed. If a PostingSource is used for multiple searches, init() will therefore be called multiple times, and must handle this by using the database passed in the most recent call. Parameters: ----------- db: The database which the PostingSource should iterate through. Note: in the case of a multi-database search, a separate PostingSource will be used for each database (the separate PostingSources will be obtained using clone()), and each PostingSource will be passed one of the sub-databases as the db parameter here. The db parameter will therefore always refer to a single database. All docids passed to, or returned from, the PostingSource refer to docids in that single database, rather than in the multi- database. )rValuePostingSource_initrdb_rrrrrDzValuePostingSource.initcCrH)z The database we're reading values from. Xapian::Database Xapian::ValuePostingSource::get_database() const Added in 1.2.23 and 1.3.5. )rValuePostingSource_get_databaser:rrr get_database=r@zValuePostingSource.get_databasecCrH)z The slot we're reading values from. Xapian::valueno Xapian::ValuePostingSource::get_slot() const Added in 1.2.23 and 1.3.5. )rValuePostingSource_get_slotr:rrrget_slotJr@zValuePostingSource.get_slotcCrH)z Read current value. std::string Xapian::ValuePostingSource::get_value() const Added in 1.2.23 and 1.3.5. )rValuePostingSource_get_valuer:rrrrWr@zValuePostingSource.get_valuecCrH)z End the iteration. void Xapian::ValuePostingSource::done() Calls to at_end() will return true after calling this method. Added in 1.2.23 and 1.3.5. )rValuePostingSource_doner:rrrdonedrSzValuePostingSource.donecCrH)z Flag indicating if we've started (true if we have). bool Xapian::ValuePostingSource::get_started() const Added in 1.2.23 and 1.3.5. )rValuePostingSource_get_startedr:rrr get_startedsr@zValuePostingSource.get_startedcCr)aK Set a lower bound on the term frequency. void Xapian::ValuePostingSource::set_termfreq_min(Xapian::doccount termfreq_min_) Subclasses should set this if they are overriding the next(), skip_to() or check() methods to return fewer documents. Added in 1.2.23 and 1.3.5. )r#ValuePostingSource_set_termfreq_min)r termfreq_min_rrrset_termfreq_minr_z#ValuePostingSource.set_termfreq_mincCr)a+ An estimate of the term frequency. void Xapian::ValuePostingSource::set_termfreq_est(Xapian::doccount termfreq_est_) Subclasses should set this if they are overriding the next(), skip_to() or check() methods. Added in 1.2.23 and 1.3.5. )r#ValuePostingSource_set_termfreq_est)r termfreq_est_rrrset_termfreq_estr_z#ValuePostingSource.set_termfreq_estcCr)a. An upper bound on the term frequency. void Xapian::ValuePostingSource::set_termfreq_max(Xapian::doccount termfreq_max_) Subclasses should set this if they are overriding the next(), skip_to() or check() methods. Added in 1.2.23 and 1.3.5. )r#ValuePostingSource_set_termfreq_max)r termfreq_max_rrrset_termfreq_maxr_z#ValuePostingSource.set_termfreq_maxcCrr$)rrrdisown_ValuePostingSourcerr:rrrrrzValuePostingSource.__disown__N)rrr=rTr>rrrr7r+r-r/r;rrrArrr]r_rrbrdrgrjrmrdelete_ValuePostingSourcer@rrrrrrI6s0*1     rIc@s`eZdZdZeddddddZeZddZd d Z d d Z d dZ ddZ e jZddZdS)ValueWeightPostingSourcea A posting source which reads weights from a value slot. This returns entries for all documents in the given database which have a non empty values in the specified slot. It returns a weight calculated by applying sortable_unserialise to the value stored in the slot (so the values stored should probably have been calculated by applying sortable_serialise to a floating point number at index time). The upper bound on the weight returned is set using the upper bound on the values in the specified slot, or DBL_MAX if value bounds aren't supported by the current backend. For efficiency, this posting source doesn't check that the stored values are valid in any way, so it will never raise an exception due to invalid stored values. In particular, it doesn't ensure that the unserialised values are positive, which is a requirement for weights. The behaviour if the slot contains values which unserialise to negative values is undefined. cCr#r$r%r&rrrr(r)z!ValueWeightPostingSource.cCr*r$r%r+rrrr(r-r.r/cCrJ)z Construct a ValueWeightPostingSource. Xapian::ValueWeightPostingSource::ValueWeightPostingSource(Xapian::valueno slot_) Parameters: ----------- slot_: The value slot to read values from. N)rrpr!ValueWeightPostingSource_swiginitnew_ValueWeightPostingSourcerMrrrr7s z!ValueWeightPostingSource.__init__cCrH)a Return the weight contribution for the current document. double Xapian::ValueWeightPostingSource::get_weight() const This default implementation always returns 0, for convenience when implementing "weight-less" PostingSource subclasses. This method may assume that it will only be called when there is a "current document". In detail: Xapian will always call init() on a PostingSource before calling this for the first time. It will also only call this if the PostingSource reports that it is pointing to a valid document (ie, it will not call it before calling at least one of next(), skip_to() or check(), and will ensure that the PostingSource is not at the end by calling at_end()). )r#ValueWeightPostingSource_get_weightr:rrrrRrz#ValueWeightPostingSource.get_weightcCrH)aG Name of the posting source class. std::string Xapian::ValueWeightPostingSource::name() const This is used when serialising and unserialising posting sources; for example, for performing remote searches. If the subclass is in a C++ namespace, the namespace should be included in the name, using "::" as a separator. For example, for a PostingSource subclass called "FooPostingSource" in the "Xapian" namespace the result of this call should be "Xapian::FooPostingSource". This should only be implemented if serialise() and unserialise() are also implemented. The default implementation returns an empty string. If this returns an empty string, Xapian will assume that serialise() and unserialise() are not implemented. )rValueWeightPostingSource_namer:rrrrrWzValueWeightPostingSource.namecCr)a9 Set this PostingSource to the start of the list of postings. void Xapian::ValueWeightPostingSource::init(const Database &db_) This is called automatically by the matcher prior to each query being processed. If a PostingSource is used for multiple searches, init() will therefore be called multiple times, and must handle this by using the database passed in the most recent call. Parameters: ----------- db: The database which the PostingSource should iterate through. Note: in the case of a multi-database search, a separate PostingSource will be used for each database (the separate PostingSources will be obtained using clone()), and each PostingSource will be passed one of the sub-databases as the db parameter here. The db parameter will therefore always refer to a single database. All docids passed to, or returned from, the PostingSource refer to docids in that single database, rather than in the multi- database. )rValueWeightPostingSource_initrZrrrr*rDzValueWeightPostingSource.initcCrH)a Return a string describing this object. std::string Xapian::ValueWeightPostingSource::get_description() const This default implementation returns a generic answer. This default it provided to avoid forcing those deriving their own PostingSource subclass from having to implement this (they may not care what get_description() gives for their subclass). )r ValueWeightPostingSource___str__r:rrrrIrz ValueWeightPostingSource.__str__cCrr$)rrrdisown_ValueWeightPostingSourcerr:rrrrYrz#ValueWeightPostingSource.__disown__N)rrr=rTr>rrrr7rRrrrrdelete_ValueWeightPostingSourcer@rrrrrrps rpc@r) "DecreasingValueWeightPostingSourcea Read weights from a value which is known to decrease as docid increases. This posting source can be used, like ValueWeightPostingSource, to add a weight contribution to a query based on the values stored in a slot. The values in the slot must be serialised as by sortable_serialise(). However, this posting source is additionally given a range of document IDs, within which the weight is known to be decreasing. ie, for all documents with ids A and B within this range (including the endpoints), where A is less than B, the weight of A is less than or equal to the weight of B. This can allow the posting source to skip to the end of the range quickly if insufficient weight is left in the posting source for a particular source. By default, the range is assumed to cover all document IDs. The ordering property can be arranged at index time, or by sorting an indexed database to produce a new, sorted, database. cCr#r$r%r&rrrr(}r)z+DecreasingValueWeightPostingSource.cCr*r$r%r+rrrr(}r-r.r/r cCst|t|||dS)aH Construct a DecreasingValueWeightPostingSource. Xapian::DecreasingValueWeightPostingSource::DecreasingValueWeightPostingSource(Xapian::valueno slot_, Xapian::docid range_start_=0, Xapian::docid range_end_=0) Parameters: ----------- slot_: The value slot to read values from. range_start_: Start of range of docids for which weights are known to be decreasing (default: first docid) range_end_: End of range of docids for which weights are known to be decreasing (default: last docid) N)r+DecreasingValueWeightPostingSource_swiginit&new_DecreasingValueWeightPostingSource)rrN range_start_ range_end_rrrr7sz+DecreasingValueWeightPostingSource.__init__Nr r ) rrr=rTr>rrrr7r)delete_DecreasingValueWeightPostingSourcer@rrrrryds   ryc@sPeZdZdZeddddddZeZddZd d Z d d Z d dZ e j ZdS)ValueMapPostingSourcea A posting source which looks up weights in a map using values as the key. This allows will return entries for all documents in the given database which have a value in the slot specified. The values will be mapped to the corresponding weight in the weight map. If there is no mapping for a particular value, the default weight will be returned (which itself defaults to 0.0). cCr#r$r%r&rrrr(r)zValueMapPostingSource.cCr*r$r%r+rrrr(r-r.r/cCr)z Construct a ValueMapPostingSource. Xapian::ValueMapPostingSource::ValueMapPostingSource(Xapian::valueno slot_) Parameters: ----------- slot_: The value slot to read values from. N)rValueMapPostingSource_swiginitnew_ValueMapPostingSource)rrNrrrr7rzValueMapPostingSource.__init__cCr)a Add a mapping. void Xapian::ValueMapPostingSource::add_mapping(const std::string &key, double wt) Parameters: ----------- key: The key looked up from the value slot. wt: The weight to give this key. )r!ValueMapPostingSource_add_mapping)rrr]rrr add_mappingrz!ValueMapPostingSource.add_mappingcCrH)zf Clear all mappings. void Xapian::ValueMapPostingSource::clear_mappings() )r$ValueMapPostingSource_clear_mappingsr:rrrclear_mappingsrKz$ValueMapPostingSource.clear_mappingscCr)z Set a default weight for document values not in the map. void Xapian::ValueMapPostingSource::set_default_weight(double wt) Parameters: ----------- wt: The weight to set as the default. )r(ValueMapPostingSource_set_default_weightr\rrrset_default_weightrkz(ValueMapPostingSource.set_default_weightN)rrr=rTr>rrrr7rrrrdelete_ValueMapPostingSourcer@rrrrrs  rc@r) FixedWeightPostingSourcez A posting source which returns a fixed weight for all documents. This returns entries for all documents in the given database, with a fixed weight (specified by a parameter to the constructor). cCr#r$r%r&rrrr(r)z!FixedWeightPostingSource.cCr*r$r%r+rrrr(r-r.r/cCr)z Construct a FixedWeightPostingSource. Xapian::FixedWeightPostingSource::FixedWeightPostingSource(double wt) Parameters: ----------- wt: The fixed weight to return. N)r!FixedWeightPostingSource_swiginitnew_FixedWeightPostingSourcer\rrrr7rz!FixedWeightPostingSource.__init__N) rrr=rTr>rrrr7rdelete_FixedWeightPostingSourcer@rrrrrs   rc@r)MatchSpyz Abstract base class for match spies. The subclasses will generally accumulate information seen during the match, to calculate aggregate functions, or other profiles of the matching documents. cCr#r$r%r&rrrr(r)zMatchSpy.cCr*r$r%r+rrrr(r-r.r/cCr)zp Default constructor, needed by subclass constructors. Xapian::MatchSpy::MatchSpy() N)rrrMatchSpy_swiginit new_MatchSpyrrrrr7rzMatchSpy.__init__cCrH)a Return the name of this match spy. virtual std::string Xapian::MatchSpy::name() const This name is used by the remote backend. It is passed with the serialised parameters to the remote server so that it knows which class to create. Return the full namespace-qualified name of your class here - if your class is called MyApp::FooMatchSpy, return "MyApp::FooMatchSpy" from this method. If you don't want to support the remote backend in your match spy, you can use the default implementation which simply throws Xapian::UnimplementedError. )r MatchSpy_namer:rrrr* z MatchSpy.namecCr)a Unserialise some results, and merge them into this matchspy. virtual void Xapian::MatchSpy::merge_results(const std::string &serialised) The order in which results are merged should not be significant, since this order is not specified (and will vary depending on the speed of the search in each sub-database). If you don't want to support the remote backend in your match spy, you can use the default implementation which simply throws Xapian::UnimplementedError. Parameters: ----------- serialised: A string containing the serialised results. )rMatchSpy_merge_resultsrrVrrr merge_resultsArPzMatchSpy.merge_resultscCrH)a{ Return a string describing this object. virtual std::string Xapian::MatchSpy::get_description() const This default implementation returns a generic answer, to avoid forcing those deriving their own MatchSpy subclasses from having to implement this (they may not care what get_description() gives for their subclass). )rMatchSpy___str__r:rrrrZrzMatchSpy.__str__cCrH)ao Start reference counting this object. const MatchSpy* Xapian::MatchSpy::release() const You can hand ownership of a dynamically allocated MatchSpy object to Xapian by calling release() and then passing the object to a Xapian method. Xapian will arrange to delete the object once it is no longer required. )rMatchSpy_releaser:rrrrjrzMatchSpy.releasecCrr$)rrrdisown_MatchSpyrr:rrrryrzMatchSpy.__disown__N)rrr=rTr>rrrr7rdelete_MatchSpyr@rrrrrrrrrr s   rc@s`eZdZdZeddddddZeZddZd d Z d d Z d dZ ddZ ddZ ejZdS)ValueCountMatchSpyzX Class for counting the frequencies of values in the matching documents. cCr#r$r%r&rrrr(r)zValueCountMatchSpy.cCr*r$r%r+rrrr(r-r.r/cGra)z Construct a MatchSpy which counts the values in a particular slot. Xapian::ValueCountMatchSpy::ValueCountMatchSpy(Xapian::valueno slot_) N)rValueCountMatchSpy_swiginitnew_ValueCountMatchSpyrdrrrr7s zValueCountMatchSpy.__init__cCrH)z Return the total number of documents tallied. size_t Xapian::ValueCountMatchSpy::get_total() const )rValueCountMatchSpy_get_totalr:rrr get_totalrKzValueCountMatchSpy.get_totalcCrH)aX Get an iterator over the values seen in the slot. TermIterator Xapian::ValueCountMatchSpy::values_begin() const Items will be returned in ascending alphabetical order. During the iteration, the frequency of the current value can be obtained with the get_termfreq() method on the iterator. )rValueCountMatchSpy_values_beginr:rrr values_beginrzValueCountMatchSpy.values_begincCrH)z End iterator corresponding to values_begin() TermIterator Xapian::ValueCountMatchSpy::values_end() const )rValueCountMatchSpy_values_endr:rrr values_endrKzValueCountMatchSpy.values_endcCr)aB Get an iterator over the most frequent values seen in the slot. TermIterator Xapian::ValueCountMatchSpy::top_values_begin(size_t maxvalues) const Items will be returned in descending order of frequency. Values with the same frequency will be returned in ascending alphabetical order. During the iteration, the frequency of the current value can be obtained with the get_termfreq() method on the iterator. Parameters: ----------- maxvalues: The maximum number of values to return. )r#ValueCountMatchSpy_top_values_beginr maxvaluesrrrtop_values_beginrz#ValueCountMatchSpy.top_values_begincCr)z End iterator corresponding to top_values_begin() TermIterator Xapian::ValueCountMatchSpy::top_values_end(size_t) const )r!ValueCountMatchSpy_top_values_endrWrrrtop_values_endrqz!ValueCountMatchSpy.top_values_endN)rrr=rTr>rrrr7rrrrrrdelete_ValueCountMatchSpyr@rrrrrs    rcCrHr$)rmiles_to_metres)milesrrrrrWrcCrHr$)rmetres_to_miles)metresrrrrrWrc@sleZdZdZeddddddZeZeej ej Z eej ej ZddZd d Zd d Zd dZejZdS) LatLongCoorda A latitude-longitude coordinate. Experimental - seehttps://xapian.org/docs/deprecation#experimental- features Note that latitude-longitude coordinates are only precisely meaningful if the datum used to define them is specified. This class ignores this issue - it is up to the caller to ensure that the datum used for each coordinate in a system is consistent. cCr#r$r%r&rrrr(r)zLatLongCoord.cCr*r$r%r+rrrr(r-r.r/cGra)ay Construct a coordinate. Xapian::LatLongCoord::LatLongCoord(double latitude_, double longitude_) If the supplied longitude is out of the standard range, it will be normalised to the range 0 <= longitude < 360. If you want to avoid the checks (for example, you know that your values are already in range), you can use the alternate constructor to construct an uninitialised coordinate, and then set the latitude and longitude directly. Parameters: ----------- InvalidArgumentError: the supplied latitude is out of range. N)rLatLongCoord_swiginitnew_LatLongCoordrdrrrr7szLatLongCoord.__init__cCr)a Unserialise a buffer and set this object to its coordinate. void Xapian::LatLongCoord::unserialise(const char **ptr, const char *end) The buffer may contain further data after that for the coordinate. Parameters: ----------- ptr: A pointer to the start of the string. This will be updated to point to the end of the data representing the coordinate. end: A pointer to the end of the string. Parameters: ----------- Xapian::SerialisationError: if the string does not start with a valid serialised latitude- longitude pair. )rLatLongCoord_unserialiserrrrrT r.zLatLongCoord.unserialisecCrH)z Return a serialised representation of the coordinate. std::string Xapian::LatLongCoord::serialise() const )rLatLongCoord_serialiser:rrrrN<rKzLatLongCoord.serialisecCrH)z Return a string describing this object. std::string Xapian::LatLongCoord::get_description() const )rLatLongCoord___str__r:rrrrGrKzLatLongCoord.__str__N)rrr=rTr>rrrrLatLongCoord_latitude_getLatLongCoord_latitude_setlatitudeLatLongCoord_longitude_getLatLongCoord_longitude_set longituder7rTrNrdelete_LatLongCoordr@rrrrrs rc@r) LatLongCoordsIteratorz An iterator across the values in a LatLongCoords object. Experimental - seehttps://xapian.org/docs/deprecation#experimental- features cCr#r$r%r&rrrr(br)zLatLongCoordsIterator.cCr*r$r%r+rrrr(br-r.r/cCr)z Default constructor. Produces an uninitialised iterator. Xapian::LatLongCoordsIterator::LatLongCoordsIterator() N)rLatLongCoordsIterator_swiginitnew_LatLongCoordsIteratorr:rrrr7erzLatLongCoordsIterator.__init__N) rrr=rTr>rrrr7rdelete_LatLongCoordsIteratorr@rrrrrXs   rc@sxeZdZdZeddddddZeZddZd d Z d d Z d dZ ddZ ddZ ddZddZddZejZdS) LatLongCoordsz A sequence of latitude-longitude coordinates. Experimental - seehttps://xapian.org/docs/deprecation#experimental- features cCr#r$r%r&rrrr(r)zLatLongCoords.cCr*r$r%r+rrrr(r-r.r/cCrH)z Get a begin iterator for the coordinates. LatLongCoordsIterator Xapian::LatLongCoords::begin() const )rLatLongCoords_beginr:rrrbeginrKzLatLongCoords.begincCrH)z Get an end iterator for the coordinates. LatLongCoordsIterator Xapian::LatLongCoords::end() const )rLatLongCoords_endr:rrrendrKzLatLongCoords.endcCrH)zx Get the number of coordinates in the container. size_t Xapian::LatLongCoords::size() const )rLatLongCoords_sizer:rrrr6rKzLatLongCoords.sizecCrH)z Return true if and only if there are no coordinates in the container. bool Xapian::LatLongCoords::empty() const )rLatLongCoords_emptyr:rrrrrKzLatLongCoords.emptycCr)z Append a coordinate to the end of the sequence. void Xapian::LatLongCoords::append(const LatLongCoord &coord) )rLatLongCoords_append)rcoordrrrappendrzLatLongCoords.appendcGra)z Construct a container holding one coordinate. Xapian::LatLongCoords::LatLongCoords(const LatLongCoord &coord) N)rLatLongCoords_swiginitnew_LatLongCoordsrdrrrr7rzLatLongCoords.__init__cCr)a Unserialise a string and set this object to the coordinates in it. void Xapian::LatLongCoords::unserialise(const std::string &serialised) Parameters: ----------- serialised: the string to unserialise the coordinates from. Parameters: ----------- Xapian::SerialisationError: if the string does not contain a valid serialised latitude-longitude pair, or contains junk at the end of it. )rLatLongCoords_unserialiserrrrrTrzLatLongCoords.unserialisecCrH)z Return a serialised form of the coordinate list. std::string Xapian::LatLongCoords::serialise() const )rLatLongCoords_serialiser:rrrrNrKzLatLongCoords.serialisecCrH)z Return a string describing this object. std::string Xapian::LatLongCoords::get_description() const )rLatLongCoords___str__r:rrrrrKzLatLongCoords.__str__N)rrr=rTr>rrrrrr6rrr7rTrNrrdelete_LatLongCoordsr@rrrrrvs        rcGrr$)r__ne__rrrrrrWrc@sPeZdZdZeddddddZeZej Z ddZ d d Z d d Z d dZdS) LatLongMetricz Base class for calculating distances between two lat/long coordinates. Experimental - seehttps://xapian.org/docs/deprecation#experimental- features cCr#r$r%r&rrrr( r)zLatLongMetric.cCr*r$r%r+rrrr( r-r.r/cCr)z Return the distance between two coordinates, in metres. virtual double Xapian::LatLongMetric::pointwise_distance(const LatLongCoord &a, const LatLongCoord &b) const =0 )r LatLongMetric_pointwise_distance)rar rrrpointwise_distance rlz LatLongMetric.pointwise_distancecCrH)a( Return the full name of the metric. virtual std::string Xapian::LatLongMetric::name() const =0 This is used when serialising and unserialising metrics; for example, for performing remote searches. If the subclass is in a C++ namespace, the namespace should be included in the name, using "::" as a separator. For example, for a LatLongMetric subclass called "FooLatLongMetric" in the "Xapian" namespace the result of this call should be "Xapian::FooLatLongMetric". )rLatLongMetric_namer:rrrr r\zLatLongMetric.namecCs*|jtkrd}n|}t|t|dSr$)rrrLatLongMetric_swiginitnew_LatLongMetricrrrrr7. s zLatLongMetric.__init__cCrr$)rrrdisown_LatLongMetricrr:rrrr4 rzLatLongMetric.__disown__N)rrr=rTr>rrrrdelete_LatLongMetricr@rrr7rrrrrr s   rc@r) GreatCircleMetrica Calculate the great-circle distance between two coordinates on a sphere. Experimental - seehttps://xapian.org/docs/deprecation#experimental- features This uses the haversine formula to calculate the distance. Note that this formula is subject to inaccuracy due to numerical errors for coordinates on the opposite side of the sphere. Seehttps://en.wikipedia.org/wiki/Haversine_formula cCr#r$r%r&rrrr(O r)zGreatCircleMetric.cCr*r$r%r+rrrr(O r-r.r/cGra)as Construct a GreatCircleMetric using a specified radius. Xapian::GreatCircleMetric::GreatCircleMetric(double radius_) This is useful for data sets in which the points are not on Earth (eg, a database of features on Mars). Parameters: ----------- radius_: The radius of the sphere to use, in metres. N)rGreatCircleMetric_swiginitnew_GreatCircleMetricrdrrrr7R rzGreatCircleMetric.__init__N) rrr=rTr>rrrr7rdelete_GreatCircleMetricr@rrrrr> s  rc@r) LatLongDistancePostingSourcea Posting source which returns a weight based on geospatial distance. Experimental - seehttps://xapian.org/docs/deprecation#experimental- features Results are weighted by the distance from a fixed point, or list of points, calculated according to the metric supplied. If multiple points are supplied (either in the constructor, or in the coordinates stored in a document), the closest pointwise distance is used. Documents further away than a specified maximum range (or with no location stored in the specified slot) will not be returned. The weight returned is computed from the distance using the formula: k1 * pow(distance + k1, -k2) (Where k1 and k2 are (strictly) positive, floating point constants, which default to 1000 and 1, respectively. Distance is measured in metres, so this means that something at the centre gets a weight of 1.0, something 1km away gets a weight of 0.5, and something 3km away gets a weight of 0.25, etc) cCr#r$r%r&rrrr( r)z%LatLongDistancePostingSource.cCr*r$r%r+rrrr( r-r.r/cGra)a Construct a new posting source which returns only documents within range of one of the central coordinates. Xapian::LatLongDistancePostingSource::LatLongDistancePostingSource(Xapian::valueno slot_, const LatLongCoords ¢re_, double max_range_=0.0, double k1_=1000.0, double k2_=1.0) Parameters: ----------- slot_: The value slot to read values from. centre_: The centre point to use for distance calculations. max_range_: The maximum distance for documents which are returned. k1_: The k1 constant to use in the weighting function. k2_: The k2 constant to use in the weighting function. Xapian::GreatCircleMetric is used as the metric. N)r%LatLongDistancePostingSource_swiginit new_LatLongDistancePostingSourcerdrrrr7 sz%LatLongDistancePostingSource.__init__N) rrr=rTr>rrrr7r#delete_LatLongDistancePostingSourcer@rrrrrg s  rc@r) LatLongDistanceKeyMakera KeyMaker subclass which sorts by distance from a latitude/longitude. Experimental - seehttps://xapian.org/docs/deprecation#experimental- features Results are ordered by the distance from a fixed point, or list of points, calculated according to the metric supplied. If multiple points are supplied (either in the constructor, or in the coordinates stored in a document), the closest pointwise distance is used. If a document contains no coordinate stored in the specified slot, a special value for the distance will be used. This defaults to a large number, so that such results get a low rank, but may be specified by a constructor parameter. cCr#r$r%r&rrrr( r)z LatLongDistanceKeyMaker.cCr*r$r%r+rrrr( r-r.r/cGra)a Construct a LatLongDistanceKeyMaker. Xapian::LatLongDistanceKeyMaker::LatLongDistanceKeyMaker(Xapian::valueno slot_, const LatLongCoord ¢re_) Parameters: ----------- slot_: Value slot to use. centre_: Point to calculate distance from. Xapian::GreatCircleMetric is used as the metric. Documents where no value is set are assumed to be a large distance away. N)r LatLongDistanceKeyMaker_swiginitnew_LatLongDistanceKeyMakerrdrrrr7 rz LatLongDistanceKeyMaker.__init__N) rrr=rTr>rrrr7rdelete_LatLongDistanceKeyMakerr@rrrrr s  rc@seZdZdZeddddddZeZddZd d Z d d Z e j Z d dZddZddZddZddZddZddZddZddZdd Zd!d"Zd#d$Zd%d&Zd'd(Zd)d*Zd+d,Zd-d.Zd/d0Zd1d2Z d3d4Z!d5d6Z"d7d8Z#d9d:Z$d;d<Z%d=d>Z&d?d@Z'dAdBZ(dCdDZ)dEdFZ*dGdHZ+dIdJZ,dKdLZ-dkdNdOZ.dPdQZ/dRdSZ0dTdUZ1dVdWZ2dXdYZ3dZd[Z4d\d]Z5d^d_Z6d`daZ7dbdcZ8dddeZ9dfdgZ:e;e j<Z=dhdiZ>djS)lDatabaseao This class is used to access a database, or a group of databases. For searching, this class is used in conjunction with an Enquire object. Parameters: ----------- InvalidArgumentError: will be thrown if an invalid argument is supplied, for example, an unknown database type. DatabaseOpeningError: may be thrown if the database cannot be opened (for example, a required file cannot be found). DatabaseVersionError: may be thrown if the database is in an unsupported format (for example, created by a newer version of Xapian which uses an incompatible format). cCr#r$r%r&rrrr( r)zDatabase.cCr*r$r%r+rrrr( r-r.r/cCr)a  Add an existing database (or group of databases) to those accessed by this object. void Xapian::Database::add_database(const Database &database) Parameters: ----------- database: the database(s) to add. )rDatabase_add_databaserrrr add_database r_zDatabase.add_databasecCrH)zt Return number of shards in this Database object. size_t Xapian::Database::size() const )r Database_sizer:rrrr6!rKz Database.sizecGra)z Copying is allowed. Xapian::Database::Database(const Database &other) The internals are reference counted, so copying is cheap. Parameters: ----------- other: The object to copy. N)rDatabase_swiginit new_Databaserdrrrr7 !szDatabase.__init__cCrH)a Re-open the database. bool Xapian::Database::reopen() This re-opens the database(s) to the latest available version(s). It can be used either to make sure the latest results are returned, or to recover from a Xapian::DatabaseModifiedError. Calling reopen() on a database which has been closed (with close()) will always raise a Xapian::DatabaseError. true if the database might have been reopened (if false is returned, the database definitely hasn't been reopened, which applications may find useful when caching results, etc). In Xapian < 1.3.0, this method did not return a value. )rDatabase_reopenr:rrrreopen!rzDatabase.reopencCrH)a Close the database. virtual void Xapian::Database::close() This closes the database and closes all its file handles. For a WritableDatabase, if a transaction is active it will be aborted, while if no transaction is active commit() will be implicitly called. Also the write lock is released. Closing a database cannot be undone - in particular, calling reopen() after close() will not reopen it, but will instead throw a Xapian::DatabaseError exception. Calling close() again on a database which has already been closed has no effect (and doesn't raise an exception). After close() has been called, calls to other methods of the database, and to methods of other objects associated with the database, will either: behave exactly as they would have done if the database had not been closed (this can only happen if all the required data is cached) raise a Xapian::DatabaseError exception indicating that the database is closed. The reason for this behaviour is that otherwise we'd have to check that the database is still open on every method call on every object associated with a Database, when in many cases they are working on data which has already been loaded and so they are able to just behave correctly. This method was added in Xapian 1.1.0. )rDatabase_closer:rrrclose5!s 'zDatabase.closecCrH)z Return a string describing this object. virtual std::string Xapian::Database::get_description() const )rDatabase___str__r:rrrr_!rKzDatabase.__str__cCr)a An iterator pointing to the start of the postlist for a given term. PostingIterator Xapian::Database::postlist_begin(const std::string &tname) const Parameters: ----------- tname: The termname to iterate postings for. If the term name is the empty string, the iterator returned will list all the documents in the database. Such an iterator will always return a WDF value of 1, since there is no obvious meaning for this quantity in this case. )rDatabase__postlist_beginr9rrr_postlist_beginj!r#zDatabase._postlist_begincCr)z Corresponding end iterator to postlist_begin(). PostingIterator Xapian::Database::postlist_end(const std::string &) const )rDatabase__postlist_endrWrrr _postlist_end~!rqzDatabase._postlist_endcCr)a" An iterator pointing to the start of the termlist for a given document. TermIterator Xapian::Database::termlist_begin(Xapian::docid did) const Parameters: ----------- did: The document id of the document to iterate terms for. )rDatabase__termlist_beginrrrrrB!r_zDatabase._termlist_begincCr)z Corresponding end iterator to termlist_begin(). TermIterator Xapian::Database::termlist_end(Xapian::docid) const )rDatabase__termlist_endrWrrrrD!rzDatabase._termlist_endcCrH)z~ Does this database have any positional information? bool Xapian::Database::has_positions() const )rDatabase_has_positionsr:rrr has_positions!rKzDatabase.has_positionscCr)z An iterator pointing to the start of the position list for a given term in a given document. PositionIterator Xapian::Database::positionlist_begin(Xapian::docid did, const std::string &tname) const )rDatabase__positionlist_begin)rrr&rrrr!s zDatabase._positionlist_begincCr)z Corresponding end iterator to positionlist_begin(). PositionIterator Xapian::Database::positionlist_end(Xapian::docid, const std::string &) const )rDatabase__positionlist_end)rrXarg3rrrr!rlzDatabase._positionlist_endcGr)aL An iterator which runs across all terms with a given prefix. TermIterator Xapian::Database::allterms_begin(const std::string &prefix=std::string()) const Parameters: ----------- prefix: The prefix to restrict the returned terms to (default: iterate all terms) )rDatabase__allterms_beginrdrrr_allterms_begin!szDatabase._allterms_begincGr)z Corresponding end iterator to allterms_begin(prefix). TermIterator Xapian::Database::allterms_end(const std::string &=std::string()) const )rDatabase__allterms_endrdrrr _allterms_end!rzDatabase._allterms_endcCrH)z Get the number of documents in the database. Xapian::doccount Xapian::Database::get_doccount() const )rDatabase_get_doccountr:rrr get_doccount!rKzDatabase.get_doccountcCrH)z Get the highest document id which has been used in the database. Xapian::docid Xapian::Database::get_lastdocid() const )rDatabase_get_lastdocidr:rrr get_lastdocid!rKzDatabase.get_lastdocidcCrH)z Get the average length of the documents in the database. Xapian::doclength Xapian::Database::get_avlength() const )rDatabase_get_avlengthr:rrr get_avlength!rKzDatabase.get_avlengthcCrH)z New name for get_avlength(). double Xapian::Database::get_average_length() const Added for forward compatibility with the next release series. 1.4.17. )rDatabase_get_average_lengthr:rrrget_average_length "rSzDatabase.get_average_lengthcCrH)z Get the total length of all the documents in the database. Xapian::totallength Xapian::Database::get_total_length() const Added in Xapian 1.4.5. )rDatabase_get_total_lengthr:rrrget_total_length"r@zDatabase.get_total_lengthcCr)z Get the number of documents in the database indexed by a given term. Xapian::doccount Xapian::Database::get_termfreq(const std::string &tname) const )rDatabase_get_termfreqr9rrrr%"rqzDatabase.get_termfreqcCr)a Check if a given term exists in the database. bool Xapian::Database::term_exists(const std::string &tname) const Parameters: ----------- tname: The term to test the existence of. true if and only if the term exists in the database. This is the same as (get_termfreq(tname) != 0), but will often be more efficient. )rDatabase_term_existsr9rrr term_exists1"rzDatabase.term_existscCr)a Return the total number of occurrences of the given term. Xapian::termcount Xapian::Database::get_collection_freq(const std::string &tname) const This is the sum of the number of occurrences of the term in each document it indexes: i.e., the sum of the within document frequencies of the term. Parameters: ----------- tname: The term whose collection frequency is being requested. )rDatabase_get_collection_freqr9rrrget_collection_freqD"rzDatabase.get_collection_freqcCr)aW Return the frequency of a given value slot. Xapian::doccount Xapian::Database::get_value_freq(Xapian::valueno slot) const This is the number of documents which have a (non-empty) value stored in the slot. Parameters: ----------- slot: The value slot to examine. )rDatabase_get_value_freqrrrrget_value_freqY"r#zDatabase.get_value_freqcCr)as Get a lower bound on the values stored in the given value slot. std::string Xapian::Database::get_value_lower_bound(Xapian::valueno slot) const If there are no values stored in the given value slot, this will return an empty string. Parameters: ----------- slot: The value slot to examine. )rDatabase_get_value_lower_boundrrrrget_value_lower_boundm"r#zDatabase.get_value_lower_boundcCr)at Get an upper bound on the values stored in the given value slot. std::string Xapian::Database::get_value_upper_bound(Xapian::valueno slot) const If there are no values stored in the given value slot, this will return an empty string. Parameters: ----------- slot: The value slot to examine. )rDatabase_get_value_upper_boundrrrrget_value_upper_bound"r#zDatabase.get_value_upper_boundcCrH)z Get a lower bound on the length of a document in this DB. Xapian::termcount Xapian::Database::get_doclength_lower_bound() const This bound does not include any zero-length documents. )r"Database_get_doclength_lower_boundr:rrrget_doclength_lower_bound"r@z"Database.get_doclength_lower_boundcCrH)z Get an upper bound on the length of a document in this DB. Xapian::termcount Xapian::Database::get_doclength_upper_bound() const )r"Database_get_doclength_upper_boundr:rrrget_doclength_upper_bound"rz"Database.get_doclength_upper_boundcCr)z Get an upper bound on the wdf of term term. Xapian::termcount Xapian::Database::get_wdf_upper_bound(const std::string &term) const )rDatabase_get_wdf_upper_boundrrrrget_wdf_upper_bound"rqzDatabase.get_wdf_upper_boundcCr)z Return an iterator over the value in slot slot for each document. ValueIterator Xapian::Database::valuestream_begin(Xapian::valueno slot) const )rDatabase_valuestream_beginrrrrvaluestream_begin"rqzDatabase.valuestream_begincCr)z Return end iterator corresponding to valuestream_begin(). ValueIterator Xapian::Database::valuestream_end(Xapian::valueno) const )rDatabase_valuestream_endrWrrrvaluestream_end"rqzDatabase.valuestream_endcCr)z Get the length of a document. Xapian::termcount Xapian::Database::get_doclength(Xapian::docid did) const )rDatabase_get_doclengthrrrrr"rqzDatabase.get_doclengthcCr)z Get the number of unique terms in document. Xapian::termcount Xapian::Database::get_unique_terms(Xapian::docid did) const )rDatabase_get_unique_termsrrrrr"rqzDatabase.get_unique_termscCrH)z Send a "keep-alive" to remote databases to stop them timing out. void Xapian::Database::keep_alive() Has no effect on non-remote databases. )rDatabase_keep_aliver:rrr keep_alive"r@zDatabase.keep_alivecGr)a4 Get a document from the database, given its document id. Xapian::Document Xapian::Database::get_document(Xapian::docid did, unsigned flags) const This method returns a Xapian::Document object which provides the information about a document. Parameters: ----------- did: The document id of the document to retrieve. flags: Zero or more flags bitwise-or-ed together (currently only Xapian::DOC_ASSUME_VALID is supported). A Xapian::Document object containing the document data Parameters: ----------- Xapian::DocNotFoundError: The document specified could not be found in the database. Xapian::InvalidArgumentError: did was 0, which is not a valid document id. )rDatabase_get_documentrdrrrr"szDatabase.get_documentcCr)a Suggest a spelling correction. std::string Xapian::Database::get_spelling_suggestion(const std::string &word, unsigned max_edit_distance=2) const Parameters: ----------- word: The potentially misspelled word. max_edit_distance: Only consider words which are at most max_edit_distance edits from word. An edit is a character insertion, deletion, or the transposition of two adjacent characters (default is 2). )r Database_get_spelling_suggestion)rrmax_edit_distancerrrget_spelling_suggestion#rz Database.get_spelling_suggestioncCrH)a| An iterator which returns all the spelling correction targets. Xapian::TermIterator Xapian::Database::spellings_begin() const This returns all the words which are considered as targets for the spelling correction algorithm. The frequency of each word is available as the term frequency of each entry in the returned iterator. )rDatabase__spellings_beginr:rrr_spellings_begin/#rSzDatabase._spellings_begincCrH)z Corresponding end iterator to spellings_begin(). Xapian::TermIterator Xapian::Database::spellings_end() const )rDatabase__spellings_endr:rrr_spellings_end>#rKzDatabase._spellings_endcCr)a An iterator which returns all the synonyms for a given term. Xapian::TermIterator Xapian::Database::synonyms_begin(const std::string &term) const Parameters: ----------- term: The term to return synonyms for. )rDatabase__synonyms_beginrrrr_synonyms_beginI#r_zDatabase._synonyms_begincCr)z Corresponding end iterator to synonyms_begin(term). Xapian::TermIterator Xapian::Database::synonyms_end(const std::string &) const )rDatabase__synonyms_endrWrrr _synonyms_endZ#rqzDatabase._synonyms_endcGr)a: An iterator which returns all terms which have synonyms. Xapian::TermIterator Xapian::Database::synonym_keys_begin(const std::string &prefix=std::string()) const Parameters: ----------- prefix: If non-empty, only terms with this prefix are returned. )rDatabase__synonym_keys_beginrdrrr_synonym_keys_beginf#szDatabase._synonym_keys_begincGr)z Corresponding end iterator to synonym_keys_begin(prefix). Xapian::TermIterator Xapian::Database::synonym_keys_end(const std::string &=std::string()) const )rDatabase__synonym_keys_endrdrrr_synonym_keys_endw#rzDatabase._synonym_keys_endcCr)aI Get the user-specified metadata associated with a given key. std::string Xapian::Database::get_metadata(const std::string &key) const User-specified metadata allows you to store arbitrary information in the form of (key, value) pairs. See WritableDatabase::set_metadata() for more information. When invoked on a Xapian::Database object representing multiple databases, currently only the metadata for the first is considered but this behaviour may change in the future. If there is no piece of metadata associated with the specified key, an empty string is returned (this applies even for backends which don't support metadata). Empty keys are not valid, and specifying one will cause an exception. Parameters: ----------- key: The key of the metadata item to access. The retrieved metadata item's value. Parameters: ----------- Xapian::InvalidArgumentError: will be thrown if the key supplied is empty. )rDatabase_get_metadata)rrrrr get_metadata#s $zDatabase.get_metadatacGr)a An iterator which returns all user-specified metadata keys. Xapian::TermIterator Xapian::Database::metadata_keys_begin(const std::string &prefix=std::string()) const When invoked on a Xapian::Database object representing multiple databases, currently only the metadata for the first is considered but this behaviour may change in the future. If the backend doesn't support metadata, then this method returns an iterator which compares equal to that returned by metadata_keys_end(). Parameters: ----------- prefix: If non-empty, only keys with this prefix are returned. Parameters: ----------- Xapian::UnimplementedError: will be thrown if the backend implements user-specified metadata, but doesn't implement iterating its keys (currently this happens for the InMemory backend). )rDatabase__metadata_keys_beginrdrrr_metadata_keys_begin#r7zDatabase._metadata_keys_begincGr)z Corresponding end iterator to metadata_keys_begin(). Xapian::TermIterator Xapian::Database::metadata_keys_end(const std::string &=std::string()) const )rDatabase__metadata_keys_endrdrrr_metadata_keys_end#rzDatabase._metadata_keys_endcCrH)a Get a UUID for the database. std::string Xapian::Database::get_uuid() const The UUID will persist for the lifetime of the database. Replicas (eg, made with the replication protocol, or by copying all the database files) will have the same UUID. However, copies (made with copydatabase, or xapian-compact) will have different UUIDs. If the backend does not support UUIDs or this database has no subdatabases, the UUID will be empty. If this database has multiple sub-databases, the UUID string will contain the UUIDs of all the sub-databases. )rDatabase_get_uuidr:rrrget_uuid#rzDatabase.get_uuidcCrH)aa Test if this database is currently locked for writing. bool Xapian::Database::locked() const If the underlying object is actually a WritableDatabase, always returns true. Otherwise tests if there's a writer holding the lock (or if we can't test for a lock without taking it on the current platform, throw Xapian::UnimplementedError). If there's an error while trying to test the lock, throws Xapian::DatabaseLockError. For multi-databases, this tests each sub-database and returns true if any of them are locked. )rDatabase_lockedr:rrrlocked#rzDatabase.lockedcCrH)a Get the revision of the database. Xapian::rev Xapian::Database::get_revision() const The revision is an unsigned integer which increases with each commit. The database must have exactly one sub-database, which must be of type chert or glass. Otherwise an exception will be thrown. Experimental - seehttps://xapian.org/docs/deprecation#experimental- features )rDatabase_get_revisionr:rrr get_revision$rLzDatabase.get_revisioncGr)a Produce a compact version of this database. void Xapian::Database::compact(int fd, unsigned flags, int block_size, Xapian::Compactor &compactor) New 1.3.4. Various methods of the Compactor class were deprecated in 1.3.4. The compactor functor allows handling progress output and specifying how user metadata is merged. This variant writes a single-file database to the specified file descriptor. Only the glass backend supports such databases, so this form is only supported for this backend. Parameters: ----------- fd: File descriptor to write the compact version to. The descriptor needs to be readable and writable (open with O_RDWR) and seekable. The current file offset is used, allowing compacting to a single file database embedded within another file. Xapian takes ownership of the file descriptor and will close it before returning. flags: Any of the following combined using bitwise-or (| in C++): Xapian::DBCOMPACT_NO_RENUMBER By default the document ids will be renumbered the output - currently by applying the same offset to all the document ids in a particular source database. If this flag is specified, then this renumbering doesn't happen, but all the document ids must be unique over all source databases. Currently the ranges of document ids in each source must not overlap either, though this restriction may be removed in the future. Xapian::DBCOMPACT_MULTIPASS If merging more than 3 databases, merge the postlists in multiple passes, which is generally faster but requires more disk space for temporary files. Xapian::DBCOMPACT_SINGLE_FILE Produce a single-file database (only supported for glass currently) - this flag is implied in this form and need not be specified explicitly. block_size: This specifies the block size (in bytes) for to use for the output. For glass, the block size must be a power of 2 between 2048 and 65536 (inclusive), and the default (also used if an invalid value is passed) is 8192 bytes. compactor: Functor )rDatabase_compactrdrrrr$s4zDatabase.compactN)r#)?rrr=rTr>rrrrr6r7rdelete_Databaser@rrrrrrBrDrrrrrrrrrrrr r rrrrrrrrrrr!rr&r(r*r,r.r0r2r4r6r8r:r<r>rRDatabase_checkrrrrrrr sn *                    "   '   rNcCrr$)rrA)fdoptsoutrrrrA$srAc@seZdZdZeddddddZeZej Z ddZ d d Z d d Z d(ddZddZddZddZddZddZd)ddZd)ddZdd Zd!d"Zd#d$Zd%d&Zd'S)*WritableDatabasezA This class provides read/write access to a database. cCr#r$r%r&rrrr($r)zWritableDatabase.cCr*r$r%r+rrrr($r-r.r/cGra)a Copying is allowed. Xapian::WritableDatabase::WritableDatabase(const WritableDatabase &other) The internals are reference counted, so copying is cheap. Parameters: ----------- other: The object to copy. N)rWritableDatabase_swiginitnew_WritableDatabaserdrrrr7$rzWritableDatabase.__init__cCrH)aZ Commit any pending modifications made to the database. void Xapian::WritableDatabase::commit() For efficiency reasons, when performing multiple updates to a database it is best (indeed, almost essential) to make as many modifications as memory will permit in a single pass through the database. To ensure this, Xapian batches up modifications. This method may be called at any time to commit any pending modifications to the database. If any of the modifications fail, an exception will be thrown and the database will be left in a state in which each separate addition, replacement or deletion operation has either been fully performed or not performed at all: it is then up to the application to work out which operations need to be repeated. It's not valid to call commit() within a transaction. Beware of calling commit() too frequently: this will make indexing take much longer. Note that commit() need not be called explicitly: it will be called automatically when the database is closed, or when a sufficient number of modifications have been made. By default, this is every 10000 documents added, deleted, or modified. This value is rather conservative, and if you have a machine with plenty of memory, you can improve indexing throughput dramatically by setting XAPIAN_FLUSH_THRESHOLD in the environment to a larger value. This method was new in Xapian 1.1.0 - in earlier versions it was called flush(). Parameters: ----------- Xapian::DatabaseError: will be thrown if a problem occurs while modifying the database. Xapian::DatabaseCorruptError: will be thrown if the database is in a corrupt state. )rWritableDatabase_commitr:rrrcommit$s /zWritableDatabase.commitcCrH)z Pre-1.1.0 name for commit(). void Xapian::WritableDatabase::flush() Use commit() instead. )rWritableDatabase_flushr:rrrflush$r@zWritableDatabase.flushTcCr)a Begin a transaction. void Xapian::WritableDatabase::begin_transaction(bool flushed=true) In Xapian a transaction is a group of modifications to the database which are linked such that either all will be applied simultaneously or none will be applied at all. Even in the case of a power failure, this characteristic should be preserved (as long as the filesystem isn't corrupted, etc). A transaction is started with begin_transaction() and can either be committed by calling commit_transaction() or aborted by calling cancel_transaction(). By default, a transaction implicitly calls commit() before and after so that the modifications stand and fall without affecting modifications before or after. The downside of these implicit calls to commit() is that small transactions can harm indexing performance in the same way that explicitly calling commit() frequently can. If you're applying atomic groups of changes and only wish to ensure that each group is either applied or not applied, then you can prevent the automatic commit() before and after the transaction by starting the transaction with begin_transaction(false). However, if cancel_transaction is called (or if commit_transaction isn't called before the WritableDatabase object is destroyed) then any changes which were pending before the transaction began will also be discarded. Transactions aren't currently supported by the InMemory backend. Parameters: ----------- flushed: Is this a flushed transaction? By default transactions are "flushed", which means that committing a transaction will ensure those changes are permanently written to the database. By contrast, unflushed transactions only ensure that changes within the transaction are either all applied or all aren't. Parameters: ----------- Xapian::UnimplementedError: will be thrown if transactions are not available for this database type. Xapian::InvalidOperationError: will be thrown if this is called at an invalid time, such as when a transaction is already in progress. )r"WritableDatabase_begin_transaction)rflushedrrrbegin_transaction$s 7z"WritableDatabase.begin_transactioncCrH)a( Complete the transaction currently in progress. void Xapian::WritableDatabase::commit_transaction() If this method completes successfully and this is a flushed transaction, all the database modifications made during the transaction will have been committed to the database. If an error occurs, an exception will be thrown, and none of the modifications made to the database during the transaction will have been applied to the database. In all cases the transaction will no longer be in progress. Parameters: ----------- Xapian::DatabaseError: will be thrown if a problem occurs while modifying the database. Xapian::DatabaseCorruptError: will be thrown if the database is in a corrupt state. Xapian::InvalidOperationError: will be thrown if a transaction is not currently in progress. Xapian::UnimplementedError: will be thrown if transactions are not available for this database type. )r#WritableDatabase_commit_transactionr:rrrcommit_transaction%s !z#WritableDatabase.commit_transactioncCrH)a Abort the transaction currently in progress, discarding the pending modifications made to the database. void Xapian::WritableDatabase::cancel_transaction() If an error occurs in this method, an exception will be thrown, but the transaction will be cancelled anyway. Parameters: ----------- Xapian::DatabaseError: will be thrown if a problem occurs while modifying the database. Xapian::DatabaseCorruptError: will be thrown if the database is in a corrupt state. Xapian::InvalidOperationError: will be thrown if a transaction is not currently in progress. Xapian::UnimplementedError: will be thrown if transactions are not available for this database type. )r#WritableDatabase_cancel_transactionr:rrrcancel_transaction=% z#WritableDatabase.cancel_transactioncCr)a@ Add a new document to the database. Xapian::docid Xapian::WritableDatabase::add_document(const Xapian::Document &document) This method adds the specified document to the database, returning a newly allocated document ID. Automatically allocated document IDs come from a per-database monotonically increasing counter, so IDs from deleted documents won't be reused. If you want to specify the document ID to be used, you should call replace_document() instead. Note that changes to the database won't be immediately committed to disk; see commit() for more details. As with all database modification operations, the effect is atomic: the document will either be fully added, or the document fails to be added and an exception is thrown (possibly at a later time when commit() is called or the database is closed). Parameters: ----------- document: The new document to be added. The document ID of the newly added document. Parameters: ----------- Xapian::DatabaseError: will be thrown if a problem occurs while writing to the database. Xapian::DatabaseCorruptError: will be thrown if the database is in a corrupt state. )rWritableDatabase_add_document)rdocumentrrrr[%s )zWritableDatabase.add_documentcGr)a Delete any documents indexed by a term from the database. void Xapian::WritableDatabase::delete_document(const std::string &unique_term) This method removes any documents indexed by the specified term from the database. A major use is for convenience when UIDs from another system are mapped to terms in Xapian, although this method has other uses (for example, you could add a "deletion date" term to documents at index time and use this method to delete all documents due for deletion on a particular date). Parameters: ----------- unique_term: The term to remove references to. Parameters: ----------- Xapian::DatabaseError: will be thrown if a problem occurs while writing to the database. Xapian::DatabaseCorruptError: will be thrown if the database is in a corrupt state. )r WritableDatabase_delete_documentrdrrrdelete_document%s z WritableDatabase.delete_documentcGr)a_ Replace any documents matching a term. Xapian::docid Xapian::WritableDatabase::replace_document(const std::string &unique_term, const Xapian::Document &document) This method replaces any documents indexed by the specified term with the specified document. If any documents are indexed by the term, the lowest document ID will be used for the document, otherwise a new document ID will be generated as for add_document. One common use is to allow UIDs from another system to easily be mapped to terms in Xapian. Note that this method doesn't automatically add unique_term as a term, so you'll need to call document.add_term(unique_term) first when using replace_document() in this way. Note that changes to the database won't be immediately committed to disk; see commit() for more details. As with all database modification operations, the effect is atomic: the document(s) will either be fully replaced, or the document(s) fail to be replaced and an exception is thrown (possibly at a later time when commit() is called or the database is closed). Parameters: ----------- unique_term: The "unique" term. document: The new document. The document ID that document was given. Parameters: ----------- Xapian::DatabaseError: will be thrown if a problem occurs while writing to the database. Xapian::DatabaseCorruptError: will be thrown if the database is in a corrupt state. )r!WritableDatabase_replace_documentrdrrrreplace_document%s.z!WritableDatabase.replace_documentrcCr)a Add a word to the spelling dictionary. void Xapian::WritableDatabase::add_spelling(const std::string &word, Xapian::termcount freqinc=1) const If the word is already present, its frequency is increased. Parameters: ----------- word: The word to add. freqinc: How much to increase its frequency by (default 1). )rWritableDatabase_add_spelling)rrfreqincrrr add_spelling%szWritableDatabase.add_spellingcCr)a Remove a word from the spelling dictionary. void Xapian::WritableDatabase::remove_spelling(const std::string &word, Xapian::termcount freqdec=1) const The word's frequency is decreased, and if would become zero or less then the word is removed completely. Parameters: ----------- word: The word to remove. freqdec: How much to decrease its frequency by (default 1). )r WritableDatabase_remove_spelling)rrfreqdecrrrremove_spelling%rz WritableDatabase.remove_spellingcCr)al Add a synonym for a term. void Xapian::WritableDatabase::add_synonym(const std::string &term, const std::string &synonym) const Parameters: ----------- term: The term to add a synonym for. synonym: The synonym to add. If this is already a synonym for term, then no action is taken. )rWritableDatabase_add_synonymrrsynonymrrr add_synonym&rzWritableDatabase.add_synonymcCr)a} Remove a synonym for a term. void Xapian::WritableDatabase::remove_synonym(const std::string &term, const std::string &synonym) const Parameters: ----------- term: The term to remove a synonym for. synonym: The synonym to remove. If this isn't currently a synonym for term, then no action is taken. )rWritableDatabase_remove_synonymrarrrremove_synonym&rzWritableDatabase.remove_synonymcCr)a) Remove all synonyms for a term. void Xapian::WritableDatabase::clear_synonyms(const std::string &term) const Parameters: ----------- term: The term to remove all synonyms for. If the term has no synonyms, no action is taken. )rWritableDatabase_clear_synonymsrrrrclear_synonyms.&rzWritableDatabase.clear_synonymscCr)as Set the user-specified metadata associated with a given key. void Xapian::WritableDatabase::set_metadata(const std::string &key, const std::string &metadata) This method sets the metadata value associated with a given key. If there is already a metadata value stored in the database with the same key, the old value is replaced. If you want to delete an existing item of metadata, just set its value to the empty string. User-specified metadata allows you to store arbitrary information in the form of (key, value) pairs. There's no hard limit on the number of metadata items, or the size of the metadata values. Metadata keys have a limited length, which depend on the backend. We recommend limiting them to 200 bytes. Empty keys are not valid, and specifying one will cause an exception. Metadata modifications are committed to disk in the same way as modifications to the documents in the database are: i.e., modifications are atomic, and won't be committed to disk immediately (see commit() for more details). This allows metadata to be used to link databases with versioned external resources by storing the appropriate version number in a metadata item. You can also use the metadata to store arbitrary extra information associated with terms, documents, or postings by encoding the termname and/or document id into the metadata key. Parameters: ----------- key: The key of the metadata item to set. metadata: The value of the metadata item to set. Parameters: ----------- Xapian::DatabaseError: will be thrown if a problem occurs while writing to the database. Xapian::DatabaseCorruptError: will be thrown if the database is in a corrupt state. Xapian::InvalidArgumentError: will be thrown if the key supplied is empty. Xapian::UnimplementedError: will be thrown if the database backend in use doesn't support user- specified metadata. )rWritableDatabase_set_metadata)rrmetadatarrr set_metadata@&s7zWritableDatabase.set_metadataNTrP)rrr=rTr>rrrrdelete_WritableDatabaser@r7rIrKrNrPrRrrWrYr\r_rcrergrjrrrrrE$s(2 :$,# 1  rEcGr)a Construct a Database object for read-only access to a remote database accessed via a program. Database Xapian::Remote::open(const std::string &program, const std::string &args, useconds_t timeout=10000) Access to the remote database is done by running an external program and communicating with it on stdin/stdout. Parameters: ----------- program: the external program to run. args: space-separated list of arguments to pass to program. timeout: timeout in milliseconds. If this timeout is exceeded for any individual operation on the remote database then Xapian::NetworkTimeoutError is thrown. A timeout of 0 means don't timeout. (Default is 10000ms, which is 10 seconds). )r remote_openrrrrrm&s rmcGr)a Construct a WritableDatabase object for update access to a remote database accessed via a program. WritableDatabase Xapian::Remote::open_writable(const std::string &program, const std::string &args, useconds_t timeout=0, int flags=0) Access to the remote database is done by running an external program and communicating with it on stdin/stdout. Parameters: ----------- program: the external program to run. args: space-separated list of arguments to pass to program. timeout: timeout in milliseconds. If this timeout is exceeded for any individual operation on the remote database then Xapian::NetworkTimeoutError is thrown. (Default is 0, which means don't timeout). flags: Xapian::DB_RETRY_LOCK or 0. )rremote_open_writablerrrrrn&rSrnzrestructuredtext enc@0eZdZdZdZddZddZeeddZd S) MSetItemaRAn item returned from iteration of the MSet. The item supports access to the following attributes and properties: - `docid`: The Xapian document ID corresponding to this MSet item. - `weight`: The weight corresponding to this MSet item. - `rank`: The rank of this MSet item. The rank is the position in the total set of matching documents of this item. The highest document is given a rank of 0. If the MSet did not start at the highest matching document, because a non-zero 'start' parameter was supplied to get_mset(), the first document in the MSet will have a rank greater than 0 (in fact, it will be equal to the value of 'start' supplied to get_mset()). - `percent`: The percentage score assigned to this MSet item. - `document`: The document for this MSet item. This can be used to access the document data, or any other information stored in the document (such as term lists). It is lazily evaluated. - `collapse_key`: The value of the key which was used for collapsing. - `collapse_count`: An estimate of the number of documents that have been collapsed into this one. The collapse count estimate will always be less than or equal to the actual number of other documents satisfying the match criteria with the same collapse key as this document. If may be 0 even though there are other documents with the same collapse key which satisfying the match criteria. However if this method returns non-zero, there definitely are other such documents. So this method may be used to inform the user that there are "at least N other matches in this group", or to control whether to offer a "show other documents in this group" feature (but note that it may not offer it in every case where it would show other documents). ) _mset _firstitemrweightrankpercentrcollapse_count _documentcCsX||_|j|_||_||_||_| |_ | |_ | |_d|_dSr$)rqrrrrrrRrsrOrtr[rurTrrVrvrw)riterr`rrrr7&s        zMSetItem.__init__cCs*|jdur|j|j|j|_|jSr$)rwrqrArtrrrr:rrr _get_document&s zMSetItem._get_documentz4The document object corresponding to this MSet item.r/N) rrr=rT __slots__r7ryr>rUrrrrrp&s ! rpc@,eZdZdZdZddZddZddZd S) MSetIterzAn iterator over the items in an MSet. The iterator will return MSetItem objects, which will be evaluated lazily where appropriate. )_iterr;rqcCs||_||_||_dSr$)r9r}r;rq)rr`rrrr7 's   zMSetIter.__init__cCr9r$rr:rrrr;'r<zMSetIter.__iter__cCs,|j|jkrtt|j|j}t|j|Sr$)r}r; StopIterationrprqnextrrrrrr;'s  zMSetIter.__next__Nrrr=rTrzr7r;r;rrrrr|'s  r|cCt|S)zReturn an iterator over the MSet. The iterator will return MSetItem objects, which will be evaluated lazily where appropriate. )r|r:rrr_mset_gen_iter'srcCrHr$)rr6r:rrrr(('r)r(cCs@|dkr |t|7}|dks|t|krtdt|||S)zGet an item from the MSet. The supplied index is relative to the start of the MSet, not the absolute rank of the item. Returns an MSetItem. r zMset index out of range)len IndexErrorrprA)rindexrrr _mset_getitem*'s  rc@eZdZdZdZddZdS)ESetItemzAn item returned from iteration of the ESet. The item supports access to the following attributes: - `term`: The term corresponding to this ESet item. - `weight`: The weight corresponding to this ESet item. )rrscCs||_||_dSr$)get_termrrRrs)rrxrrrr7K' zESetItem.__init__Nrrr=rTrzr7rrrrr@'s rc@r{) ESetIterz\An iterator over the items in an ESet. The iterator will return ESetItem objects. )r}r;cCs||_||_dSr$)r9r}r;)rrxrrrr7V'rzESetIter.__init__cCr9r$rr:rrrr;Z'r<zESetIter.__iter__cCs(|j|jkrtt|j}t|j|Sr$)r}r;r~rrrrrrr;]'   zESetIter.__next__NrrrrrrO's  rcCr)zWReturn an iterator over the ESet. The iterator will return ESetItem objects. )rr:rrr_eset_gen_iterh'srcCrHr$)rer6r:rrrr(q'r)c@sXeZdZdZdZddZddZeeddZd d Z ee d dZ d d Z ee ddZ dS) TermListItemaAn item returned from iteration of a term list. The item supports access to the following attributes and properties: - `term`: The term corresponding to this TermListItem. - `wdf`: The within document frequency of this term. - `termfreq`: The number of documents in the collection which are indexed by the term - `positer`: An iterator over the positions which the term appears at in the document. This is only available until the iterator which returned this item next moves. )r}r_wdf _termfreqcCs||_||_d|_d|_|jtjkr|j|_|jtjkr$|j |_gd}|jtj kr2d|d<|jtj krrrrrrrrrrrx's    rc@sJeZdZdZdZdZdZdZeeedfddZd d Z d d Z d dZ dS)rzAn iterator over a term list. The iterator will return TermListItem objects, which will be evaluated lazily where appropriate. )r}r;rrr_return_stringsr_movedr rr#FcCsB||_||_||_||_||_|tjksJ||_d|_d|_ dSNT) r}r;rrrrrrrr)rstartr has_termfreqhas_wdfrreturn_stringsrrrr7's zTermIter.__init__cCr9r$rr:rrrr;(r<zTermIter.__iter__cCsV|js t|jd|_|j|jkrd|_t|j|_d|_|jr%|jSt||jSNTF) rrr}r;rr~rrrr:rrrr;(s    zTermIter.__next__cCsl|j|jkr |j||j|jkrd|_d|_t|j}||jkr'||_d|_|jr0|jSt||jS)aSkip the iterator forward. The iterator is advanced to the first term at or after the current position which is greater than or equal to the supplied term. If there are no such items, this will raise StopIteration. This returns the item which the iterator is moved to. The subsequent item will be returned the next time that next() is called (unless skip_to() is called again first). NTF) r}r;rrrr~rrr)rrnewtermrrrr!(s     zTermIter.skip_toN) rrr=rTrzrLAZYrr7r;r;rrrrrr's  rcCs*t|tr|j}t||||ddS)zGet an iterator over the terms which match a given match set item. The match set item to consider is specified by the `which` parameter, which may be a document ID, or an MSetItem object. The iterator will return string objects. Tr) isinstancerprrrr)rwhichrrr_enquire_gen_iterD(s  rcCt||ddS)z^Get an iterator over the terms in a query. The iterator will return string objects. Tr)rrwryr:rrr_query_gen_iterU(srcCs<|durt||tjdSt||||tjdS)aoGet an iterator over all the terms in the database. The iterator will return TermListItem objects, but these will not support access to wdf, or position information. Access to term frequency information is only available until the iterator has moved on. If prefix is supplied, only terms which start with that prefix will be returned. Nr)rrrrrprefixrrr_database_gen_allterms_itera(s rcCs$t||||tjtjtjdS)zGet an iterator over all the terms which index a given document ID. The iterator will return TermListItem objects. Access to term frequency and position information is only available until the iterator has moved on. rrrrrBrDrrrrrr_database_gen_termlist_iterx(s  rcCs t||tjtjtjdS)zGet an iterator which returns all the spelling correction targets The iterator will return TermListItem objects. Only the term frequency is available; wdf and positions are not meaningful. r)rr(r*rrr:rrr_database_gen_spellings_iter(s rcCt||||ddS)zGet an iterator which returns all the synonyms for a given term. The term to return synonyms for is specified by the `term` parameter. The iterator will return string objects. Tr)rr,r.rrrr_database_gen_synonyms_iter( rrcCr)zGet an iterator which returns all the terms which have synonyms. The iterator will return string objects. If `prefix` is non-empty, only terms with this prefix are returned. Tr)rr0r2rrrr_database_gen_synonym_keys_iter(rrcCr)zGet an iterator which returns all the metadata keys. The iterator will return string objects. If `prefix` is non-empty, only metadata keys with this prefix are returned. Tr)rr6r8rrrr _database_gen_metadata_keys_iter(rrcCs t||tjtjtjdS)aGet an iterator over all the terms in a document. The iterator will return TermListItem objects. Access to term frequency and position information is only available until the iterator has moved on. Note that term frequency information is only meaningful for a document retrieved from a database. If term frequency information is requested for a document which was freshly created, an InvalidOperationError will be raised. rrr:rrr_document_gen_termlist_iter(s rcCr)aGet an iterator over all the stopped terms from the previous query. This returns an iterator over all the terms which were omitted from the previously parsed query due to being considered to be stopwords. Each instance of a word omitted from the query is represented in the returned list, in the order in which the The iterator will return string objects. Tr)rrarcr:rrr_queryparser_gen_stoplist_iter(s rcCr)aGet an iterator over all the unstemmed forms of a stemmed term. This returns an iterator which returns all the unstemmed words which were stemmed to the stemmed form specified by `tname` when parsing the previous query. Each instance of a word which stems to `tname` is returned by the iterator in the order in which the words appeared in the query - an individual unstemmed word may thus occur multiple times. The iterator will return string objects. Tr)rrergr9rrr _queryparser_gen_unstemlist_iter(s rc&tjt`tjt`fdd}|S)Ncst||tjdS)a4Get an iterator over all the values in the slot. Values will be returned in ascending alphabetical order. The iterator will return TermListItem objects: the value can be accessed as the `term` property, and the frequency can be accessed as the `termfreq` property. rrrr:rrrrvalues)s zwrapper..values)rrr)rrrrwrapper)s  rcr)Ncst||||tjdS)aGet an iterator over the most frequent values for the slot. Values will be returned in descending order of frequency. Values with the same frequency will be returned in ascending alphabetical order. The iterator will return TermListItem objects: the value can be accessed as the `term` property, and the frequency can be accessed as the `termfreq` property. rrrrrr top_values)s zwrapper..top_values)rrr)rrrrr)s  cGsg}t|dkrt|dtr||dn,|D])}t|tr*|t|dgqt|drB|D]}t|trA|t|dgq1qt|g|R||_ dS)zmMake a new query object. Many possible arguments are possible - see the documentation for details. rr _psr;N) rrr'rruextendr[r__query_init_origr)rr5psarglistargrrr _query_init0)s    rcCst|dg|_t|||SNr)r[r__enquire_set_query_origrrrr_enquire_set_queryJ)s rcCst|}t|dg|_|Sr)__enquire_get_query_origr[r)rrrrr_enquire_get_queryU)srcC&t|dsg|_|j|t||S)N_vrps)rrr*__queryparser_add_valuerangeprocessor_origrnrrr$_queryparser_add_valuerangeprocessora)   rcCr)N_rps)rrr%__queryparser_add_rangeprocessor_orig)rrprocrrr_queryparser_add_rangeprocessorn)rrcCs6t|ttfst|dsg|_|j|t|||SN_fps)rstrbytesrrr__queryparser_add_prefix_orig)rsprocrrr_queryparser_add_prefix{)s    rTcCs8t|ttfst|dsg|_|j|t||||Sr)rrrrrr%__queryparser_add_boolean_prefix_orig)rrr exclusiverrr_queryparser_add_boolean_prefix)s   rcC||_t||Sr$)_stopper__queryparser_set_stopper_origrstopperrrr_queryparser_set_stopper) rcCrr$)r __termgenerator_set_stopper_origrrrr_termgenerator_set_stopper)rrcC||_t|||Sr$)_sorter__enquire_set_sort_by_key_origrrrr_enquire_set_sort_by_key) rcCrr$)r-__enquire_set_sort_by_key_then_relevance_origrrrr'_enquire_set_sort_by_key_then_relevance)rrcCrr$)r-__enquire_set_sort_by_relevance_then_key_origrrrr'_enquire_set_sort_by_relevance_then_key)rrc@ro) PostingItemaAn item returned from iteration of a posting list. The item supports access to the following attributes and properties: - `docid`: The document ID corresponding to this PostingItem. - `doclength`: The length of the document corresponding to this PostingItem. - `wdf`: The within document frequency of the term which the posting list is for in the document corresponding to this PostingItem. - `positer`: An iterator over the positions which the term corresponing to this posting list occurs at in the document corresponding to this PostingItem. This is only available until the iterator which returned this item next moves. )r}r doclengthrcCsJ||_|j|_|j|_|j|_gd}|js#t|d<dSdS)N)rrrrr) r}rrrrrrrr)rrxrrrrr7)s   zPostingItem.__init__cCsT|jjstd|jj|jjks|j|jjkrtdt|jj|jjS)aGet a position list iterator. The iterator will return integers representing the positions that the term occurs at in the document corresponding to this PostingItem. This will raise a InvalidOperationError exception if the iterator this item came from doesn't support position lists, or if the iterator has moved on since the item was returned from it. rr) r}rrlr;rrrrrr:rrrr)s   zPostingItem._get_positeraiA position iterator for the current posting (if meaningful). The iterator will return integers representing the positions that the term occurs at. This will raise a InvalidOperationError exception if the iterator this item came from doesn't support position lists, or if the iterator has moved on since the item was returned from it. r/N) rrr=rTrzr7rr>rrrrrr)s  rc@s6eZdZdZdZd ddZddZdd Zd d Zd S) PostingIterzAn iterator over a posting list. The iterator will return PostingItem objects, which will be evaluated lazily where appropriate. r}r;rrFcCs||_||_||_d|_dSrr)rrrrrrrr7 *s zPostingIter.__init__cCr9r$rr:rrrr;*r<zPostingIter.__iter__cCs4|js t|jd|_|j|jkrtd|_t|Sr)rrr}r;r~rr:rrrr;*s  zPostingIter.__next__cCs<|j|jkr |j||j|jkrd|_td|_t|SaSkip the iterator forward. The iterator is advanced to the first document with a document ID which is greater than or equal to the supplied document ID. If there are no such items, this will raise StopIteration. This returns the item which the iterator is moved to. The subsequent item will be returned the next time that next() is called (unless skip_to() is called again first). TF)r}r;rrr~rrrrrr#*s  zPostingIter.skip_toN)F) rrr=rTrzr7r;r;rrrrrr*s   rcCs<t|dkrt||||ddSt||||S)a"Get an iterator over the postings which are indexed by a given term. If `tname` is empty, an iterator over all the documents will be returned (this will contain one entry for each document, will always return a wdf of 1, and will not allow access to a position iterator). r T)r)rrrrr9rrr_database_gen_postlist_iter8*s rc@s*eZdZdZd ddZddZddZd S) rzcAn iterator over a position list. The iterator will return integers, in ascending order. r cC||_||_dSr$rxrrrrrrrr7R*rzPositionIter.__init__cCr9r$rr:rrrr;V*r<zPositionIter.__iter__cCs(|j|jkrt|j}t|j|Sr$)rxrr~rrrrrrr;Y*rzPositionIter.__next__Nr~rrr=rTr7r;r;rrrrrL*s   rcCst||||||S)zGet an iterator over all the positions in a given document of a term. The iterator will return integers, in ascending order. )rrr)rrr&rrr_database_gen_positionlist_iterb*src@r) ValueItemzAn item returned from iteration of the values in a document. The item supports access to the following attributes: - `num`: The number of the value. - `value`: The contents of the value. numrcCrr$r )rr rrrrr7{*rzValueItem.__init__Nrrrrrr o* r c@s(eZdZdZddZddZddZdS) ValueIterzAn iterator over all the values stored in a document. The iterator will return ValueItem objects, in ascending order of value number. cCrr$rrrrrr7*rzValueIter.__init__cCr9r$rr:rrrr;*r<zValueIter.__iter__cCs4|j|jkrtt|j|j}t|j|Sr$)rxrr~r rrrrrrrr;*s  zValueIter.__next__Nrrrrrr *s  r cCt||S)zGet an iterator over all the values stored in a document. The iterator will return ValueItem objects, in ascending order of value number. )r rHrJr:rrr_document_gen_values_iter*rc@r)ValueStreamItemzAn item returned from iteration of the values in a document. The item supports access to the following attributes: - `docid`: The docid for the item. - `value`: The contents of the value. rrcCrr$r)rrrrrrr7*rzValueStreamItem.__init__Nrrrrrr*r rc@s0eZdZdZddZddZddZdd Zd S) ValueStreamIterzAn iterator over all the values stored in a document. The iterator will return ValueStreamItem objects, in ascending order of value number. cCs||_||_d|_dSr)rxrmovedrrrrr7*s zValueStreamIter.__init__cCr9r$rr:rrrr;*r<zValueStreamIter.__iter__cCsB|js |jd|_|j|jkrtd|_t|j|jSr)rrxr;rr~rrrr:rrrr;*s  zValueStreamIter.__next__cCsJ|j|jkr |j||j|jkrd|_td|_t|j|jSr)rxrrrr~rrrrrrrr*s  zValueStreamIter.skip_toN)rrr=rTr7r;r;rrrrrr*s  rcr)Ncst||||S)zGet an iterator over all the values stored in a slot in the database. The iterator will return ValueStreamItem objects, in ascending order of document id. )rrvs_beginvs_endrr valuestream*szwrapper..valuestream)rrr)rrrrr*s c@s8eZdZdZddZddZddZdd Zd d Zd S) LatLongCoordsIterzuAn iterator over all the coordinates in a LatLongCoords object. The iterator returns LatLongCoord objects. cCrr$rrrrrr7*rzLatLongCoordsIter.__init__cCr9r$rr:rrrr;+r<zLatLongCoordsIter.__iter__cCs ||Sr$equalsrotherrrrr|+rWzLatLongCoordsIter.__eq__cCs || Sr$rrrrrr+s zLatLongCoordsIter.__ne__cCs*|j|jr t|j}|j|Sr$)rxrrr~ get_coordr;rrrrr; +s   zLatLongCoordsIter.__next__N) rrr=rTr7r;r|rr;rrrrr*s rcCr)z}Get an iterator over all the coordinates in a LatLongCoords. The iterator will return xapian.LatLongCoord objects. )rrrr:rrr_latlongcoords_iter+rrcCs*t|dsg|_|j|t||dSN _deciders)rr!r_enquire_add_matchspy_orig)rdeciderrrr_enquire_match_spy_add#+s  r$cCst|t|dr |`dSdSr )_enquire_clear_matchspies_origrr!r:rrr_enquire_match_spies_clear,+s r&cGsBt|g|Rt|dkrt|dtr|ddSdSdS)Nr )_stem_init_origrrrrrdrrr _stem_init7+sr(_ _swigregisterIterator)r Nr$)rrrk(rTrrrrrweakrefr!r __version__r r"SWIG_PyInstanceMethod_NewSwigPyIterator_valuerSwigPyIterator_incrincrSwigPyIterator_decrdecrSwigPyIterator_distancedistanceSwigPyIterator_equalequalSwigPyIterator_copycopySwigPyIterator_nextrSwigPyIterator___next__r;SwigPyIterator_previouspreviousSwigPyIterator_advanceadvanceSwigPyIterator___eq__r|SwigPyIterator___ne__rSwigPyIterator___iadd____iadd__SwigPyIterator___isub____isub__SwigPyIterator___add__rSwigPyIterator___sub____sub__SwigPyIterator_swigregister ExceptionrArIrJrLrMrNrOrQrR Error___str__rError_swigregisterrXLogicError_swigregisterr]RuntimeError_swigregisterr`AssertionError_swigregisterrg!InvalidArgumentError_swigregisterrl"InvalidOperationError_swigregisterrqUnimplementedError_swigregisterruDatabaseError_swigregisterry!DatabaseCorruptError_swigregisterr} DatabaseCreateError_swigregisterrDatabaseLockError_swigregisterr"DatabaseModifiedError_swigregisterr!DatabaseOpeningError_swigregisterr!DatabaseVersionError_swigregisterrDocNotFoundError_swigregisterr$FeatureUnavailableError_swigregisterrInternalError_swigregisterrNetworkError_swigregisterr NetworkTimeoutError_swigregisterrQueryParserError_swigregisterrSerialisationError_swigregisterrRangeError_swigregisterrWildcardError_swigregisterr"DatabaseNotFoundError_swigregisterr DatabaseClosedError_swigregisterrrrr BAD_VALUENO DB_CREATEDB_CREATE_OR_OPENDB_CREATE_OR_OVERWRITEDB_OPEN DB_NO_SYNC DB_FULL_SYNC DB_DANGEROUSDB_NO_TERMLISTDB_BACKEND_CHERTDB_BACKEND_GLASSDB_BACKEND_INMEMORYDB_BACKEND_STUB DB_RETRY_LOCKDBCHECK_SHORT_TREEDBCHECK_FULL_TREEDBCHECK_SHOW_FREELISTDBCHECK_SHOW_STATS DBCHECK_FIXDBCOMPACT_MULTIPASSDBCOMPACT_NO_RENUMBERDBCOMPACT_SINGLE_FILEDOC_ASSUME_VALIDrrrr_PositionIterator___eq___PositionIterator___ne___PositionIterator_equalsr_PositionIterator_get_termposr_PositionIterator___next___PositionIterator_swigregisterrrrrrrrrrrrrr_PostingIterator___eq___PostingIterator___ne___PostingIterator_equals_PostingIterator_get_docidr_PostingIterator___next___PostingIterator_swigregisterrrrrrrrrrr_TermIterator___eq___TermIterator___ne___TermIterator_equals_TermIterator_get_termr_TermIterator___next___TermIterator_swigregisterrrrrrrrr _ValueIterator___eq___ValueIterator___ne___ValueIterator_equals_ValueIterator_get_valuer_ValueIterator___next___ValueIterator_swigregisterr rrrrrrrrrr r"r%r)r*r+r,r-r/r1r2r6r8r:r<r=r>r?rArBrCrDrErFrGrHrIrJrKrMrNrODocument_swigregisterrSrXr[r^r`rarbrdrerfrgrjrlrmrnrprrrsRegistry_swigregisterrurvrwrxryrzr{r|r}r~rrrrrrrrrrQuery_swigregisterrrStemImplementation___call____call__rStemImplementation_swigregisterr Stem___call__rrrStem_swigregisterrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrTermGenerator_swigregisterrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r3r4r5r6r7r8r9r:r;r<r=r>MSet_get_docidMSet_get_documentr?rAMSet_get_document_percentageget_document_percentageMSet_swigregisterrKrNrOrPrQrRrSrTrUrVrXrYrZr[r]_MSetIterator___eq___MSetIterator___ne___MSetIterator_equals_MSetIterator_get_docid_MSetIterator___next___MSetIterator_prevprev_MSetIterator_swigregisterrerhrirjrkrlrmrnroESet_swigregisterrqrtru_ESetIterator___eq___ESetIterator___ne___ESetIterator_equals_ESetIterator_get_term_ESetIterator___next___ESetIterator_prev_ESetIterator_swigregisterr}r~rrrrrrrrrrrrRSet_swigregisterrMatchDecider___call__MatchDecider_swigregisterrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrEnquire_swigregisterrExpandDecider___call__rrExpandDecider_swigregisterrExpandDeciderAnd_swigregisterr&ExpandDeciderFilterPrefix_swigregisterrKeyMaker___call__rKeyMaker_swigregisterrr MultiValueKeyMaker_swigregister RP_SUFFIX RP_REPEATEDRP_DATE_PREFER_MDYrStopper___call__rrStopper_swigregisterrrrSimpleStopper_swigregisterrrr"RangeProcessor___call__r#RangeProcessor_swigregisterr&DateRangeProcessor_swigregisterr*!NumberRangeProcessor_swigregisterr.ValueRangeProcessor___call__r1 ValueRangeProcessor_swigregisterr4&StringValueRangeProcessor_swigregisterr8$DateValueRangeProcessor_swigregisterr<&NumberValueRangeProcessor_swigregisterr@FieldProcessor___call__rCFieldProcessor_swigregisterrFrIrKrLrMrOrQrRrSrTrUrVrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrkrmrprqrrrsQueryParser_swigregisterrrrrr!ValueSetMatchDecider_swigregisterrrrrrrrrrrrWeight_swigregisterrBoolWeight_swigregisterrTfIdfWeight_swigregisterrBM25Weight_swigregisterrBM25PlusWeight_swigregisterrTradWeight_swigregisterrInL2Weight_swigregisterrIfB2Weight_swigregisterrIneB2Weight_swigregisterrBB2Weight_swigregisterrDLHWeight_swigregisterrPL2Weight_swigregisterrPL2PlusWeight_swigregisterrDPHWeight_swigregisterrLMWeight_swigregisterrrrCoordWeight_swigregisterrrrrrrr r r rrrrrrrrrrCompactor_swigregisterr'r*r+r,r-r.r/r0r2r3r4r5r6r8r<r>r@rArBrCrErFPostingSource_swigregisterrIrOrPrQrRrSrVrWrXrYr\r]r^r_r`rarbrcrdrergrhrjrkrmValuePostingSource_swigregisterrprsrtrurv%ValueWeightPostingSource_swigregisterry/DecreasingValueWeightPostingSource_swigregisterrrrrrrr"ValueMapPostingSource_swigregisterr%FixedWeightPostingSource_swigregisterrMatchSpy___call__rrrrrMatchSpy_swigregisterrrrrrrrrrrrValueCountMatchSpy_swigregisterrrrrrTrrLatLongCoord_swigregisterrLatLongCoordsIterator___eq__LatLongCoordsIterator_equalsLatLongCoordsIterator_get_coordrLatLongCoordsIterator___next__"LatLongCoordsIterator_swigregisterrrrrrrrrrrrrLatLongCoords_swigregisterrrrLatLongMetric___call__rLatLongMetric_swigregisterrGreatCircleMetric_swigregisterr)LatLongDistancePostingSource_swigregisterr$LatLongDistanceKeyMaker_swigregisterrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr r r r r rrrrrrrrrrrrrrrrrrr r!r"r$r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?Database_swigregisterrArErHrIrJrKrLrNrOrPrQrRrTrVrWrXrYrZr\r]r_r`rcrdrerfrgrhrjWritableDatabase_swigregisterrmrn __docformat__rpr|rr;__len__r __getitem__get_hitrrrrrrmatching_termsrralltermsrtermlistr spellingsrsynonymsr synonym_keysr metadata_keysrrstoplistr unstemlistrrrr7rrrrrrrrrrrrrrrrrrrrrrrrrrrpostlistrr positionlistr r rrrrrrr"r$r%r&r'r(MatchAll MatchNothing__all__diritem startswithendswithtuplerrrrs:   I*%$%$$$$($/%($$%$$$$$$4ln.(  8    (  8    G  J    f  ,          Y    }  ,      ,  ?     7  "  N   ?  ? -   $  E  > ,        A  v           $               %  5 +  `         2 O    p  _      ^    {  8   &  ;  . |   y     7      vV                                                <8   0       6