database.h | database.h | |||
---|---|---|---|---|
/** \file database.h | /** \file database.h | |||
* \brief API for working with Xapian databases | * \brief API for working with Xapian databases | |||
*/ | */ | |||
/* Copyright 1999,2000,2001 BrightStation PLC | /* Copyright 1999,2000,2001 BrightStation PLC | |||
* Copyright 2002 Ananova Ltd | * Copyright 2002 Ananova Ltd | |||
* Copyright 2002,2003,2004,2005,2006,2007,2008 Olly Betts | * Copyright 2002,2003,2004,2005,2006,2007,2008,2009 Olly Betts | |||
* Copyright 2006,2008 Lemur Consulting Ltd | * Copyright 2006,2008 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 362 | skipping to change at line 362 | |||
* exist (but only the leaf directory, not recursively). | * exist (but only the leaf directory, not recursively). | |||
* | * | |||
* @param path directory that the database is stored in. | * @param path directory that the database is stored in. | |||
* @param action one of: | * @param action one of: | |||
* - Xapian::DB_CREATE_OR_OPEN open for read/write; create if no db | * - Xapian::DB_CREATE_OR_OPEN open for read/write; create if no db | |||
* exists | * exists | |||
* - Xapian::DB_CREATE create new database; fail if db exists | * - Xapian::DB_CREATE create new database; fail if db exists | |||
* - Xapian::DB_CREATE_OR_OVERWRITE overwrite existing db; create i f | * - Xapian::DB_CREATE_OR_OVERWRITE overwrite existing db; create i f | |||
* none exists | * none exists | |||
* - Xapian::DB_OPEN open for read/write; fail if no db exists | * - Xapian::DB_OPEN open for read/write; fail if no db exists | |||
* | ||||
* @exception Xapian::DatabaseCorruptError will be thrown if the | ||||
* database is in a corrupt state. | ||||
* | ||||
* @exception Xapian::DatabaseLockError will be thrown if a lock | ||||
* couldn't be acquired on the database. | ||||
*/ | */ | |||
WritableDatabase(const std::string &path, int action); | WritableDatabase(const std::string &path, int action); | |||
/** @private @internal Create an WritableDatabase given its internal s. | /** @private @internal Create an WritableDatabase given its internal s. | |||
*/ | */ | |||
explicit WritableDatabase(Database::Internal *internal); | explicit WritableDatabase(Database::Internal *internal); | |||
/** Copying is allowed. The internals are reference counted, so | /** Copying is allowed. The internals are reference counted, so | |||
* copying is cheap. | * copying is cheap. | |||
*/ | */ | |||
skipping to change at line 419 | skipping to change at line 425 | |||
* 10000 documents added, deleted, or modified. This value is rath er | * 10000 documents added, deleted, or modified. This value is rath er | |||
* conservative, and if you have a machine with plenty of memory, | * conservative, and if you have a machine with plenty of memory, | |||
* you can improve indexing throughput dramatically by setting | * you can improve indexing throughput dramatically by setting | |||
* XAPIAN_FLUSH_THRESHOLD in the environment to a larger value. | * XAPIAN_FLUSH_THRESHOLD in the environment to a larger value. | |||
* | * | |||
* @exception Xapian::DatabaseError will be thrown if a problem occ urs | * @exception Xapian::DatabaseError will be thrown if a problem occ urs | |||
* while modifying the database. | * while modifying the database. | |||
* | * | |||
* @exception Xapian::DatabaseCorruptError will be thrown if the | * @exception Xapian::DatabaseCorruptError will be thrown if the | |||
* database is in a corrupt state. | * database is in a corrupt state. | |||
* | ||||
* @exception Xapian::DatabaseLockError will be thrown if a lock | ||||
* couldn't be acquired on the database. | ||||
*/ | */ | |||
void flush(); | void flush(); | |||
/** Begin a transaction. | /** Begin a transaction. | |||
* | * | |||
* In Xapian a transaction is a group of modifications to the datab ase | * In Xapian a transaction is a group of modifications to the datab ase | |||
* which are linked such that either all will be applied | * which are linked such that either all will be applied | |||
* simultaneously or none will be applied at all. Even in the case of | * simultaneously or none will be applied at all. Even in the case of | |||
* a power failure, this characteristic should be preserved (as lon g | * a power failure, this characteristic should be preserved (as lon g | |||
* as the filesystem isn't corrupted, etc). | * as the filesystem isn't corrupted, etc). | |||
End of changes. 3 change blocks. | ||||
4 lines changed or deleted | 7 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 Olly Betts | * Copyright 2003,2004,2005,2006,2007,2009 Olly Betts | |||
* Copyright 2006,2007,2008 Lemur Consulting Ltd | * Copyright 2006,2007,2008 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 405 | skipping to change at line 405 | |||
/** Construct a value greater-than-or-equal query on a document valu e. | /** Construct a value greater-than-or-equal query on a document valu e. | |||
*/ | */ | |||
Internal(op_t op_, Xapian::valueno valno, const std::string &value); | Internal(op_t op_, Xapian::valueno valno, const std::string &value); | |||
/** Destructor. */ | /** Destructor. */ | |||
~Internal(); | ~Internal(); | |||
static Xapian::Query::Internal * unserialise(const std::string &s); | static Xapian::Query::Internal * unserialise(const std::string &s); | |||
/** 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. | ||||
* | ||||
* subq is owned by the object this is called on after the call. | ||||
*/ | ||||
void add_subquery_nocopy(Query::Internal * subq); | ||||
void set_dbl_parameter(double dbl_parameter_); | void set_dbl_parameter(double dbl_parameter_); | |||
double get_dbl_parameter() const; | double get_dbl_parameter() const; | |||
/** Finish off the construction. | /** Finish off the construction. | |||
*/ | */ | |||
Query::Internal * end_construction(); | Query::Internal * end_construction(); | |||
/** Return a string in an easily parsed form | /** Return a string in an easily parsed form | |||
* which contains all the information in a query. | * which contains all the information in a query. | |||
End of changes. 3 change blocks. | ||||
3 lines changed or deleted | 8 lines changed or added | |||
queryparser.h | queryparser.h | |||
---|---|---|---|---|
/** \file queryparser.h | /** \file queryparser.h | |||
* \brief parsing a user query string to build a Xapian::Query object | * \brief parsing a user query string to build a Xapian::Query object | |||
*/ | */ | |||
/* 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 321 | skipping to change at line 321 | |||
* | * | |||
* NB: You must also call set_database() for this to work. | * NB: You must also call set_database() for this to work. | |||
*/ | */ | |||
FLAG_AUTO_SYNONYMS = 512, | FLAG_AUTO_SYNONYMS = 512, | |||
/** Enable automatic use of synonyms for single terms and groups of | /** Enable automatic use of synonyms for single terms and groups of | |||
* terms. | * terms. | |||
* | * | |||
* NB: You must also call set_database() for this to work. | * NB: You must also call set_database() for this to work. | |||
*/ | */ | |||
FLAG_AUTO_MULTIWORD_SYNONYMS = 1024 | FLAG_AUTO_SYNONYMS | FLAG_AUTO_MULTIWORD_SYNONYMS = 1024 | FLAG_AUTO_SYNONYMS, | |||
/** The default flags. | ||||
* | ||||
* Used if you don't explicitly pass any to @a parse_query(). | ||||
* | ||||
* Added in Xapian 1.0.11. | ||||
*/ | ||||
FLAG_DEFAULT = FLAG_PHRASE|FLAG_BOOLEAN|FLAG_LOVEHATE | ||||
} feature_flag; | } feature_flag; | |||
typedef enum { STEM_NONE, STEM_SOME, STEM_ALL } stem_strategy; | typedef enum { STEM_NONE, STEM_SOME, STEM_ALL } stem_strategy; | |||
/// Copy constructor. | /// Copy constructor. | |||
QueryParser(const QueryParser & o); | QueryParser(const QueryParser & o); | |||
/// Assignment. | /// Assignment. | |||
QueryParser & operator=(const QueryParser & o); | QueryParser & operator=(const QueryParser & o); | |||
skipping to change at line 384 | skipping to change at line 392 | |||
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 | |||
* multiple values with bitwise-or (|). | * multiple values with bitwise-or (|) (default FLAG_DEFAULT). | |||
* @param default_prefix The default term prefix to use (default none) . | * @param default_prefix The default term prefix to use (default none) . | |||
* For example, you can pass "A" when parsing an "Author" field . | * For example, you can pass "A" when parsing an "Author" field . | |||
*/ | */ | |||
Query parse_query(const std::string &query_string, | Query parse_query(const std::string &query_string, | |||
unsigned flags = FLAG_PHRASE|FLAG_BOOLEAN|FLAG_LOVEHAT E, | unsigned flags = FLAG_PHRASE|FLAG_BOOLEAN|FLAG_LOVEHAT E, | |||
const std::string &default_prefix = ""); | const std::string &default_prefix = ""); | |||
/** Add a probabilistic term prefix. | /** Add a probabilistic term prefix. | |||
* | * | |||
* For example: | * For example: | |||
End of changes. 3 change blocks. | ||||
3 lines changed or deleted | 11 lines changed or added | |||
version.h | version.h | |||
---|---|---|---|---|
skipping to change at line 39 | skipping to change at line 39 | |||
#error The Xapian library was built with g++ 4.5.0 | #error The Xapian library was built with g++ 4.5.0 | |||
#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 | |||
#define XAPIAN_VERSION "1.0.10" | #define XAPIAN_VERSION "1.0.11" | |||
#define XAPIAN_MAJOR_VERSION 1 | #define XAPIAN_MAJOR_VERSION 1 | |||
#define XAPIAN_MINOR_VERSION 0 | #define XAPIAN_MINOR_VERSION 0 | |||
#define XAPIAN_REVISION 10 | #define XAPIAN_REVISION 11 | |||
#define XAPIAN_HAS_FLINT_BACKEND 1 | #define XAPIAN_HAS_FLINT_BACKEND 1 | |||
#define XAPIAN_HAS_QUARTZ_BACKEND 1 | #define XAPIAN_HAS_QUARTZ_BACKEND 1 | |||
#define XAPIAN_HAS_INMEMORY_BACKEND 1 | #define XAPIAN_HAS_INMEMORY_BACKEND 1 | |||
#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. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added | |||