| database.h | | database.h | |
| | | | |
| skipping to change at line 40 | | skipping to change at line 40 | |
| | | | |
| #include <xapian/base.h> | | #include <xapian/base.h> | |
| #include <xapian/document.h> | | #include <xapian/document.h> | |
| #include <xapian/types.h> | | #include <xapian/types.h> | |
| #include <xapian/positioniterator.h> | | #include <xapian/positioniterator.h> | |
| #include <xapian/postingiterator.h> | | #include <xapian/postingiterator.h> | |
| #include <xapian/termiterator.h> | | #include <xapian/termiterator.h> | |
| #include <xapian/valueiterator.h> | | #include <xapian/valueiterator.h> | |
| #include <xapian/visibility.h> | | #include <xapian/visibility.h> | |
| | | | |
|
| /// The Xapian library lives in the Xapian namespace. | | | |
| namespace Xapian { | | namespace Xapian { | |
| | | | |
| /** This class is used to access a database, or a group of databases. | | /** 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
. | | * For searching, this class is used in conjunction with an Enquire object
. | |
| * | | * | |
| * @exception InvalidArgumentError will be thrown if an invalid | | * @exception InvalidArgumentError will be thrown if an invalid | |
| * argument is supplied, for example, an unknown database type. | | * argument is supplied, for example, an unknown database type. | |
| * | | * | |
| * @exception DatabaseOpeningError may be thrown if the database cannot | | * @exception DatabaseOpeningError may be thrown if the database cannot | |
| | | | |
| skipping to change at line 576 | | skipping to change at line 575 | |
| * as the filesystem isn't corrupted, etc). | | * as the filesystem isn't corrupted, etc). | |
| * | | * | |
| * A transaction is started with begin_transaction() and can | | * A transaction is started with begin_transaction() and can | |
| * either be committed by calling commit_transaction() or aborted | | * either be committed by calling commit_transaction() or aborted | |
| * by calling cancel_transaction(). | | * by calling cancel_transaction(). | |
| * | | * | |
| * By default, a transaction implicitly calls commit() before and | | * By default, a transaction implicitly calls commit() before and | |
| * after so that the modifications stand and fall without affecting | | * after so that the modifications stand and fall without affecting | |
| * modifications before or after. | | * modifications before or after. | |
| * | | * | |
|
| * The downside of these calls to commit() is that small transactio | | * The downside of these implicit calls to commit() is that small | |
| ns | | * transactions can harm indexing performance in the same way that | |
| * can harm indexing performance in the same way that explicitly | | * explicitly calling commit() frequently can. | |
| * calling commit() frequently can. | | | |
| * | | * | |
| * If you're applying atomic groups of changes and only wish to | | * If you're applying atomic groups of changes and only wish to | |
| * ensure that each group is either applied or not applied, then | | * ensure that each group is either applied or not applied, then | |
| * you can prevent the automatic commit() before and after the | | * you can prevent the automatic commit() before and after the | |
| * transaction by starting the transaction with | | * transaction by starting the transaction with | |
| * begin_transaction(false). However, if cancel_transaction is | | * begin_transaction(false). However, if cancel_transaction is | |
| * called (or if commit_transaction isn't called before the | | * called (or if commit_transaction isn't called before the | |
| * WritableDatabase object is destroyed) then any changes which | | * WritableDatabase object is destroyed) then any changes which | |
| * were pending before the transaction began will also be discarded
. | | * were pending before the transaction began will also be discarded
. | |
| * | | * | |
| | | | |
| skipping to change at line 762 | | skipping to change at line 761 | |
| void replace_document(Xapian::docid did, | | void replace_document(Xapian::docid did, | |
| const Xapian::Document & document); | | const Xapian::Document & document); | |
| | | | |
| /** Replace any documents matching a term. | | /** Replace any documents matching a term. | |
| * | | * | |
| * This method replaces any documents indexed by the specified term | | * This method replaces any documents indexed by the specified term | |
| * with the specified document. If any documents are indexed by th
e | | * with the specified document. If any documents are indexed by th
e | |
| * term, the lowest document ID will be used for the document, | | * term, the lowest document ID will be used for the document, | |
| * otherwise a new document ID will be generated as for add_documen
t. | | * otherwise a new document ID will be generated as for add_documen
t. | |
| * | | * | |
|
| * The intended use is to allow UIDs from another system to easily | | * One common use is to allow UIDs from another system to easily be | |
| * be mapped to terms in Xapian, although this method probably has | | * mapped to terms in Xapian. Note that this method doesn't | |
| * other uses. | | * 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. | |
| | | * | |
| | | * Another possible use is to allow groups of documents to be marke | |
| | | d for | |
| | | * later deletion - for example, you could add a "deletion date" te | |
| | | rm | |
| | | * to documents at index time and use this method to easily and eff | |
| | | iciently | |
| | | * delete all documents due for deletion on a particular date. | |
| * | | * | |
| * Note that changes to the database won't be immediately committed
to | | * Note that changes to the database won't be immediately committed
to | |
| * disk; see commit() for more details. | | * disk; see commit() for more details. | |
| * | | * | |
| * As with all database modification operations, the effect is | | * As with all database modification operations, the effect is | |
| * atomic: the document(s) will either be fully replaced, or the | | * atomic: the document(s) will either be fully replaced, or the | |
| * document(s) fail to be replaced and an exception is thrown | | * document(s) fail to be replaced and an exception is thrown | |
| * (possibly at a | | * (possibly at a | |
| * later time when commit() is called or the database is closed). | | * later time when commit() is called or the database is closed). | |
| * | | * | |
| | | | |
End of changes. 3 change blocks. |
| 8 lines changed or deleted | | 17 lines changed or added | |
|
| dbfactory.h | | dbfactory.h | |
| /** \file dbfactory.h | | /** \file dbfactory.h | |
| * \brief Factory functions for constructing Database and WritableDatabase
objects | | * \brief Factory functions for constructing Database and WritableDatabase
objects | |
| */ | | */ | |
|
| /* Copyright (C) 2005,2006,2007,2008 Olly Betts | | /* Copyright (C) 2005,2006,2007,2008,2009 Olly Betts | |
| * | | * | |
| * This program is free software; you can redistribute it and/or | | * This program is free software; you can redistribute it and/or | |
| * modify it under the terms of the GNU General Public License as | | * modify it under the terms of the GNU General Public License as | |
| * published by the Free Software Foundation; either version 2 of the | | * published by the Free Software Foundation; either version 2 of the | |
| * License, or (at your option) any later version. | | * License, or (at your option) any later version. | |
| * | | * | |
| * This program is distributed in the hope that it will be useful, | | * This program is distributed in the hope that it will be useful, | |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| * GNU General Public License for more details. | | * GNU General Public License for more details. | |
| | | | |
| skipping to change at line 36 | | skipping to change at line 36 | |
| | | | |
| #include <xapian/types.h> | | #include <xapian/types.h> | |
| #include <xapian/version.h> | | #include <xapian/version.h> | |
| #include <xapian/visibility.h> | | #include <xapian/visibility.h> | |
| | | | |
| namespace Xapian { | | namespace Xapian { | |
| | | | |
| class Database; | | class Database; | |
| class WritableDatabase; | | class WritableDatabase; | |
| | | | |
|
| | | /// Database factory functions which determine the database type automatica
lly. | |
| namespace Auto { | | namespace Auto { | |
| | | | |
| /** Construct a Database object for a stub database file. | | /** Construct a Database object for a stub database file. | |
| * | | * | |
| * The stub database file contains serialised parameters for one | | * The stub database file contains serialised parameters for one | |
| * or more databases. | | * or more databases. | |
| * | | * | |
| * @param file pathname of the stub database file. | | * @param file pathname of the stub database file. | |
| */ | | */ | |
| XAPIAN_VISIBILITY_DEFAULT | | XAPIAN_VISIBILITY_DEFAULT | |
| | | | |
| skipping to change at line 61 | | skipping to change at line 62 | |
| * database. | | * database. | |
| * | | * | |
| * @param file pathname of the stub database file. | | * @param file pathname of the stub database file. | |
| */ | | */ | |
| XAPIAN_VISIBILITY_DEFAULT | | XAPIAN_VISIBILITY_DEFAULT | |
| WritableDatabase open_stub(const std::string &file, int action); | | WritableDatabase open_stub(const std::string &file, int action); | |
| | | | |
| } | | } | |
| | | | |
| #ifdef XAPIAN_HAS_INMEMORY_BACKEND | | #ifdef XAPIAN_HAS_INMEMORY_BACKEND | |
|
| | | /// Database factory functions for the inmemory backend. | |
| namespace InMemory { | | namespace InMemory { | |
| | | | |
| /** Construct a WritableDatabase object for a new, empty InMemory database. | | /** Construct a WritableDatabase object for a new, empty InMemory database. | |
| * | | * | |
| * Only a writable InMemory database can be created, since a read-only one | | * Only a writable InMemory database can be created, since a read-only one | |
| * would always remain empty. | | * would always remain empty. | |
| */ | | */ | |
| XAPIAN_VISIBILITY_DEFAULT | | XAPIAN_VISIBILITY_DEFAULT | |
| WritableDatabase open(); | | WritableDatabase open(); | |
| | | | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| #ifdef XAPIAN_HAS_CHERT_BACKEND | | #ifdef XAPIAN_HAS_CHERT_BACKEND | |
|
| | | /// Database factory functions for the chert backend. | |
| namespace Chert { | | namespace Chert { | |
| | | | |
| /** Construct a Database object for read-only access to a Chert database. | | /** Construct a Database object for read-only access to a Chert database. | |
| * | | * | |
| * @param dir pathname of the directory containing the database. | | * @param dir pathname of the directory containing the database. | |
| */ | | */ | |
| XAPIAN_VISIBILITY_DEFAULT | | XAPIAN_VISIBILITY_DEFAULT | |
| Database open(const std::string &dir); | | Database open(const std::string &dir); | |
| | | | |
| /** Construct a Database object for update access to a Chert database. | | /** Construct a Database object for update access to a Chert database. | |
| | | | |
| skipping to change at line 110 | | skipping to change at line 113 | |
| * existing database. | | * existing database. | |
| */ | | */ | |
| XAPIAN_VISIBILITY_DEFAULT | | XAPIAN_VISIBILITY_DEFAULT | |
| WritableDatabase | | WritableDatabase | |
| open(const std::string &dir, int action, int block_size = 8192); | | open(const std::string &dir, int action, int block_size = 8192); | |
| | | | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| #ifdef XAPIAN_HAS_FLINT_BACKEND | | #ifdef XAPIAN_HAS_FLINT_BACKEND | |
|
| | | /// Database factory functions for the flint backend. | |
| namespace Flint { | | namespace Flint { | |
| | | | |
| /** Construct a Database object for read-only access to a Flint database. | | /** Construct a Database object for read-only access to a Flint database. | |
| * | | * | |
| * @param dir pathname of the directory containing the database. | | * @param dir pathname of the directory containing the database. | |
| */ | | */ | |
| XAPIAN_VISIBILITY_DEFAULT | | XAPIAN_VISIBILITY_DEFAULT | |
| Database open(const std::string &dir); | | Database open(const std::string &dir); | |
| | | | |
| /** Construct a Database object for update access to a Flint database. | | /** Construct a Database object for update access to a Flint database. | |
| | | | |
| skipping to change at line 145 | | skipping to change at line 149 | |
| * existing database. | | * existing database. | |
| */ | | */ | |
| XAPIAN_VISIBILITY_DEFAULT | | XAPIAN_VISIBILITY_DEFAULT | |
| WritableDatabase | | WritableDatabase | |
| open(const std::string &dir, int action, int block_size = 8192); | | open(const std::string &dir, int action, int block_size = 8192); | |
| | | | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| #ifdef XAPIAN_HAS_REMOTE_BACKEND | | #ifdef XAPIAN_HAS_REMOTE_BACKEND | |
|
| | | /// Database factory functions for the remote backend. | |
| namespace Remote { | | namespace Remote { | |
| | | | |
| /** Construct a Database object for read-only access to a remote database | | /** Construct a Database object for read-only access to a remote database | |
| * accessed via a TCP connection. | | * accessed via a TCP connection. | |
| * | | * | |
| * Access to the remote database is via a TCP connection to the specified | | * Access to the remote database is via a TCP connection to the specified | |
| * host and port. | | * host and port. | |
| * | | * | |
| * @param host hostname to connect to. | | * @param host hostname to connect to. | |
| * @param port port number to connect to. | | * @param port port number to connect to. | |
| | | | |
End of changes. 6 change blocks. |
| 1 lines changed or deleted | | 6 lines changed or added | |
|
| error.h | | error.h | |
| /** @file error.h | | /** @file error.h | |
| * @brief Hierarchy of classes which Xapian can throw as exceptions. | | * @brief Hierarchy of classes which Xapian can throw as exceptions. | |
| */ | | */ | |
|
| /* Warning: This file is generated by ./generate-exceptions - do not modify | | /* Warning: This file is generated by /data/home/olly/tmp/xapian-svn-snapsh | |
| directly! */ | | ot/tags/1.1.3/xapian/xapian-core/generate-exceptions - do not modify direct | |
| /* Copyright (C) 2003,2004,2006,2007 Olly Betts | | ly! */ | |
| | | /* Copyright (C) 2003,2004,2006,2007,2009 Olly Betts | |
| * | | * | |
| * This program is free software; you can redistribute it and/or | | * This program is free software; you can redistribute it and/or | |
| * modify it under the terms of the GNU General Public License as | | * modify it under the terms of the GNU General Public License as | |
| * published by the Free Software Foundation; either version 2 of the | | * published by the Free Software Foundation; either version 2 of the | |
| * License, or (at your option) any later version. | | * License, or (at your option) any later version. | |
| * | | * | |
| * This program is distributed in the hope that it will be useful, | | * This program is distributed in the hope that it will be useful, | |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| * GNU General Public License for more details. | | * GNU General Public License for more details. | |
| | | | |
| skipping to change at line 706 | | skipping to change at line 706 | |
| QueryParserError(const std::string &msg_, const std::string &context_,
const char * type_, const char * error_string_) | | QueryParserError(const std::string &msg_, const std::string &context_,
const char * type_, const char * error_string_) | |
| : RuntimeError(msg_, context_, type_, error_string_) {} | | : RuntimeError(msg_, context_, type_, error_string_) {} | |
| | | | |
| /** @private @internal | | /** @private @internal | |
| * @brief Constructor for use by constructors of derived classes. | | * @brief Constructor for use by constructors of derived classes. | |
| */ | | */ | |
| QueryParserError(const std::string &msg_, const std::string &context_,
const char * type_, int errno_) | | QueryParserError(const std::string &msg_, const std::string &context_,
const char * type_, int errno_) | |
| : RuntimeError(msg_, context_, type_, errno_) {} | | : RuntimeError(msg_, context_, type_, errno_) {} | |
| }; | | }; | |
| | | | |
|
| | | /** Indicates an error in the std::string serialisation of an object. */ | |
| | | class XAPIAN_VISIBILITY_DEFAULT SerialisationError : public RuntimeError { | |
| | | public: | |
| | | /** @private @internal | |
| | | * @brief Private constructor for use by remote backend. | |
| | | * | |
| | | * @param error_string_ Optional string describing error. May be NU | |
| | | LL. | |
| | | */ | |
| | | SerialisationError(const std::string &msg_, const std::string &context_ | |
| | | , const char * error_string_) | |
| | | : RuntimeError(msg_, context_, "SerialisationError", error_string_) | |
| | | {} | |
| | | /** General purpose constructor which allows setting errno. */ | |
| | | explicit SerialisationError(const std::string &msg_, const std::string | |
| | | &context_ = std::string(), int errno_ = 0) | |
| | | : RuntimeError(msg_, context_, "SerialisationError", errno_) {} | |
| | | /** Construct from message and errno value. */ | |
| | | SerialisationError(const std::string &msg_, int errno_) | |
| | | : RuntimeError(msg_, std::string(), "SerialisationError", errno_) {} | |
| | | protected: | |
| | | /** @private @internal | |
| | | * @brief Constructor for use by constructors of derived classes. | |
| | | */ | |
| | | SerialisationError(const std::string &msg_, const std::string &context_ | |
| | | , const char * type_, const char * error_string_) | |
| | | : RuntimeError(msg_, context_, type_, error_string_) {} | |
| | | | |
| | | /** @private @internal | |
| | | * @brief Constructor for use by constructors of derived classes. | |
| | | */ | |
| | | SerialisationError(const std::string &msg_, const std::string &context_ | |
| | | , const char * type_, int errno_) | |
| | | : RuntimeError(msg_, context_, type_, errno_) {} | |
| | | }; | |
| | | | |
| /** RangeError indicates an attempt to access outside the bounds of a conta
iner. | | /** RangeError indicates an attempt to access outside the bounds of a conta
iner. | |
| */ | | */ | |
| class XAPIAN_VISIBILITY_DEFAULT RangeError : public RuntimeError { | | class XAPIAN_VISIBILITY_DEFAULT RangeError : public RuntimeError { | |
| public: | | public: | |
| /** @private @internal | | /** @private @internal | |
| * @brief Private constructor for use by remote backend. | | * @brief Private constructor for use by remote backend. | |
| * | | * | |
| * @param error_string_ Optional string describing error. May be NU
LL. | | * @param error_string_ Optional string describing error. May be NU
LL. | |
| */ | | */ | |
| RangeError(const std::string &msg_, const std::string &context_, const
char * error_string_) | | RangeError(const std::string &msg_, const std::string &context_, const
char * error_string_) | |
| | | | |
End of changes. 2 change blocks. |
| 3 lines changed or deleted | | 40 lines changed or added | |
|
| postingsource.h | | postingsource.h | |
| | | | |
| skipping to change at line 270 | | skipping to change at line 270 | |
| * If this returns an empty string, Xapian will assume that serialise(
) | | * If this returns an empty string, Xapian will assume that serialise(
) | |
| * and unserialise() are not implemented. | | * and unserialise() are not implemented. | |
| */ | | */ | |
| virtual std::string name() const; | | virtual std::string name() const; | |
| | | | |
| /** Serialise object parameters into a string. | | /** Serialise object parameters into a string. | |
| * | | * | |
| * The serialised parameters should represent the configuration of the | | * The serialised parameters should represent the configuration of the | |
| * posting source, but need not (indeed, should not) represent the cur
rent | | * posting source, but need not (indeed, should not) represent the cur
rent | |
| * iteration state. | | * iteration state. | |
|
| | | * | |
| | | * If you don't want to support the remote backend, you can use the | |
| | | * default implementation which simply throws Xapian::UnimplementedErr | |
| | | or. | |
| */ | | */ | |
| virtual std::string serialise() const; | | virtual std::string serialise() const; | |
| | | | |
| /** Create object given string serialisation returned by serialise(). | | /** Create object given string serialisation returned by serialise(). | |
| * | | * | |
| * Note that the returned object will be deallocated by Xapian after u
se | | * Note that the returned object will be deallocated by Xapian after u
se | |
| * with "delete". It must therefore have been allocated with "new". | | * with "delete". It must therefore have been allocated with "new". | |
| * | | * | |
|
| | | * If you don't want to support the remote backend, you can use the | |
| | | * default implementation which simply throws Xapian::UnimplementedErr | |
| | | or. | |
| | | * | |
| * @param s A serialised instance of this PostingSource subclass. | | * @param s A serialised instance of this PostingSource subclass. | |
| */ | | */ | |
| virtual PostingSource * unserialise(const std::string &s) const; | | virtual PostingSource * unserialise(const std::string &s) const; | |
| | | | |
| /** Set this PostingSource to the start of the list of postings. | | /** Set this PostingSource to the start of the list of postings. | |
| * | | * | |
| * This is called automatically by the matcher prior to each query bei
ng | | * This is called automatically by the matcher prior to each query bei
ng | |
| * processed. | | * processed. | |
| * | | * | |
| * If a PostingSource is used for multiple searches, @a init() will | | * If a PostingSource is used for multiple searches, @a init() will | |
| | | | |
| skipping to change at line 420 | | skipping to change at line 426 | |
| Xapian::weight get_weight() const; | | Xapian::weight get_weight() const; | |
| ValueWeightPostingSource * clone() const; | | ValueWeightPostingSource * clone() const; | |
| std::string name() const; | | std::string name() const; | |
| std::string serialise() const; | | std::string serialise() const; | |
| ValueWeightPostingSource * unserialise(const std::string &s) const; | | ValueWeightPostingSource * unserialise(const std::string &s) const; | |
| void init(const Database & db_); | | void init(const Database & db_); | |
| | | | |
| std::string get_description() const; | | std::string get_description() const; | |
| }; | | }; | |
| | | | |
|
| | | /** 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. T | |
| | | he | |
| | | * values in the slot must be serialised as by @a 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 documen | |
| | | ts | |
| | | * with ids A and B within this range (including the endpoints), where A i | |
| | | s | |
| | | * 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 quick | |
| | | ly | |
| | | * 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. | |
| | | */ | |
| | | class XAPIAN_VISIBILITY_DEFAULT DecreasingValueWeightPostingSource | |
| | | : public Xapian::ValueWeightPostingSource { | |
| | | protected: | |
| | | Xapian::docid range_start; | |
| | | Xapian::docid range_end; | |
| | | double curr_weight; | |
| | | | |
| | | /// Flag, set to true if there are docs after the end of the range. | |
| | | bool items_at_end; | |
| | | | |
| | | /// Skip the iterator forward if in the decreasing range, and weight is | |
| | | low. | |
| | | void skip_if_in_range(Xapian::weight min_wt); | |
| | | | |
| | | public: | |
| | | DecreasingValueWeightPostingSource(Xapian::valueno slot_, | |
| | | Xapian::docid range_start_ = 0, | |
| | | Xapian::docid range_end_ = 0); | |
| | | | |
| | | Xapian::weight get_weight() const; | |
| | | DecreasingValueWeightPostingSource * clone() const; | |
| | | std::string name() const; | |
| | | std::string serialise() const; | |
| | | DecreasingValueWeightPostingSource * unserialise(const std::string &s) | |
| | | const; | |
| | | void init(const Xapian::Database & db_); | |
| | | | |
| | | void next(Xapian::weight min_wt); | |
| | | void skip_to(Xapian::docid min_docid, Xapian::weight min_wt); | |
| | | bool check(Xapian::docid min_docid, Xapian::weight min_wt); | |
| | | | |
| | | std::string get_description() const; | |
| | | }; | |
| | | | |
| /** A posting source which looks up weights in a map using values as the ke
y. | | /** A posting source which looks up weights in a map using values as the ke
y. | |
| * | | * | |
| * This allows will return entries for all documents in the given database | | * 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 | | * 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 | | * corresponding weight in the weight map. If there is no mapping for a | |
| * particular value, the default weight will be returned (which itself | | * particular value, the default weight will be returned (which itself | |
| * defaults to 0.0). | | * defaults to 0.0). | |
| */ | | */ | |
| class XAPIAN_VISIBILITY_DEFAULT ValueMapPostingSource | | class XAPIAN_VISIBILITY_DEFAULT ValueMapPostingSource | |
| : public ValuePostingSource { | | : public ValuePostingSource { | |
| | | | |
End of changes. 3 change blocks. |
| 0 lines changed or deleted | | 68 lines changed or added | |
|
| query.h | | query.h | |
| | | | |
| skipping to change at line 47 | | skipping to change at line 47 | |
| // - we need to at present so that the Xapian::Query's template ctors | | // - we need to at present so that the Xapian::Query's template ctors | |
| // compile. | | // compile. | |
| class LocalSubMatch; | | class LocalSubMatch; | |
| class MultiMatch; | | class MultiMatch; | |
| class QueryOptimiser; | | class QueryOptimiser; | |
| struct SortPosName; | | struct SortPosName; | |
| | | | |
| namespace Xapian { | | namespace Xapian { | |
| | | | |
| class PostingSource; | | class PostingSource; | |
|
| class SerialisationContext; | | class Registry; | |
| | | | |
| /** Class representing a query. | | /** Class representing a query. | |
| * | | * | |
| * Queries are represented as a tree of objects. | | * Queries are represented as a tree of objects. | |
| */ | | */ | |
| class XAPIAN_VISIBILITY_DEFAULT Query { | | class XAPIAN_VISIBILITY_DEFAULT Query { | |
| public: | | public: | |
| /// Class holding details of the query | | /// Class holding details of the query | |
| class Internal; | | class Internal; | |
| /// @private @internal Reference counted internals. | | /// @private @internal Reference counted internals. | |
| | | | |
| skipping to change at line 82 | | skipping to change at line 82 | |
| OP_XOR, | | OP_XOR, | |
| | | | |
| /// Return iff left satisfied, but use weights from both | | /// Return iff left satisfied, but use weights from both | |
| OP_AND_MAYBE, | | OP_AND_MAYBE, | |
| | | | |
| /// As AND, but use only weights from left subquery | | /// As AND, but use only weights from left subquery | |
| OP_FILTER, | | OP_FILTER, | |
| | | | |
| /** Find occurrences of a list of terms with all the terms | | /** Find occurrences of a list of terms with all the terms | |
| * occurring within a specified window of positions. | | * occurring within a specified window of positions. | |
|
| | | * | |
| * Each occurrence of a term must be at a different position, | | * Each occurrence of a term must be at a different position, | |
| * but the order they appear in is irrelevant. | | * but the order they appear in is irrelevant. | |
| * | | * | |
| * The window parameter should be specified for this operation, | | * The window parameter should be specified for this operation, | |
| * but will default to the number of terms in the list. | | * but will default to the number of terms in the list. | |
| */ | | */ | |
| OP_NEAR, | | OP_NEAR, | |
| | | | |
| /** Find occurrences of a list of terms with all the terms | | /** Find occurrences of a list of terms with all the terms | |
| * occurring within a specified window of positions, and all | | * occurring within a specified window of positions, and all | |
|
| * the terms appearing in the order specified. Each occurrence | | * the terms appearing in the order specified. | |
| * of a term must be at a different position. | | * | |
| | | * Each occurrence of a term must be at a different position. | |
| * | | * | |
| * The window parameter should be specified for this operation, | | * The window parameter should be specified for this operation, | |
| * but will default to the number of terms in the list. | | * but will default to the number of terms in the list. | |
| */ | | */ | |
| OP_PHRASE, | | OP_PHRASE, | |
| | | | |
| /** Filter by a range test on a document value. */ | | /** Filter by a range test on a document value. */ | |
| OP_VALUE_RANGE, | | OP_VALUE_RANGE, | |
| | | | |
| /** Scale the weight of a subquery by the specified factor. | | /** Scale the weight of a subquery by the specified factor. | |
| | | | |
| skipping to change at line 288 | | skipping to change at line 290 | |
| * | | * | |
| * This method will fail if the query contains any external | | * This method will fail if the query contains any external | |
| * PostingSource leaf nodes. | | * PostingSource leaf nodes. | |
| * | | * | |
| * @param s The string representing the serialised query. | | * @param s The string representing the serialised query. | |
| */ | | */ | |
| static Query unserialise(const std::string &s); | | static Query unserialise(const std::string &s); | |
| | | | |
| /** Unserialise a query from a string produced by serialise(). | | /** Unserialise a query from a string produced by serialise(). | |
| * | | * | |
|
| * The supplied context will be used to attempt to unserialise any | | * The supplied registry will be used to attempt to unserialise any | |
| * external PostingSource leaf nodes. This method will fail if the | | * external PostingSource leaf nodes. This method will fail if the | |
| * query contains any external PostingSource leaf nodes which are n
ot | | * query contains any external PostingSource leaf nodes which are n
ot | |
|
| * registered in the context. | | * registered in the registry. | |
| * | | * | |
| * @param s The string representing the serialised query. | | * @param s The string representing the serialised query. | |
|
| * @param context A context to use when unserialising the query. | | * @param registry Xapian::Registry to use. | |
| */ | | */ | |
| static Query unserialise(const std::string & s, | | static Query unserialise(const std::string & s, | |
|
| const SerialisationContext & context); | | const Registry & registry); | |
| | | | |
| /// Return a string describing this object. | | /// Return a string describing this object. | |
| std::string get_description() const; | | std::string get_description() const; | |
| | | | |
| private: | | private: | |
| void add_subquery(const Query & subq); | | void add_subquery(const Query & subq); | |
| void add_subquery(const Query * subq); | | void add_subquery(const Query * subq); | |
| void add_subquery(const std::string & tname); | | void add_subquery(const std::string & tname); | |
| void start_construction(Query::op op_, Xapian::termcount parameter); | | void start_construction(Query::op op_, Xapian::termcount parameter); | |
| void end_construction(); | | void end_construction(); | |
| | | | |
| skipping to change at line 460 | | skipping to change at line 462 | |
| */ | | */ | |
| Internal(op_t op_, Xapian::valueno valno, const std::string &value); | | Internal(op_t op_, Xapian::valueno valno, const std::string &value); | |
| | | | |
| /// Construct an external source query. | | /// Construct an external source query. | |
| explicit Internal(Xapian::PostingSource * external_source_, bool own
ed); | | explicit Internal(Xapian::PostingSource * external_source_, bool own
ed); | |
| | | | |
| /** Destructor. */ | | /** Destructor. */ | |
| ~Internal(); | | ~Internal(); | |
| | | | |
| static Xapian::Query::Internal * unserialise(const std::string &s, | | static Xapian::Query::Internal * unserialise(const std::string &s, | |
|
| const SerialisationCont
ext & context); | | const Registry & regist
ry); | |
| | | | |
| /** Add a subquery. */ | | /** Add a subquery. */ | |
| void add_subquery(const Query::Internal * subq); | | void add_subquery(const Query::Internal * subq); | |
| | | | |
| /** Add a subquery without copying it. | | /** Add a subquery without copying it. | |
| * | | * | |
| * subq is owned by the object this is called on after the call. | | * subq is owned by the object this is called on after the call. | |
| */ | | */ | |
| void add_subquery_nocopy(Query::Internal * subq); | | void add_subquery_nocopy(Query::Internal * subq); | |
| | | | |
| | | | |
End of changes. 8 change blocks. |
| 8 lines changed or deleted | | 10 lines changed or added | |
|
| queryparser.h | | queryparser.h | |
| | | | |
| skipping to change at line 87 | | skipping to change at line 87 | |
| | | | |
| /// Return a string describing this object. | | /// Return a string describing this object. | |
| virtual std::string get_description() const; | | virtual std::string get_description() const; | |
| }; | | }; | |
| | | | |
| /// Base class for value range processors. | | /// Base class for value range processors. | |
| struct XAPIAN_VISIBILITY_DEFAULT ValueRangeProcessor { | | struct XAPIAN_VISIBILITY_DEFAULT ValueRangeProcessor { | |
| /// Destructor. | | /// Destructor. | |
| virtual ~ValueRangeProcessor(); | | virtual ~ValueRangeProcessor(); | |
| | | | |
|
| /** See if <begin>..<end> is a valid value range. | | /** Check for a valid range of this type. | |
| * | | * | |
|
| * If this ValueRangeProcessor recognises <begin>..<end> it returns th
e | | * If this ValueRangeProcessor recognises BEGIN..END it returns the | |
| * value number of range filter on. Otherwise it returns | | * value number of range filter on. Otherwise it returns | |
| * Xapian::BAD_VALUENO. | | * Xapian::BAD_VALUENO. | |
| */ | | */ | |
| virtual Xapian::valueno operator()(std::string &begin, std::string &end
) = 0; | | virtual Xapian::valueno operator()(std::string &begin, std::string &end
) = 0; | |
| }; | | }; | |
| | | | |
| /** Handle a string range. | | /** Handle a string range. | |
| * | | * | |
| * The end points can be any strings. | | * The end points can be any strings. | |
| */ | | */ | |
| | | | |
| skipping to change at line 128 | | skipping to change at line 128 | |
| * @param valno_ The value number to return from operator(). | | * @param valno_ The value number to return from operator(). | |
| * @param str_ A string to look for to recognise values as belongi
ng | | * @param str_ A string to look for to recognise values as belongi
ng | |
| * to this range. | | * to this range. | |
| * @param prefix_ Flag specifying whether to check for str_ as a prefi
x | | * @param prefix_ Flag specifying whether to check for str_ as a prefi
x | |
| * or a suffix. | | * or a suffix. | |
| */ | | */ | |
| StringValueRangeProcessor(Xapian::valueno valno_, const std::string &st
r_, | | StringValueRangeProcessor(Xapian::valueno valno_, const std::string &st
r_, | |
| bool prefix_ = true) | | bool prefix_ = true) | |
| : valno(valno_), prefix(prefix_), str(str_) { } | | : valno(valno_), prefix(prefix_), str(str_) { } | |
| | | | |
|
| /** See if <begin>..<end> is a valid string value range. | | /** Check for a valid range of this type. | |
| * | | * | |
| * If no prefix or suffix is specified, then this always returns the | | * If no prefix or suffix is specified, then this always returns the | |
| * value slot specified at construction time. | | * value slot specified at construction time. | |
| * | | * | |
| * If a prefix or suffix is specified, this is checked for first, and | | * If a prefix or suffix is specified, this is checked for first, and | |
| * it it doesn't match, this method returns Xapian::BAD_VALUENO. | | * it it doesn't match, this method returns Xapian::BAD_VALUENO. | |
| */ | | */ | |
| Xapian::valueno operator()(std::string &, std::string &); | | Xapian::valueno operator()(std::string &, std::string &); | |
| }; | | }; | |
| | | | |
| | | | |
| skipping to change at line 206 | | skipping to change at line 206 | |
| * For example, if str_ is "created:" and prefix_ is true, and the ran
ge | | * For example, if str_ is "created:" and prefix_ is true, and the ran
ge | |
| * processor has been added to the queryparser, the queryparser will | | * processor has been added to the queryparser, the queryparser will | |
| * accept "created:1/1/2000..31/12/2001". | | * accept "created:1/1/2000..31/12/2001". | |
| */ | | */ | |
| DateValueRangeProcessor(Xapian::valueno valno_, const std::string &str_
, | | DateValueRangeProcessor(Xapian::valueno valno_, const std::string &str_
, | |
| bool prefix_ = true, | | bool prefix_ = true, | |
| bool prefer_mdy_ = false, int epoch_year_ = 1970
) | | bool prefer_mdy_ = false, int epoch_year_ = 1970
) | |
| : StringValueRangeProcessor(valno_, str_, prefix_), | | : StringValueRangeProcessor(valno_, str_, prefix_), | |
| prefer_mdy(prefer_mdy_), epoch_year(epoch_year_) { } | | prefer_mdy(prefer_mdy_), epoch_year(epoch_year_) { } | |
| | | | |
|
| /** See if <begin>..<end> is a valid date value range. | | /** Check for a valid range of this type. | |
| * | | * | |
|
| * If <begin>..<end> is a sensible date range, this method returns the | | * If BEGIN..END is a sensible date range, this method returns the | |
| * value number of range filter on. Otherwise it returns | | * value number of range filter on. Otherwise it returns | |
| * Xapian::BAD_VALUENO. | | * Xapian::BAD_VALUENO. | |
| */ | | */ | |
| Xapian::valueno operator()(std::string &begin, std::string &end); | | Xapian::valueno operator()(std::string &begin, std::string &end); | |
| }; | | }; | |
| | | | |
| /** Handle a number range. | | /** Handle a number range. | |
| * | | * | |
| * This class must be used on values which have been encoded using | | * This class must be used on values which have been encoded using | |
| * Xapian::sortable_serialise() which turns numbers into strings which | | * Xapian::sortable_serialise() which turns numbers into strings which | |
| | | | |
| skipping to change at line 267 | | skipping to change at line 267 | |
| * processor has been added to the queryparser, the queryparser will | | * processor has been added to the queryparser, the queryparser will | |
| * accept "$10..50" or "$10..$50", but not "10..50" or "10..$50" as va
lid | | * accept "$10..50" or "$10..$50", but not "10..50" or "10..$50" as va
lid | |
| * ranges. If str_ is "kg" and prefix_ is false, the queryparser will | | * 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" a
s | | * accept "10..50kg" or "10kg..50kg", but not "10..50" or "10kg..50" a
s | |
| * valid ranges. | | * valid ranges. | |
| */ | | */ | |
| NumberValueRangeProcessor(Xapian::valueno valno_, const std::string &st
r_, | | NumberValueRangeProcessor(Xapian::valueno valno_, const std::string &st
r_, | |
| bool prefix_ = true) | | bool prefix_ = true) | |
| : StringValueRangeProcessor(valno_, str_, prefix_) { } | | : StringValueRangeProcessor(valno_, str_, prefix_) { } | |
| | | | |
|
| /** See if <begin>..<end> is a valid numeric value range. | | /** Check for a valid range of this type. | |
| * | | * | |
|
| * If <begin>..<end> is a valid numeric value range, and has the | | * If BEGIN..END is a valid numeric value range, and has the | |
| * appropriate prefix or suffix (if specified) required for this | | * appropriate prefix or suffix (if specified) required for this | |
| * NumberValueRangeProcessor, this method returns the value number of | | * NumberValueRangeProcessor, this method returns the value number of | |
| * range filter on, and sets begin and end to the appropriate serialis
ed | | * range filter on, and sets begin and end to the appropriate serialis
ed | |
| * values needed to delimit the range. Otherwise it returns | | * values needed to delimit the range. Otherwise it returns | |
| * Xapian::BAD_VALUENO. | | * Xapian::BAD_VALUENO. | |
| */ | | */ | |
| Xapian::valueno operator()(std::string &begin, std::string &end); | | Xapian::valueno operator()(std::string &begin, std::string &end); | |
| }; | | }; | |
| | | | |
| /// Build a Xapian::Query object from a user query string. | | /// Build a Xapian::Query object from a user query string. | |
| | | | |
| skipping to change at line 412 | | skipping to change at line 412 | |
| * prefix is added). | | * prefix is added). | |
| * | | * | |
| * Note that the stemming algorithm is only applied to words in | | * Note that the stemming algorithm is only applied to words in | |
| * probabilistic fields - boolean filter terms are never stemmed. | | * probabilistic fields - boolean filter terms are never stemmed. | |
| */ | | */ | |
| void set_stemming_strategy(stem_strategy strategy); | | void set_stemming_strategy(stem_strategy strategy); | |
| | | | |
| /// Set the stopper. | | /// Set the stopper. | |
| void set_stopper(const Stopper *stop = NULL); | | void set_stopper(const Stopper *stop = NULL); | |
| | | | |
|
| /** Set the default boolean operator. */ | | /** Set the default operator. | |
| | | * | |
| | | * This operator is used to combine non-filter query items when no | |
| | | * explicit operator is used. | |
| | | * | |
| | | * The most useful values for this are OP_OR (the default) and OP_AND. | |
| | | * OP_NEAR and OP_PHRASE can also be useful. | |
| | | * | |
| | | * So for example, 'weather forecast' is parsed as if it were 'weather | |
| | | OR | |
| | | * forecast' by default. | |
| | | */ | |
| void set_default_op(Query::op default_op); | | void set_default_op(Query::op default_op); | |
| | | | |
|
| /** Get the default boolean operator. */ | | /** Get the current default operator. */ | |
| Query::op get_default_op() const; | | Query::op get_default_op() const; | |
| | | | |
| /// Specify the database being searched. | | /// Specify the database being searched. | |
| void set_database(const Database &db); | | void set_database(const Database &db); | |
| | | | |
| /** Parse a query. | | /** Parse a query. | |
| * | | * | |
| * @param query_string A free-text query as entered by a user | | * @param query_string A free-text query as entered by a user | |
| * @param flags Zero or more Query::feature_flag specifying | | * @param flags Zero or more Query::feature_flag specifying | |
| * what features the QueryParser should support. Combine | | * what features the QueryParser should support. Combine | |
| | | | |
| skipping to change at line 455 | | skipping to change at line 465 | |
| * Multiple fields can be mapped to the same prefix. For example, you | | * Multiple fields can be mapped to the same prefix. For example, you | |
| * can make title: and subject: aliases for each other. | | * can make title: and subject: aliases for each other. | |
| * | | * | |
| * As of 1.0.4, you can call this method multiple times with the same | | * As of 1.0.4, you can call this method multiple times with the same | |
| * value of field to allow a single field to be mapped to multiple | | * value of field to allow a single field to be mapped to multiple | |
| * prefixes. Multiple terms being generated for such a field, and | | * prefixes. Multiple terms being generated for such a field, and | |
| * combined with @c Xapian::Query::OP_OR. | | * combined with @c Xapian::Query::OP_OR. | |
| * | | * | |
| * If any prefixes are specified for the empty field name (i.e. you | | * If any prefixes are specified for the empty field name (i.e. you | |
| * call this method with an empty string as the first parameter) | | * call this method with an empty string as the first parameter) | |
|
| * these prefixes will be used as the default prefix. If you do | | * these prefixes will be used for terms without a field specifier. | |
| * this and also specify the @c default_prefix parameter to | | * If you do this and also specify the @c default_prefix parameter to | |
| * @c parse_query(), then the @c default_prefix parameter will overrid | | @c | |
| e. | | * parse_query(), then the @c default_prefix parameter will override. | |
| | | * | |
| | | * If the prefix parameter is empty, then "field:word" will produce th | |
| | | e | |
| | | * term "word" (and this can be one of several prefixes for a particul | |
| | | ar | |
| | | * field, or for terms without a field specifier). | |
| * | | * | |
| * If you call @c add_prefix() and @c add_boolean_prefix() for the | | * If you call @c add_prefix() and @c add_boolean_prefix() for the | |
| * same value of @a field, a @c Xapian::InvalidOperationError exceptio
n | | * same value of @a field, a @c Xapian::InvalidOperationError exceptio
n | |
| * will be thrown. | | * will be thrown. | |
| * | | * | |
| * In 1.0.3 and earlier, subsequent calls to this method with the same | | * In 1.0.3 and earlier, subsequent calls to this method with the same | |
| * value of @a field had no effect. | | * value of @a field had no effect. | |
| * | | * | |
| * @param field The user visible field name | | * @param field The user visible field name | |
| * @param prefix The term prefix to map this to | | * @param prefix The term prefix to map this to | |
| | | | |
End of changes. 10 change blocks. |
| 13 lines changed or deleted | | 30 lines changed or added | |
|
| unicode.h | | unicode.h | |
| | | | |
| skipping to change at line 61 | | skipping to change at line 61 | |
| /** Return the number of bytes left in the iterator's buffer. */ | | /** Return the number of bytes left in the iterator's buffer. */ | |
| size_t left() const { return p ? end - p : 0; } | | size_t left() const { return p ? end - p : 0; } | |
| | | | |
| /** Assign a new string to the iterator. | | /** Assign a new string to the iterator. | |
| * | | * | |
| * The iterator will forget the string it was iterating through, and | | * The iterator will forget the string it was iterating through, and | |
| * return characters from the start of the new string when next called
. | | * return characters from the start of the new string when next called
. | |
| * The string is not copied into the iterator, so it must remain valid | | * The string is not copied into the iterator, so it must remain valid | |
| * while the iteration is in progress. | | * while the iteration is in progress. | |
| * | | * | |
|
| * @param p A pointer to the start of the string to read. | | * @param p_ A pointer to the start of the string to read. | |
| * | | * | |
| * @param len The length of the string to read. | | * @param len The length of the string to read. | |
| */ | | */ | |
| void assign(const char *p_, size_t len) { | | void assign(const char *p_, size_t len) { | |
| if (len) { | | if (len) { | |
| p = reinterpret_cast<const unsigned char*>(p_); | | p = reinterpret_cast<const unsigned char*>(p_); | |
| end = p + len; | | end = p + len; | |
| seqlen = 0; | | seqlen = 0; | |
| } else { | | } else { | |
| p = NULL; | | p = NULL; | |
| | | | |
| skipping to change at line 93 | | skipping to change at line 93 | |
| * is in progress. | | * is in progress. | |
| */ | | */ | |
| void assign(const std::string &s) { assign(s.data(), s.size()); } | | void assign(const std::string &s) { assign(s.data(), s.size()); } | |
| | | | |
| /** Create an iterator given a pointer to a null terminated string. | | /** Create an iterator given a pointer to a null terminated string. | |
| * | | * | |
| * The iterator will return characters from the start of the string wh
en | | * The iterator will return characters from the start of the string wh
en | |
| * next called. The string is not copied into the iterator, so it mus
t | | * next called. The string is not copied into the iterator, so it mus
t | |
| * remain valid while the iteration is in progress. | | * remain valid while the iteration is in progress. | |
| * | | * | |
|
| * @param p A pointer to the start of the null terminated string to re
ad. | | * @param p_ A pointer to the start of the null terminated string to r
ead. | |
| */ | | */ | |
| explicit Utf8Iterator(const char *p_); | | explicit Utf8Iterator(const char *p_); | |
| | | | |
| /** Create an iterator given a pointer and a length. | | /** Create an iterator given a pointer and a length. | |
| * | | * | |
| * The iterator will return characters from the start of the string wh
en | | * The iterator will return characters from the start of the string wh
en | |
| * next called. The string is not copied into the iterator, so it mus
t | | * next called. The string is not copied into the iterator, so it mus
t | |
| * remain valid while the iteration is in progress. | | * remain valid while the iteration is in progress. | |
| * | | * | |
|
| * @param p A pointer to the start of the string to read. | | * @param p_ A pointer to the start of the string to read. | |
| * | | * | |
| * @param len The length of the string to read. | | * @param len The length of the string to read. | |
| */ | | */ | |
| Utf8Iterator(const char *p_, size_t len) { assign(p_, len); } | | Utf8Iterator(const char *p_, size_t len) { assign(p_, len); } | |
| | | | |
| /** Create an iterator given a string. | | /** Create an iterator given a string. | |
| * | | * | |
| * The iterator will return characters from the start of the string wh
en | | * The iterator will return characters from the start of the string wh
en | |
| * next called. The string is not copied into the iterator, so it mus
t | | * next called. The string is not copied into the iterator, so it mus
t | |
| * remain valid while the iteration is in progress. | | * remain valid while the iteration is in progress. | |
| | | | |
| skipping to change at line 182 | | skipping to change at line 182 | |
| /// We implement the semantics of an STL input_iterator. | | /// We implement the semantics of an STL input_iterator. | |
| //@{ | | //@{ | |
| typedef std::input_iterator_tag iterator_category; | | typedef std::input_iterator_tag iterator_category; | |
| typedef unsigned value_type; | | typedef unsigned value_type; | |
| typedef size_t difference_type; | | typedef size_t difference_type; | |
| typedef const unsigned * pointer; | | typedef const unsigned * pointer; | |
| typedef const unsigned & reference; | | typedef const unsigned & reference; | |
| //@} | | //@} | |
| }; | | }; | |
| | | | |
|
| | | /// Functions associated with handling Unicode characters. | |
| namespace Unicode { | | namespace Unicode { | |
| | | | |
| /** Each Unicode character is in exactly one of these categories. */ | | /** Each Unicode character is in exactly one of these categories. */ | |
| typedef enum { | | typedef enum { | |
| UNASSIGNED, | | UNASSIGNED, | |
| UPPERCASE_LETTER, | | UPPERCASE_LETTER, | |
| LOWERCASE_LETTER, | | LOWERCASE_LETTER, | |
| TITLECASE_LETTER, | | TITLECASE_LETTER, | |
| MODIFIER_LETTER, | | MODIFIER_LETTER, | |
| OTHER_LETTER, | | OTHER_LETTER, | |
| | | | |
End of changes. 4 change blocks. |
| 3 lines changed or deleted | | 4 lines changed or added | |
|
| valueiterator.h | | valueiterator.h | |
| | | | |
| skipping to change at line 168 | | skipping to change at line 168 | |
| typedef std::string value_type; | | typedef std::string value_type; | |
| /// @private | | /// @private | |
| typedef Xapian::doccount_diff difference_type; | | typedef Xapian::doccount_diff difference_type; | |
| /// @private | | /// @private | |
| typedef std::string * pointer; | | typedef std::string * pointer; | |
| /// @private | | /// @private | |
| typedef std::string & reference; | | typedef std::string & reference; | |
| // @} | | // @} | |
| }; | | }; | |
| | | | |
|
| | | /// Equality test for ValueIterator objects. | |
| inline bool | | inline bool | |
| operator==(const ValueIterator &a, const ValueIterator &b) | | operator==(const ValueIterator &a, const ValueIterator &b) | |
| { | | { | |
| // Use a pointer comparison - this ensures both that (a == a) and corre
ct | | // Use a pointer comparison - this ensures both that (a == a) and corre
ct | |
| // handling of end iterators (which we ensure have NULL internals). | | // handling of end iterators (which we ensure have NULL internals). | |
| return a.internal.get() == b.internal.get(); | | return a.internal.get() == b.internal.get(); | |
| } | | } | |
| | | | |
|
| | | /// @internal Equality test for ValueIterator object and end iterator. | |
| inline bool | | inline bool | |
| operator==(const ValueIterator &a, const ValueIteratorEnd_ &) | | operator==(const ValueIterator &a, const ValueIteratorEnd_ &) | |
| { | | { | |
| return a.internal.get() == NULL; | | return a.internal.get() == NULL; | |
| } | | } | |
| | | | |
|
| | | /// @internal Equality test for ValueIterator object and end iterator. | |
| inline bool | | inline bool | |
| operator==(const ValueIteratorEnd_ &a, const ValueIterator &b) | | operator==(const ValueIteratorEnd_ &a, const ValueIterator &b) | |
| { | | { | |
| return b == a; | | return b == a; | |
| } | | } | |
| | | | |
|
| | | /// @internal Equality test for end iterators. | |
| inline bool | | inline bool | |
| operator==(const ValueIteratorEnd_ &, const ValueIteratorEnd_ &) | | operator==(const ValueIteratorEnd_ &, const ValueIteratorEnd_ &) | |
| { | | { | |
| return true; | | return true; | |
| } | | } | |
| | | | |
|
| | | /// Inequality test for ValueIterator objects. | |
| inline bool | | inline bool | |
| operator!=(const ValueIterator &a, const ValueIterator &b) | | operator!=(const ValueIterator &a, const ValueIterator &b) | |
| { | | { | |
| return !(a == b); | | return !(a == b); | |
| } | | } | |
| | | | |
|
| | | /// @internal Inequality test for ValueIterator object and end iterator. | |
| inline bool | | inline bool | |
| operator!=(const ValueIterator &a, const ValueIteratorEnd_ &b) | | operator!=(const ValueIterator &a, const ValueIteratorEnd_ &b) | |
| { | | { | |
| return !(a == b); | | return !(a == b); | |
| } | | } | |
| | | | |
|
| | | /// @internal Inequality test for ValueIterator object and end iterator. | |
| inline bool | | inline bool | |
| operator!=(const ValueIteratorEnd_ &a, const ValueIterator &b) | | operator!=(const ValueIteratorEnd_ &a, const ValueIterator &b) | |
| { | | { | |
| return !(a == b); | | return !(a == b); | |
| } | | } | |
| | | | |
|
| | | /// @internal Inequality test for end iterators. | |
| inline bool | | inline bool | |
| operator!=(const ValueIteratorEnd_ &a, const ValueIteratorEnd_ &b) | | operator!=(const ValueIteratorEnd_ &a, const ValueIteratorEnd_ &b) | |
| { | | { | |
| return !(a == b); | | return !(a == b); | |
| } | | } | |
| | | | |
| } | | } | |
| | | | |
| #endif // XAPIAN_INCLUDED_VALUEITERATOR_H | | #endif // XAPIAN_INCLUDED_VALUEITERATOR_H | |
| | | | |
End of changes. 8 change blocks. |
| 0 lines changed or deleted | | 8 lines changed or added | |
|
| valuesetmatchdecider.h | | valuesetmatchdecider.h | |
| /** \file valuesetmatchdecider.h | | /** \file valuesetmatchdecider.h | |
| * \brief MatchDecider subclass for filtering results by value. | | * \brief MatchDecider subclass for filtering results by value. | |
| */ | | */ | |
| /* Copyright 2008 Lemur Consulting Limited | | /* Copyright 2008 Lemur Consulting Limited | |
|
| * Copyright 2008 Olly Betts | | * Copyright 2008,2009 Olly Betts | |
| * | | * | |
| * This program is free software; you can redistribute it and/or | | * This program is free software; you can redistribute it and/or | |
| * modify it under the terms of the GNU General Public License as | | * modify it under the terms of the GNU General Public License as | |
| * published by the Free Software Foundation; either version 2 of the | | * published by the Free Software Foundation; either version 2 of the | |
| * License, or (at your option) any later version. | | * License, or (at your option) any later version. | |
| * | | * | |
| * This program is distributed in the hope that it will be useful, | | * This program is distributed in the hope that it will be useful, | |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| * GNU General Public License for more details. | | * GNU General Public License for more details. | |
| | | | |
| skipping to change at line 56 | | skipping to change at line 56 | |
| /** Whether to include or exclude documents with the specified values. | | /** Whether to include or exclude documents with the specified values. | |
| * | | * | |
| * If true, documents with a value in the set are returned. | | * If true, documents with a value in the set are returned. | |
| * If false, documents with a value not in the set are returned. | | * If false, documents with a value not in the set are returned. | |
| */ | | */ | |
| bool inclusive; | | bool inclusive; | |
| | | | |
| public: | | public: | |
| /** Construct a ValueSetMatchDecider. | | /** Construct a ValueSetMatchDecider. | |
| * | | * | |
|
| * @param valuenum The value slot number to look in. | | * @param slot The value slot number to look in. | |
| * | | * | |
|
| * @param inclusive If true, match decider accepts documents which hav
e a | | * @param inclusive_ If true, match decider accepts documents which ha
ve a | |
| * value in the specified slot which is a member of the test set; if | | * 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 | | * false, match decider accepts documents which do not have a value in
the | |
| * specified slot. | | * specified slot. | |
| */ | | */ | |
|
| ValueSetMatchDecider(Xapian::valueno valuenum, bool inclusive); | | ValueSetMatchDecider(Xapian::valueno slot, bool inclusive_) | |
| | | : valuenum(slot), inclusive(inclusive_) { } | |
| | | | |
| /** Add a value to the test set. | | /** Add a value to the test set. | |
| * | | * | |
| * @param value The value to add to the test set. | | * @param value The value to add to the test set. | |
| */ | | */ | |
| void add_value(const std::string& value) | | void add_value(const std::string& value) | |
| { | | { | |
| testset.insert(value); | | testset.insert(value); | |
| } | | } | |
| | | | |
| | | | |
End of changes. 4 change blocks. |
| 4 lines changed or deleted | | 5 lines changed or added | |
|
| version.h | | version.h | |
|
| // version.h: Define preprocesor symbols for the library version. | | /** @file version.h | |
| // If using GCC, also check the C++ ABI version is compatible with that use | | * @brief Define preprocesor symbols for the library version | |
| d | | */ | |
| // to build the library. | | | |
| // | | | |
| // Copyright (C) 2002,2004,2005,2006,2007,2008,2009 Olly Betts | | // Copyright (C) 2002,2004,2005,2006,2007,2008,2009 Olly Betts | |
| // | | // | |
| // This program is free software; you can redistribute it and/or | | // This program is free software; you can redistribute it and/or | |
| // modify it under the terms of the GNU General Public License as | | // modify it under the terms of the GNU General Public License as | |
| // published by the Free Software Foundation; either version 2 of the | | // published by the Free Software Foundation; either version 2 of the | |
| // License, or (at your option) any later version. | | // License, or (at your option) any later version. | |
| // | | // | |
| // This program is distributed in the hope that it will be useful | | // This program is distributed in the hope that it will be useful | |
| // but WITHOUT ANY WARRANTY; without even the implied warranty of | | // but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| | | | |
| skipping to change at line 43 | | skipping to change at line 42 | |
| #endif | | #endif | |
| | | | |
| #ifdef _GLIBCXX_DEBUG | | #ifdef _GLIBCXX_DEBUG | |
| #error You are compiling with _GLIBCXX_DEBUG defined, but the library | | #error You are compiling with _GLIBCXX_DEBUG defined, but the library | |
| #error was not compiled with this flag. The settings must match or your | | #error was not compiled with this flag. The settings must match or your | |
| #error program will not work correctly. | | #error program will not work correctly. | |
| #endif | | #endif | |
| #endif | | #endif | |
| #endif | | #endif | |
| | | | |
|
| #define XAPIAN_VERSION "1.1.2" | | /// The version of Xapian as a C string literal. | |
| | | #define XAPIAN_VERSION "1.1.3" | |
| | | | |
| | | /** The major component of the Xapian version. | |
| | | * E.g. for Xapian 1.0.14 this would be: 1 | |
| | | */ | |
| #define XAPIAN_MAJOR_VERSION 1 | | #define XAPIAN_MAJOR_VERSION 1 | |
|
| | | | |
| | | /** The minor component of the Xapian version. | |
| | | * E.g. for Xapian 1.0.14 this would be: 0 | |
| | | */ | |
| #define XAPIAN_MINOR_VERSION 1 | | #define XAPIAN_MINOR_VERSION 1 | |
|
| #define XAPIAN_REVISION 2 | | | |
| | | | |
|
| | | /** The revision component of the Xapian version. | |
| | | * E.g. for Xapian 1.0.14 this would be: 14 | |
| | | */ | |
| | | #define XAPIAN_REVISION 3 | |
| | | | |
| | | /// XAPIAN_HAS_CHERT_BACKEND Defined if the chert backend is enabled. | |
| #define XAPIAN_HAS_CHERT_BACKEND 1 | | #define XAPIAN_HAS_CHERT_BACKEND 1 | |
|
| | | | |
| | | /// XAPIAN_HAS_FLINT_BACKEND Defined if the flint backend is enabled. | |
| #define XAPIAN_HAS_FLINT_BACKEND 1 | | #define XAPIAN_HAS_FLINT_BACKEND 1 | |
|
| | | | |
| | | /// XAPIAN_HAS_INMEMORY_BACKEND Defined if the inmemory backend is enabled. | |
| #define XAPIAN_HAS_INMEMORY_BACKEND 1 | | #define XAPIAN_HAS_INMEMORY_BACKEND 1 | |
|
| | | | |
| | | /// XAPIAN_HAS_REMOTE_BACKEND Defined if the remote backend is enabled. | |
| #define XAPIAN_HAS_REMOTE_BACKEND 1 | | #define XAPIAN_HAS_REMOTE_BACKEND 1 | |
| | | | |
| #endif /* XAPIAN_INCLUDED_VERSION_H */ | | #endif /* XAPIAN_INCLUDED_VERSION_H */ | |
| | | | |
End of changes. 8 change blocks. |
| 7 lines changed or deleted | | 25 lines changed or added | |
|
| weight.h | | weight.h | |
| | | | |
| skipping to change at line 74 | | skipping to change at line 74 | |
| /** Allow the subclass to perform any initialisation it needs to. | | /** Allow the subclass to perform any initialisation it needs to. | |
| * | | * | |
| * @param factor Any scaling factor (e.g. from OP_SCALE_WEIGHT). | | * @param factor Any scaling factor (e.g. from OP_SCALE_WEIGHT). | |
| */ | | */ | |
| virtual void init(double factor) = 0; | | virtual void init(double factor) = 0; | |
| | | | |
| private: | | private: | |
| /// Don't allow assignment. | | /// Don't allow assignment. | |
| void operator=(const Weight &); | | void operator=(const Weight &); | |
| | | | |
|
| /** Clone this object. | | | |
| * | | | |
| * This method allocates and returns a copy of the object it is called | | | |
| on. | | | |
| * | | | |
| * If your subclass is called FooWeight and has parameters a and b, th | | | |
| en | | | |
| * you would implement FooWeight::clone() like so: | | | |
| * | | | |
| * FooWeight * FooWeight::clone() const { return new FooWeight(a, b); | | | |
| } | | | |
| * | | | |
| * Note that the returned object will be deallocated by Xapian after u | | | |
| se | | | |
| * with "delete". It must therefore have been allocated with "new". | | | |
| */ | | | |
| virtual Weight * clone() const = 0; | | | |
| | | | |
| /// A bitmask of the statistics this weighting scheme needs. | | /// A bitmask of the statistics this weighting scheme needs. | |
| stat_flags stats_needed; | | stat_flags stats_needed; | |
| | | | |
| /// The number of documents in the collection. | | /// The number of documents in the collection. | |
| Xapian::doccount collection_size_; | | Xapian::doccount collection_size_; | |
| | | | |
| /// The number of documents marked as relevant. | | /// The number of documents marked as relevant. | |
| Xapian::doccount rset_size_; | | Xapian::doccount rset_size_; | |
| | | | |
| /// The average length of a document in the collection. | | /// The average length of a document in the collection. | |
| | | | |
| skipping to change at line 127 | | skipping to change at line 113 | |
| | | | |
| /// An upper bound on the wdf of this term. | | /// An upper bound on the wdf of this term. | |
| Xapian::termcount wdf_upper_bound_; | | Xapian::termcount wdf_upper_bound_; | |
| | | | |
| public: | | public: | |
| class Internal; | | class Internal; | |
| | | | |
| /** Virtual destructor, because we have virtual methods. */ | | /** Virtual destructor, because we have virtual methods. */ | |
| virtual ~Weight(); | | virtual ~Weight(); | |
| | | | |
|
| | | /** Clone this object. | |
| | | * | |
| | | * This method allocates and returns a copy of the object it is called | |
| | | on. | |
| | | * | |
| | | * If your subclass is called FooWeight and has parameters a and b, th | |
| | | en | |
| | | * you would implement FooWeight::clone() like so: | |
| | | * | |
| | | * FooWeight * FooWeight::clone() const { return new FooWeight(a, b); | |
| | | } | |
| | | * | |
| | | * Note that the returned object will be deallocated by Xapian after u | |
| | | se | |
| | | * with "delete". It must therefore have been allocated with "new". | |
| | | */ | |
| | | virtual Weight * clone() const = 0; | |
| | | | |
| /** Return the name of this weighting scheme. | | /** Return the name of this weighting scheme. | |
| * | | * | |
|
| * This name is used by the remote backend. It is passed with the | | * This name is used by the remote backend. It is passed along with t
he | |
| * serialised parameters to the remote server so that it knows which c
lass | | * serialised parameters to the remote server so that it knows which c
lass | |
| * to create. | | * to create. | |
| * | | * | |
| * Return the full namespace-qualified name of your class here - if | | * Return the full namespace-qualified name of your class here - if | |
| * your class is called FooWeight, return "FooWeight" from this method | | * your class is called FooWeight, return "FooWeight" from this method | |
| * (Xapian::BM25Weight returns "Xapian::BM25Weight" here). | | * (Xapian::BM25Weight returns "Xapian::BM25Weight" here). | |
| * | | * | |
|
| * If you don't want to support the remote backend in your weighting | | * If you don't want to support the remote backend, you can use the | |
| * scheme, you can just implement this to throw | | * default implementation which simply returns an empty string. | |
| * Xapian::UnimplementedError. | | | |
| */ | | */ | |
|
| virtual std::string name() const = 0; | | virtual std::string name() const; | |
| | | | |
| /** Return this object's parameters serialised as a single string. | | /** Return this object's parameters serialised as a single string. | |
| * | | * | |
|
| * If you don't want to support the remote backend in your weighting | | * If you don't want to support the remote backend, you can use the | |
| * scheme, you can just implement this to throw | | * default implementation which simply throws Xapian::UnimplementedErr | |
| * Xapian::UnimplementedError. | | or. | |
| */ | | */ | |
|
| virtual std::string serialise() const = 0; | | virtual std::string serialise() const; | |
| | | | |
| /** Unserialise parameters. | | /** Unserialise parameters. | |
| * | | * | |
| * This method unserialises parameters serialised by the @a serialise(
) | | * This method unserialises parameters serialised by the @a serialise(
) | |
| * method and allocates and returns a new object initialised with them
. | | * method and allocates and returns a new object initialised with them
. | |
| * | | * | |
|
| * If you don't want to support the remote backend in your weighting | | * If you don't want to support the remote backend, you can use the | |
| * scheme, you can just implement this to throw | | * default implementation which simply throws Xapian::UnimplementedErr | |
| * Xapian::UnimplementedError. | | or. | |
| * | | * | |
| * Note that the returned object will be deallocated by Xapian after u
se | | * Note that the returned object will be deallocated by Xapian after u
se | |
| * with "delete". It must therefore have been allocated with "new". | | * with "delete". It must therefore have been allocated with "new". | |
| */ | | */ | |
|
| virtual Weight * unserialise(const std::string & s) const = 0; | | virtual Weight * unserialise(const std::string & s) const; | |
| | | | |
| /** Calculate the weight contribution for this object's term to a docum
ent. | | /** Calculate the weight contribution for this object's term to a docum
ent. | |
| * | | * | |
| * The parameters give information about the document which may be use
d | | * The parameters give information about the document which may be use
d | |
| * in the calculations: | | * in the calculations: | |
| * | | * | |
| * @param wdf The within document frequency of the term in the docu
ment. | | * @param wdf The within document frequency of the term in the docu
ment. | |
| * @param doclen The document's length (unnormalised). | | * @param doclen The document's length (unnormalised). | |
| */ | | */ | |
| virtual Xapian::weight get_sumpart(Xapian::termcount wdf, | | virtual Xapian::weight get_sumpart(Xapian::termcount wdf, | |
| | | | |
| skipping to change at line 200 | | skipping to change at line 197 | |
| virtual Xapian::weight get_sumextra(Xapian::termcount doclen) const = 0
; | | virtual Xapian::weight get_sumextra(Xapian::termcount doclen) const = 0
; | |
| | | | |
| /** Return an upper bound on what get_sumextra() can return for any | | /** Return an upper bound on what get_sumextra() can return for any | |
| * document. | | * document. | |
| * | | * | |
| * This information is used by the matcher to perform various | | * This information is used by the matcher to perform various | |
| * optimisations, so strive to make the bound as tight as possible. | | * optimisations, so strive to make the bound as tight as possible. | |
| */ | | */ | |
| virtual Xapian::weight get_maxextra() const = 0; | | virtual Xapian::weight get_maxextra() const = 0; | |
| | | | |
|
| /** @private @internal Helper method for cloning Xapian::Weight objects | | | |
| . | | | |
| * | | | |
| * This avoids us having to forward-declare internal classes in the | | | |
| * external API headers in order to make them friends of Xapian::Weigh | | | |
| t. | | | |
| * | | | |
| * You should not call this method from your own code. | | | |
| */ | | | |
| Weight * clone_() const { return clone(); } | | | |
| | | | |
| /** @private @internal Initialise this object to calculate weights for
term | | /** @private @internal Initialise this object to calculate weights for
term | |
| * @a term. | | * @a term. | |
| * | | * | |
| * @param stats Source of statistics. | | * @param stats Source of statistics. | |
| * @param query_len_ Query length. | | * @param query_len_ Query length. | |
| * @param term The term for the new object. | | * @param term The term for the new object. | |
| * @param wqf_ The within-query-frequency of @a term. | | * @param wqf_ The within-query-frequency of @a term. | |
| * @param factor Any scaling factor (e.g. from OP_SCALE_WEIGHT). | | * @param factor Any scaling factor (e.g. from OP_SCALE_WEIGHT). | |
| */ | | */ | |
| void init_(const Internal & stats, Xapian::termcount query_len_, | | void init_(const Internal & stats, Xapian::termcount query_len_, | |
| | | | |
End of changes. 10 change blocks. |
| 42 lines changed or deleted | | 30 lines changed or added | |
|
| xapian.h | | xapian.h | |
| | | | |
| skipping to change at line 48 | | skipping to change at line 48 | |
| #include <xapian/postingiterator.h> | | #include <xapian/postingiterator.h> | |
| #include <xapian/termiterator.h> | | #include <xapian/termiterator.h> | |
| #include <xapian/valueiterator.h> | | #include <xapian/valueiterator.h> | |
| | | | |
| // Indexing | | // Indexing | |
| #include <xapian/termgenerator.h> | | #include <xapian/termgenerator.h> | |
| | | | |
| // Searching | | // Searching | |
| #include <xapian/enquire.h> | | #include <xapian/enquire.h> | |
| #include <xapian/expanddecider.h> | | #include <xapian/expanddecider.h> | |
|
| | | #include <xapian/keymaker.h> | |
| | | #include <xapian/matchspy.h> | |
| #include <xapian/postingsource.h> | | #include <xapian/postingsource.h> | |
| #include <xapian/query.h> | | #include <xapian/query.h> | |
| #include <xapian/queryparser.h> | | #include <xapian/queryparser.h> | |
|
| #include <xapian/sorter.h> | | | |
| #include <xapian/valuesetmatchdecider.h> | | #include <xapian/valuesetmatchdecider.h> | |
| #include <xapian/weight.h> | | #include <xapian/weight.h> | |
| | | | |
| // Stemming | | // Stemming | |
| #include <xapian/stem.h> | | #include <xapian/stem.h> | |
| | | | |
|
| // Serialisation support | | // Subclass registry | |
| #include <xapian/serialisationcontext.h> | | #include <xapian/registry.h> | |
| | | | |
| // Unicode support | | // Unicode support | |
| #include <xapian/unicode.h> | | #include <xapian/unicode.h> | |
| | | | |
| // ELF visibility annotations for GCC. | | // ELF visibility annotations for GCC. | |
| #include <xapian/visibility.h> | | #include <xapian/visibility.h> | |
| | | | |
|
| | | /// The Xapian namespace contains public interfaces for the Xapian library. | |
| | | namespace Xapian { | |
| | | | |
| // Functions returning library version: | | // Functions returning library version: | |
| | | | |
|
| namespace Xapian { | | | |
| /** Report the version string of the library which the program is linked wi
th. | | /** Report the version string of the library which the program is linked wi
th. | |
| * | | * | |
| * This may be different to the version compiled against (given by | | * This may be different to the version compiled against (given by | |
| * XAPIAN_VERSION) if shared libraries are being used. | | * XAPIAN_VERSION) if shared libraries are being used. | |
| */ | | */ | |
| XAPIAN_VISIBILITY_DEFAULT | | XAPIAN_VISIBILITY_DEFAULT | |
| const char * version_string(); | | const char * version_string(); | |
| | | | |
|
| /** Report the major version of the library which the program is linked to. | | /** Report the major version of the library which the program is linked wit
h. | |
| * | | * | |
| * This may be different to the version compiled against (given by | | * This may be different to the version compiled against (given by | |
| * XAPIAN_MAJOR_VERSION) if shared libraries are being used. | | * XAPIAN_MAJOR_VERSION) if shared libraries are being used. | |
| */ | | */ | |
| XAPIAN_VISIBILITY_DEFAULT | | XAPIAN_VISIBILITY_DEFAULT | |
| int major_version(); | | int major_version(); | |
| | | | |
|
| /** Report the minor version of the library which the program is linked to. | | /** Report the minor version of the library which the program is linked wit
h. | |
| * | | * | |
| * This may be different to the version compiled against (given by | | * This may be different to the version compiled against (given by | |
| * XAPIAN_MINOR_VERSION) if shared libraries are being used. | | * XAPIAN_MINOR_VERSION) if shared libraries are being used. | |
| */ | | */ | |
| XAPIAN_VISIBILITY_DEFAULT | | XAPIAN_VISIBILITY_DEFAULT | |
| int minor_version(); | | int minor_version(); | |
| | | | |
|
| /** Report the revision of the library which the program is linked to. | | /** Report the revision of the library which the program is linked with. | |
| * | | * | |
| * This may be different to the version compiled against (given by | | * This may be different to the version compiled against (given by | |
| * XAPIAN_REVISION) if shared libraries are being used. | | * XAPIAN_REVISION) if shared libraries are being used. | |
| */ | | */ | |
| XAPIAN_VISIBILITY_DEFAULT | | XAPIAN_VISIBILITY_DEFAULT | |
| int revision(); | | int revision(); | |
| | | | |
| } | | } | |
| | | | |
| #endif /* XAPIAN_INCLUDED_XAPIAN_H */ | | #endif /* XAPIAN_INCLUDED_XAPIAN_H */ | |
| | | | |
End of changes. 8 change blocks. |
| 7 lines changed or deleted | | 10 lines changed or added | |
|