database.h | database.h | |||
---|---|---|---|---|
skipping to change at line 135 | skipping to change at line 135 | |||
* It can be used either to make sure the latest results are return ed, | * It can be used either to make sure the latest results are return ed, | |||
* or to recover from a Xapian::DatabaseModifiedError. | * or to recover from a Xapian::DatabaseModifiedError. | |||
* | * | |||
* Calling reopen() on a database which has been closed (with @a | * Calling reopen() on a database which has been closed (with @a | |||
* close()) will always raise a Xapian::DatabaseError. | * close()) will always raise a Xapian::DatabaseError. | |||
*/ | */ | |||
void reopen(); | void reopen(); | |||
/** Close the database. | /** Close the database. | |||
* | * | |||
* This closes the database and releases all file handles held by t | * This closes the database and closes all its file handles. | |||
he | ||||
* database. | ||||
* | * | |||
* This cannot be undone - in particular, calling reopen() after | * For a WritableDatabase, if a transaction is active it will be | |||
* closing a database will not reopen it, but will instead throw a | * 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 thro | ||||
w a | ||||
* Xapian::DatabaseError exception. | * Xapian::DatabaseError exception. | |||
* | * | |||
* Calling close() again on a database which has already been close d | * Calling close() again on a database which has already been close d | |||
* has no effect (and doesn't raise an exception). | * has no effect (and doesn't raise an exception). | |||
* | * | |||
* After close() has been called, calls to other methods of the | * After close() has been called, calls to other methods of the | |||
* database, and to methods of other objects associated with the | * database, and to methods of other objects associated with the | |||
* database, will either: | * database, will either: | |||
* | * | |||
* - behave exactly as they would have done if the database had no t | * - behave exactly as they would have done if the database had no t | |||
skipping to change at line 478 | skipping to change at line 481 | |||
*/ | */ | |||
std::string get_uuid() const; | std::string get_uuid() const; | |||
}; | }; | |||
/** This class provides read/write access to a database. | /** This class provides read/write access to a database. | |||
*/ | */ | |||
class XAPIAN_VISIBILITY_DEFAULT WritableDatabase : public Database { | class XAPIAN_VISIBILITY_DEFAULT WritableDatabase : public Database { | |||
public: | public: | |||
/** Destroy this handle on the database. | /** Destroy this handle on the database. | |||
* | * | |||
* If there are no copies of this object remaining, the database | * If no other handles to this database remain, the database will b | |||
* will be closed. If there are any transactions in progress | e | |||
* these will be aborted as if cancel_transaction had been called. | * closed. | |||
* | ||||
* If a transaction is active cancel_transaction() will be implicit | ||||
ly | ||||
* called; if no transaction is active commit() will be implicitly | ||||
* called, but any exception will be swallowed (because throwing | ||||
* exceptions in C++ destructors is problematic). If you aren't us | ||||
ing | ||||
* transactions and want to know about any failure to commit change | ||||
s, | ||||
* call commit() explicitly before the destructor gets called. | ||||
*/ | */ | |||
virtual ~WritableDatabase(); | virtual ~WritableDatabase(); | |||
/** Create an empty WritableDatabase. | /** Create an empty WritableDatabase. | |||
*/ | */ | |||
WritableDatabase(); | WritableDatabase(); | |||
/** Open a database for update, automatically determining the databa se | /** Open a database for update, automatically determining the databa se | |||
* backend to use. | * backend to use. | |||
* | * | |||
End of changes. 3 change blocks. | ||||
8 lines changed or deleted | 21 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 /data/home/olly/tmp/xapian-svn-snapsh ot/tags/1.2.8/xapian/xapian-core/generate-exceptions - do not modify direct ly! */ | /* Warning: This file is generated by /data/home/olly/tmp/xapian-svn-snapsh ot/tags/1.2.9/xapian/xapian-core/generate-exceptions - do not modify direct ly! */ | |||
/* Copyright (C) 2003,2004,2006,2007,2009 Olly Betts | /* 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 | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
errorhandler.h | errorhandler.h | |||
---|---|---|---|---|
skipping to change at line 52 | skipping to change at line 52 | |||
*/ | */ | |||
class XAPIAN_VISIBILITY_DEFAULT ErrorHandler { | class XAPIAN_VISIBILITY_DEFAULT ErrorHandler { | |||
/// Don't allow assignment. | /// Don't allow assignment. | |||
void operator=(const ErrorHandler &); | void operator=(const ErrorHandler &); | |||
/// Don't allow copying. | /// Don't allow copying. | |||
ErrorHandler(const Xapian::ErrorHandler &); | ErrorHandler(const Xapian::ErrorHandler &); | |||
/** Perform user-specified error handling. | /** Perform user-specified error handling. | |||
* | * | |||
* This virtual method must be defined by the APU user to specify | * This virtual method must be defined by the API user to specify | |||
* how a Xapian::Error is to be handled. | * how a Xapian::Error is to be handled. | |||
* | * | |||
* If you want execution to continue (where possible), then return | * If you want execution to continue (where possible), then return | |||
* true. If you want the Error to be rethrown and propagate out | * true. If you want the Error to be rethrown and propagate out | |||
* of the library, then return false. | * of the library, then return false. | |||
* | * | |||
* Note that it's not always possible to continue execution, so | * Note that it's not always possible to continue execution, so | |||
* the error may be rethrown even if you return true. The ErrorHandle r | * the error may be rethrown even if you return true. The ErrorHandle r | |||
* is still called in this situation as you may want to log that a | * is still called in this situation as you may want to log that a | |||
* particular remote backend server isn't responding, and perhaps | * particular remote backend server isn't responding, and perhaps | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
matchspy.h | matchspy.h | |||
---|---|---|---|---|
/** @file matchspy.h | /** @file matchspy.h | |||
* @brief MatchSpy implementation. | * @brief MatchSpy implementation. | |||
*/ | */ | |||
/* Copyright (C) 2007,2008,2009,2010 Olly Betts | /* Copyright (C) 2007,2008,2009,2010,2012 Olly Betts | |||
* Copyright (C) 2007,2009 Lemur Consulting Ltd | * Copyright (C) 2007,2009 Lemur Consulting Ltd | |||
* Copyright (C) 2010 Richard Boulton | * Copyright (C) 2010 Richard Boulton | |||
* | * | |||
* This program is free software; you can redistribute it and/or modify | * This program is free software; you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | * it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation; either version 2 of the License, or | * the Free Software Foundation; either version 2 of the License, or | |||
* (at your option) any later version. | * (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 | |||
skipping to change at line 89 | skipping to change at line 89 | |||
* | * | |||
* The clone should inherit the configuration of the parent, but need not | * The clone should inherit the configuration of the parent, but need not | |||
* inherit the state. ie, the clone does not need to be passed | * inherit the state. ie, the clone does not need to be passed | |||
* information about the results seen by the parent. | * information about the results seen by the parent. | |||
* | * | |||
* If you don't want to support the remote backend in your match spy, you | * If you don't want to support the remote backend in your match spy, you | |||
* can use the default implementation which simply throws | * can use the default implementation which simply throws | |||
* Xapian::UnimplementedError. | * Xapian::UnimplementedError. | |||
* | * | |||
* 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". If you want to handle the deletion in a special way | |||
* (for example when wrapping the Xapian API for use from another | ||||
* language) then you can define a static <code>operator delete</code> | ||||
* method in your subclass as shown here: | ||||
* http://trac.xapian.org/ticket/554#comment:1 | ||||
*/ | */ | |||
virtual MatchSpy * clone() const; | virtual MatchSpy * clone() const; | |||
/** Return the name of this match spy. | /** Return the name of this match spy. | |||
* | * | |||
* This name is used by the remote backend. It is passed with the | * This name is used by the remote backend. It is passed with the | |||
* 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 yo ur | * Return the full namespace-qualified name of your class here - if yo ur | |||
skipping to change at line 127 | skipping to change at line 131 | |||
/** 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 match spy, you | * If you don't want to support the remote backend in your match spy, you | |||
* can use the default implementation which simply throws | * can use the default implementation which simply throws | |||
* Xapian::UnimplementedError. | * Xapian::UnimplementedError. | |||
* | * | |||
* 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". If you want to handle the deletion in a special way | |||
* (for example when wrapping the Xapian API for use from another | ||||
* language) then you can define a static <code>operator delete</code> | ||||
* method in your subclass as shown here: | ||||
* http://trac.xapian.org/ticket/554#comment:1 | ||||
* | * | |||
* @param s A string containing the serialised results. | * @param s A string containing the serialised results. | |||
* @param context Registry object to use for unserialisation to permit | * @param context Registry object to use for unserialisation to permit | |||
* MatchSpy subclasses with sub-MatchSpy objects to be | * MatchSpy subclasses with sub-MatchSpy objects to be | |||
* implemented. | * implemented. | |||
*/ | */ | |||
virtual MatchSpy * unserialise(const std::string & s, | virtual MatchSpy * unserialise(const std::string & s, | |||
const Registry & context) const; | const Registry & context) const; | |||
/** Serialise the results of this match spy. | /** Serialise the results of this match spy. | |||
End of changes. 3 change blocks. | ||||
3 lines changed or deleted | 11 lines changed or added | |||
postingsource.h | postingsource.h | |||
---|---|---|---|---|
/** @file postingsource.h | /** @file postingsource.h | |||
* @brief External sources of posting information | * @brief External sources of posting information | |||
*/ | */ | |||
/* Copyright (C) 2007,2008,2009,2010,2011 Olly Betts | /* Copyright (C) 2007,2008,2009,2010,2011,2012 Olly Betts | |||
* Copyright (C) 2008,2009 Lemur Consulting Ltd | * Copyright (C) 2008,2009 Lemur Consulting Ltd | |||
* | * | |||
* This program is free software; you can redistribute it and/or modify | * This program is free software; you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | * it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation; either version 2 of the License, or | * the Free Software Foundation; either version 2 of the License, or | |||
* (at your option) any later version. | * (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 247 | skipping to change at line 247 | |||
* init() on the clone before attempting to move the iterator, or read | * init() on the clone before attempting to move the iterator, or read | |||
* the information about the current position of the iterator. | * the information about the current position of the iterator. | |||
* | * | |||
* This may return NULL to indicate that cloning is not supported. In | * This may return NULL to indicate that cloning is not supported. In | |||
* this case, the PostingSource may only be used with a single-databas e | * this case, the PostingSource may only be used with a single-databas e | |||
* search. | * search. | |||
* | * | |||
* The default implementation returns NULL. | * The default implementation returns NULL. | |||
* | * | |||
* 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". If you want to handle the deletion in a special way | |||
* (for example when wrapping the Xapian API for use from another | ||||
* language) then you can define a static <code>operator delete</code> | ||||
* method in your subclass as shown here: | ||||
* http://trac.xapian.org/ticket/554#comment:1 | ||||
*/ | */ | |||
virtual PostingSource * clone() const; | virtual PostingSource * clone() const; | |||
/** Name of the posting source class. | /** Name of the posting source class. | |||
* | * | |||
* This is used when serialising and unserialising posting sources; fo r | * This is used when serialising and unserialising posting sources; fo r | |||
* example, for performing remote searches. | * example, for performing remote searches. | |||
* | * | |||
* If the subclass is in a C++ namespace, the namespace should be incl uded | * If the subclass is in a C++ namespace, the namespace should be incl uded | |||
* in the name, using "::" as a separator. For example, for a | * in the name, using "::" as a separator. For example, for a | |||
skipping to change at line 283 | skipping to change at line 287 | |||
* iteration state. | * iteration state. | |||
* | * | |||
* If you don't want to support the remote backend, you can use the | * If you don't want to support the remote backend, you can use the | |||
* default implementation which simply throws Xapian::UnimplementedErr or. | * 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". If you want to handle the deletion in a special way | |||
* (for example when wrapping the Xapian API for use from another | ||||
* language) then you can define a static <code>operator delete</code> | ||||
* method in your subclass as shown here: | ||||
* http://trac.xapian.org/ticket/554#comment:1 | ||||
* | * | |||
* If you don't want to support the remote backend, you can use the | * If you don't want to support the remote backend, you can use the | |||
* default implementation which simply throws Xapian::UnimplementedErr or. | * 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. | |||
* | * | |||
End of changes. 3 change blocks. | ||||
3 lines changed or deleted | 11 lines changed or added | |||
query.h | query.h | |||
---|---|---|---|---|
/** \file query.h | /** \file query.h | |||
* \brief Classes for representing a query | * \brief Classes for representing a query | |||
*/ | */ | |||
/* Copyright 1999,2000,2001 BrightStation PLC | /* Copyright 1999,2000,2001 BrightStation PLC | |||
* Copyright 2002 Ananova Ltd | * Copyright 2002 Ananova Ltd | |||
* Copyright 2003,2004,2005,2006,2007,2008,2009 Olly Betts | * Copyright 2003,2004,2005,2006,2007,2008,2009 Olly Betts | |||
* Copyright 2006,2007,2008,2009 Lemur Consulting Ltd | * Copyright 2006,2007,2008,2009 Lemur Consulting Ltd | |||
* Copyright 2008 Richard Boulton | ||||
* | * | |||
* 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 115 | skipping to change at line 116 | |||
/** Scale the weight of a subquery by the specified factor. | /** Scale the weight of a subquery by the specified factor. | |||
* | * | |||
* A factor of 0 means this subquery will contribute no weight to | * A factor of 0 means this subquery will contribute no weight to | |||
* the query - it will act as a purely boolean subquery. | * the query - it will act as a purely boolean subquery. | |||
* | * | |||
* If the factor is negative, Xapian::InvalidArgumentError will | * If the factor is negative, Xapian::InvalidArgumentError will | |||
* be thrown. | * be thrown. | |||
*/ | */ | |||
OP_SCALE_WEIGHT, | OP_SCALE_WEIGHT, | |||
/** Select an elite set from the subqueries, and perform | /** Pick the best N subqueries and combine with OP_OR. | |||
* a query with these combined as an OR query. | * | |||
* If you want to implement a feature which finds documents | ||||
* similar to a piece of text, an obvious approach is to build | ||||
an | ||||
* "OR" query from all the terms in the text, and run this quer | ||||
y | ||||
* against a database containing the documents. However such a | ||||
* query can contain a lots of terms and be quite slow to perfo | ||||
rm, | ||||
* yet many of these terms don't contribute usefully to the | ||||
* results. | ||||
* | ||||
* The OP_ELITE_SET operator can be used instead of OP_OR in th | ||||
is | ||||
* situation. OP_ELITE_SET selects the most important ''N'' te | ||||
rms | ||||
* and then acts as an OP_OR query with just these, ignoring an | ||||
y | ||||
* other terms. This will usually return results just as good | ||||
as | ||||
* the full OP_OR query, but much faster. | ||||
* | ||||
* In general, the OP_ELITE_SET operator can be used when you h | ||||
ave | ||||
* a large OR query, but it doesn't matter if the search | ||||
* completely ignores some of the less important terms in the | ||||
* query. | ||||
* | ||||
* The subqueries don't have to be terms, but if they aren't th | ||||
en | ||||
* OP_ELITE_SET will look at the estimated frequencies of the | ||||
* subqueries and so could pick a subset which don't actually | ||||
* match any documents even if the full OR would match some. | ||||
* | ||||
* You can specify a parameter to the query constructor which | ||||
* control the number of terms which OP_ELITE_SET will pick. I | ||||
f | ||||
* not specified, this defaults to 10 (or | ||||
* <code>ceil(sqrt(number_of_subqueries))</code> if there are m | ||||
ore | ||||
* than 100 subqueries, but this rather arbitrary special case | ||||
* will be dropped in 1.3.0). For example, this will pick the | ||||
* best 7 terms: | ||||
* | ||||
* <pre> | ||||
* Xapian::Query query(Xapian::Query::OP_ELITE_SET, subqs.begin | ||||
(), subqs.end(), 7); | ||||
* </pre> | ||||
* | ||||
* If the number of subqueries is less than this threshold, | ||||
* OP_ELITE_SET behaves identically to OP_OR. | ||||
*/ | */ | |||
OP_ELITE_SET, | OP_ELITE_SET, | |||
/** Filter by a greater-than-or-equal test on a document value. */ | /** Filter by a greater-than-or-equal test on a document value. */ | |||
OP_VALUE_GE, | OP_VALUE_GE, | |||
/** Filter by a less-than-or-equal test on a document value. */ | /** Filter by a less-than-or-equal test on a document value. */ | |||
OP_VALUE_LE, | OP_VALUE_LE, | |||
/** Treat a set of queries as synonyms. | /** Treat a set of queries as synonyms. | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 53 lines changed or added | |||
version.h | version.h | |||
---|---|---|---|---|
skipping to change at line 46 | skipping to change at line 46 | |||
#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 | |||
/// The library was compiled with GCC's -fvisibility=hidden option. | /// The library was compiled with GCC's -fvisibility=hidden option. | |||
#define XAPIAN_ENABLE_VISIBILITY | #define XAPIAN_ENABLE_VISIBILITY | |||
/// The version of Xapian as a C string literal. | /// The version of Xapian as a C string literal. | |||
#define XAPIAN_VERSION "1.2.8" | #define XAPIAN_VERSION "1.2.9" | |||
/** The major component of the Xapian version. | /** The major component of the Xapian version. | |||
* E.g. for Xapian 1.0.14 this would be: 1 | * 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. | /** The minor component of the Xapian version. | |||
* E.g. for Xapian 1.0.14 this would be: 0 | * E.g. for Xapian 1.0.14 this would be: 0 | |||
*/ | */ | |||
#define XAPIAN_MINOR_VERSION 2 | #define XAPIAN_MINOR_VERSION 2 | |||
/** The revision component of the Xapian version. | /** The revision component of the Xapian version. | |||
* E.g. for Xapian 1.0.14 this would be: 14 | * E.g. for Xapian 1.0.14 this would be: 14 | |||
*/ | */ | |||
#define XAPIAN_REVISION 8 | #define XAPIAN_REVISION 9 | |||
/// XAPIAN_HAS_BRASS_BACKEND Defined if the brass backend is enabled. | /// XAPIAN_HAS_BRASS_BACKEND Defined if the brass backend is enabled. | |||
#define XAPIAN_HAS_BRASS_BACKEND 1 | #define XAPIAN_HAS_BRASS_BACKEND 1 | |||
/// XAPIAN_HAS_CHERT_BACKEND Defined if the chert backend is enabled. | /// 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. | /// XAPIAN_HAS_FLINT_BACKEND Defined if the flint backend is enabled. | |||
#define XAPIAN_HAS_FLINT_BACKEND 1 | #define XAPIAN_HAS_FLINT_BACKEND 1 | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added | |||
weight.h | weight.h | |||
---|---|---|---|---|
/** @file weight.h | /** @file weight.h | |||
* @brief Weighting scheme API. | * @brief Weighting scheme API. | |||
*/ | */ | |||
/* Copyright (C) 2007,2008,2009,2010,2011 Olly Betts | /* Copyright (C) 2007,2008,2009,2010,2011,2012 Olly Betts | |||
* Copyright (C) 2009 Lemur Consulting Ltd | * Copyright (C) 2009 Lemur Consulting Ltd | |||
* | * | |||
* 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 123 | skipping to change at line 123 | |||
/** Clone this object. | /** Clone this object. | |||
* | * | |||
* This method allocates and returns a copy of the object it is called on. | * 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 | * If your subclass is called FooWeight and has parameters a and b, th en | |||
* you would implement FooWeight::clone() like so: | * you would implement FooWeight::clone() like so: | |||
* | * | |||
* FooWeight * FooWeight::clone() const { return new FooWeight(a, b); } | * FooWeight * FooWeight::clone() const { return new FooWeight(a, b); } | |||
* | * | |||
* 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". If you want to handle the deletion in a special way | |||
* (for example when wrapping the Xapian API for use from another | ||||
* language) then you can define a static <code>operator delete</code> | ||||
* method in your subclass as shown here: | ||||
* http://trac.xapian.org/ticket/554#comment:1 | ||||
*/ | */ | |||
virtual Weight * clone() const = 0; | 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 along with t he | * 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 | |||
skipping to change at line 158 | skipping to change at line 162 | |||
/** 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, you can use the | * If you don't want to support the remote backend, you can use the | |||
* default implementation which simply throws Xapian::UnimplementedErr or. | * default implementation which simply throws Xapian::UnimplementedErr 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". If you want to handle the deletion in a special way | |||
* (for example when wrapping the Xapian API for use from another | ||||
* language) then you can define a static <code>operator delete</code> | ||||
* method in your subclass as shown here: | ||||
* http://trac.xapian.org/ticket/554#comment:1 | ||||
* | * | |||
* @param s A string containing the serialised parameters. | * @param s A string containing the serialised parameters. | |||
*/ | */ | |||
virtual Weight * unserialise(const std::string & s) const; | 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: | |||
* | * | |||
End of changes. 3 change blocks. | ||||
3 lines changed or deleted | 11 lines changed or added | |||