|DB_OPEN||Open a database, fail if database doesnt exist.|
|DB_CREATE||Create a new database, fail if database exists.|
|DB_CREATE_OR_OPEN||Open an existing database, without destroying data, or create a new database if one doesnt already exist.|
|DB_CREATE_OR_OVERWRITE||Overwrite database if it exists.|
OP_AND Match if both subqueries are satisfied. OP_OR Match if either subquery is satisfied. OP_AND_NOT Match if left but not right subquery is satisfied. OP_XOR Match if left or right, but not both queries are satisfied. OP_AND_MAYBE Match if left is satisfied, but use weights from both. OP_FILTER Like OP_AND, but only weight using the left query. OP_NEAR Match if the words are near each other. The window should be specified, as a parameter to Search::Xapian::Query::Query, but it defaults to the number of terms in the list. OP_PHRASE Match as a phrase (All words in order). OP_ELITE_SET Select an elite set from the subqueries, and perform a query with these combined as an OR query. OP_VALUE_RANGE Filter by a range test on a document value.
FLAG_DEFAULT This gives the QueryParser default flag settings, allowing you to easily add flags to the default ones. FLAG_BOOLEAN Support AND, OR, etc and bracketted subexpressions. FLAG_LOVEHATE Support + and -. FLAG_PHRASE Support quoted phrases. FLAG_BOOLEAN_ANY_CASE Support AND, OR, etc even if they arent in ALLCAPS. FLAG_WILDCARD Support right truncation (e.g. Xap*). FLAG_PURE_NOT Allow queries such as NOT apples.
These require the use of a list of all documents in the database which is potentially expensive, so this feature isnt enabled by default.
FLAG_PARTIAL Enable partial matching.
Partial matching causes the parser to treat the query as a partially entered search. This will automatically treat the final word as a wildcarded match, unless it is followed by whitespace, to produce more stable results from interactive searches.
FLAG_SPELLING_CORRECTION FLAG_SYNONYM FLAG_AUTO_SYNONYMS FLAG_AUTO_MULTIWORD_SYNONYMS
STEM_ALL Stem all terms. STEM_NONE Dont stem any terms. STEM_SOME Stem some terms, in a manner compatible with Omega (capitalised words and those in phrases arent stemmed).
ENQ_ASCENDING docids sort in ascending order (default) ENQ_DESCENDING docids sort in descending order ENQ_DONT_CARE docids sort in whatever order is most efficient for the backend
Standard is db + ops + qpflags + qpstem
major_version Returns the major version of the Xapian C++ library being used. E.g. for Xapian 1.0.9 this would return 1. minor_version Returns the minor version of the Xapian C++ library being used. E.g. for Xapian 1.0.9 this would return 0. revision Returns the revision of the Xapian C++ library being used. E.g. for Xapian 1.0.9 this would return 9. In a stable release series, Xapian libraries with the same minor and major versions are usually ABI compatible, so this often wont match the third component of $Search::Xapian::VERSION (which is the version of the Search::Xapian XS wrappers).
sortable_serialise NUMBER Convert a floating point number to a string, preserving sort order.
This method converts a floating point number to a string, suitable for using as a value for numeric range restriction, or for use as a sort key.
The conversion is platform independent.
The conversion attempts to ensure that, for any pair of values supplied to the conversion algorithm, the result of comparing the original values (with a numeric comparison operator) will be the same as the result of comparing the resulting values (with a string comparison operator). On platforms which represent doubles with the precisions specified by IEEE_754, this will be the case: if the representation of doubles is more precise, it is possible that two very close doubles will be mapped to the same string, so will compare equal.
Note also that both zero and -zero will be converted to the same representation: since these compare equal, this satisfies the comparison constraint, but its worth knowing this if you wish to use the encoding in some situation where this distinction matters.
Handling of NaN isnt (currently) guaranteed to be sensible.
sortable_unserialise SERIALISED_NUMBER Convert a string encoded using sortable_serialise back to a floating point number.
This expects the input to be a string produced by sortable_serialise(). If the input is not such a string, the value returned is undefined (but no error will be thrown).
The result of the conversion will be exactly the value which was supplied to sortable_serialise() when making the string on platforms which represent doubles with the precisions specified by IEEE_754, but may be a different (nearby) value on other platforms.
Error Handling Error handling for all methods liable to generate them. Documentation Add POD documentation for all classes, where possible just adapted from Xapian docs. Unwrapped classes The following Xapian classes are not yet wrapped: Error (and subclasses), ErrorHandler, ExpandDecider (and subclasses), user-defined weight classes.
We dont yet wrap Xapian::Query::MatchAll, Xapian::Query::MatchNothing, or Xapian::BAD_VALUENO.
Unwrapped methods The following methods are not yet wrapped: Enquire::get_eset(...) with more than two arguments, Query ctor optional parameter parameter, Remote::open(...), static Stem::get_available_languages().
We wrap MSet::swap() and MSet::operator(), but not ESet::swap(), ESet::operator(). Is swap actually useful? Should we instead tie MSet and ESet to allow them to just be used as lists?
Thanks to Tye McQueen <firstname.lastname@example.org> for explaining the finer points of how best to write XS frontends to C++ libraries, James Aylett <email@example.com> for clarifying the less obvious aspects of the Xapian API, Tim Brody for patches wrapping ::QueryParser and ::Stopper and especially Olly Betts <firstname.lastname@example.org> for contributing advice, bugfixes, and wrapper code for the more obscure classes.
Alex Bowley <email@example.com>
Please report any bugs/suggestions to <firstname.lastname@example.org> or use the Xapian bug tracker <http://xapian.org/bugs>. Please do NOT use the CPAN bug tracker or mail any of the authors individually.
Search::Xapian::BM25Weight, Search::Xapian::BoolWeight, Search::Xapian::Database, Search::Xapian::Document, Search::Xapian::Enquire, Search::Xapian::MultiValueSorter, Search::Xapian::PositionIterator, Search::Xapian::PostingIterator, Search::Xapian::QueryParser, Search::Xapian::Stem, Search::Xapian::TermGenerator, Search::Xapian::TermIterator, Search::Xapian::TradWeight, Search::Xapian::ValueIterator, Search::Xapian::Weight, Search::Xapian::WritableDatabase, and <http://xapian.org/>.
|perl v5.20.3||XAPIAN (3)||2011-01-14|