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.0/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.1/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 | |||
queryparser.h | queryparser.h | |||
---|---|---|---|---|
skipping to change at line 91 | skipping to change at line 91 | |||
}; | }; | |||
/// 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(); | |||
/** Check for a valid range of this type. | /** Check for a valid range of this type. | |||
* | * | |||
* If this ValueRangeProcessor recognises BEGIN..END it returns the | * If this ValueRangeProcessor recognises BEGIN..END it returns the | |||
* value number of range filter on. Otherwise it returns | * value number to 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. | |||
*/ | */ | |||
class XAPIAN_VISIBILITY_DEFAULT StringValueRangeProcessor : public ValueRan geProcessor { | class XAPIAN_VISIBILITY_DEFAULT StringValueRangeProcessor : public ValueRan geProcessor { | |||
skipping to change at line 429 | skipping to change at line 429 | |||
* OP_NEAR and OP_PHRASE can also be useful. | * OP_NEAR and OP_PHRASE can also be useful. | |||
* | * | |||
* So for example, 'weather forecast' is parsed as if it were 'weather OR | * So for example, 'weather forecast' is parsed as if it were 'weather OR | |||
* forecast' by default. | * forecast' by default. | |||
*/ | */ | |||
void set_default_op(Query::op default_op); | void set_default_op(Query::op default_op); | |||
/** Get the current default 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. | |||
* | ||||
* The database is used for wildcard expansion (FLAG_WILDCARD and | ||||
* FLAG_PARTIAL), spelling correction (FLAG_SPELLING_CORRECTION), and | ||||
* synonyms (FLAG_SYNONYM, FLAG_AUTO_SYNONYMS, and | ||||
* FLAG_AUTO_MULTIWORD_SYNONYMS). | ||||
*/ | ||||
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 (|) (default FLAG_DEFAULT). | * 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 . | |||
* | * | |||
* @exception If the query string can't be parsed, then | * @exception If the query string can't be parsed, then | |||
* Xapian::QueryParserError is thrown. You can get an Engli sh | * Xapian::QueryParserError is thrown. You can get an Engli sh | |||
* error message to report to the user by catching it and | * error message to report to the user by catching it and | |||
* calling get_msg() on the caught exception. The current | * calling get_msg() on the caught exception. The current | |||
* possible values (in case you want to translate them) are: | * possible values (in case you want to translate them) are: | |||
* | * | |||
* * Unknown range operation | * @li Unknown range operation | |||
* * parse error | * @li parse error | |||
* * Syntax: <expression> AND <expression> | * @li Syntax: <expression> AND <expression> | |||
* * Syntax: <expression> AND NOT <expression> | * @li Syntax: <expression> AND NOT <expression> | |||
* * Syntax: <expression> NOT <expression> | * @li Syntax: <expression> NOT <expression> | |||
* * Syntax: <expression> OR <expression> | * @li Syntax: <expression> OR <expression> | |||
* * Syntax: <expression> XOR <expression> | * @li Syntax: <expression> XOR <expression> | |||
*/ | */ | |||
Query parse_query(const std::string &query_string, | Query parse_query(const std::string &query_string, | |||
unsigned flags = FLAG_DEFAULT, | unsigned flags = FLAG_DEFAULT, | |||
const std::string &default_prefix = std::string()); | const std::string &default_prefix = std::string()); | |||
/** Add a probabilistic term prefix. | /** Add a probabilistic term prefix. | |||
* | * | |||
* For example: | * For example: | |||
* | * | |||
* @code | * @code | |||
skipping to change at line 544 | skipping to change at line 550 | |||
* | * | |||
* 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 | |||
* @param exclusive If true, each document can have at most one value | ||||
of | ||||
* the field, so Xapian should combine multiple values | ||||
* with OP_OR. If false, each document can have multi | ||||
ple | ||||
* values of the field, so Xapian combine them with | ||||
* OP_AND, as we would with filters with different | ||||
* prefixes. [default: true] | ||||
*/ | */ | |||
void add_boolean_prefix(const std::string & field, const std::string &p | void add_boolean_prefix(const std::string &field, const std::string &pr | |||
refix); | efix, | |||
bool exclusive); | ||||
/* FIXME:1.1.3: Merge two versions into one with optional parameter | ||||
* "exclusive", default true. */ | ||||
void add_boolean_prefix(const std::string &field, const std::string &pr | ||||
efix); | ||||
/// Iterate over terms omitted from the query as stopwords. | /// Iterate over terms omitted from the query as stopwords. | |||
TermIterator stoplist_begin() const; | TermIterator stoplist_begin() const; | |||
TermIterator stoplist_end() const { | TermIterator stoplist_end() const { | |||
return TermIterator(NULL); | return TermIterator(NULL); | |||
} | } | |||
/// Iterate over unstemmed forms of the given (stemmed) term used in th e query. | /// Iterate over unstemmed forms of the given (stemmed) term used in th e query. | |||
TermIterator unstem_begin(const std::string &term) const; | TermIterator unstem_begin(const std::string &term) const; | |||
TermIterator unstem_end(const std::string &) const { | TermIterator unstem_end(const std::string &) const { | |||
End of changes. 5 change blocks. | ||||
11 lines changed or deleted | 31 lines changed or added | |||
stem.h | stem.h | |||
---|---|---|---|---|
/** \file stem.h | /** \file stem.h | |||
* \brief stemming algorithms | * \brief stemming algorithms | |||
*/ | */ | |||
/* Copyright (C) 2005,2007 Olly Betts | /* Copyright (C) 2005,2007,2010 Olly Betts | |||
* Copyright (C) 2010 Evgeny Sizikov | ||||
* | * | |||
* 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 31 | skipping to change at line 32 | |||
#ifndef XAPIAN_INCLUDED_STEM_H | #ifndef XAPIAN_INCLUDED_STEM_H | |||
#define XAPIAN_INCLUDED_STEM_H | #define XAPIAN_INCLUDED_STEM_H | |||
#include <xapian/base.h> | #include <xapian/base.h> | |||
#include <xapian/visibility.h> | #include <xapian/visibility.h> | |||
#include <string> | #include <string> | |||
namespace Xapian { | namespace Xapian { | |||
/// Class representing a stemming algorithm implementation. | ||||
struct XAPIAN_VISIBILITY_DEFAULT StemImplementation | ||||
: public Xapian::Internal::RefCntBase | ||||
{ | ||||
/// Virtual destructor. | ||||
virtual ~StemImplementation(); | ||||
/// Stem the specified word. | ||||
virtual std::string operator()(const std::string & word) = 0; | ||||
/// Return a string describing this object. | ||||
virtual std::string get_description() const = 0; | ||||
}; | ||||
/// Class representing a stemming algorithm. | /// Class representing a stemming algorithm. | |||
class XAPIAN_VISIBILITY_DEFAULT Stem { | class XAPIAN_VISIBILITY_DEFAULT Stem { | |||
public: | public: | |||
/// @private @internal Class representing the stemmer internals. | ||||
class Internal; | ||||
/// @private @internal Reference counted internals. | /// @private @internal Reference counted internals. | |||
Xapian::Internal::RefCntPtr<Internal> internal; | Xapian::Internal::RefCntPtr<StemImplementation> internal; | |||
/// Copy constructor. | /// Copy constructor. | |||
Stem(const Stem & o); | Stem(const Stem & o); | |||
/// Assignment. | /// Assignment. | |||
void operator=(const Stem & o); | void operator=(const Stem & o); | |||
/** Construct a Xapian::Stem object which doesn't change terms. | /** Construct a Xapian::Stem object which doesn't change terms. | |||
* | * | |||
* Equivalent to Stem("none"). | * Equivalent to Stem("none"). | |||
skipping to change at line 69 | skipping to change at line 82 | |||
* - none - don't stem terms | * - none - don't stem terms | |||
* - danish (da) | * - danish (da) | |||
* - dutch (nl) | * - dutch (nl) | |||
* - english (en) - Martin Porter's 2002 revision of his stemmer | * - english (en) - Martin Porter's 2002 revision of his stemmer | |||
* - english_lovins (lovins) - Lovin's stemmer | * - english_lovins (lovins) - Lovin's stemmer | |||
* - english_porter (porter) - Porter's stemmer as described in | * - english_porter (porter) - Porter's stemmer as described in | |||
* his 1980 paper | * his 1980 paper | |||
* - finnish (fi) | * - finnish (fi) | |||
* - french (fr) | * - french (fr) | |||
* - german (de) | * - german (de) | |||
* - german2 - Normalises umlauts and ß | ||||
* - hungarian (hu) | ||||
* - italian (it) | * - italian (it) | |||
* - norwegian (no) | * - kraaij_pohlmann - A different Dutch stemmer | |||
* - norwegian (nb, nn, no) | ||||
* - portuguese (pt) | * - portuguese (pt) | |||
* - romanian (ro) | ||||
* - russian (ru) | * - russian (ru) | |||
* - spanish (es) | * - spanish (es) | |||
* - swedish (sv) | * - swedish (sv) | |||
* - turkish (tr) | ||||
* | * | |||
* @exception Xapian::InvalidArgumentError is thrown if | * @exception Xapian::InvalidArgumentError is thrown if | |||
* language isn't recognised. | * language isn't recognised. | |||
*/ | */ | |||
explicit Stem(const std::string &language); | explicit Stem(const std::string &language); | |||
/** Construct a Xapian::Stem object with a user-provided stemming algor | ||||
ithm. | ||||
* | ||||
* You can subclass Xapian::StemImplementation to implement your own | ||||
* stemming algorithm (or to wrap a third-party algorithm) and then wr | ||||
ap | ||||
* your implementation in a Xapian::Stem object to pass to the Xapian | ||||
API. | ||||
* | ||||
* The StemImplementation object is reference counted, and so will be | ||||
* automatically deleted by the Xapian::Stem wrapper when no longer | ||||
* required. | ||||
*/ | ||||
explicit Stem(StemImplementation * p); | ||||
/// Destructor. | /// Destructor. | |||
~Stem(); | ~Stem(); | |||
/** Stem a word. | /** Stem a word. | |||
* | * | |||
* @param word a word to stem. | * @param word a word to stem. | |||
* @return the stem | * @return the stem | |||
*/ | */ | |||
std::string operator()(const std::string &word) const; | std::string operator()(const std::string &word) const; | |||
End of changes. 10 change blocks. | ||||
6 lines changed or deleted | 39 lines changed or added | |||
version.h | version.h | |||
---|---|---|---|---|
/** @file version.h | /** @file version.h | |||
* @brief Define preprocesor symbols for the library version | * @brief Define preprocesor symbols for the library version | |||
*/ | */ | |||
// Copyright (C) 2002,2004,2005,2006,2007,2008,2009 Olly Betts | // Copyright (C) 2002,2004,2005,2006,2007,2008,2009,2010 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 42 | 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 | |||
/// The library was compiled with GCC's -fvisibility=hidden option. | ||||
#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.0" | #define XAPIAN_VERSION "1.2.1" | |||
/** 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 0 | #define XAPIAN_REVISION 1 | |||
/// 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. 4 change blocks. | ||||
3 lines changed or deleted | 6 lines changed or added | |||
visibility.h | visibility.h | |||
---|---|---|---|---|
/** @file visibility.h | /** @file visibility.h | |||
* @brief Define XAPIAN_VISIBILITY macro. | * @brief Define XAPIAN_VISIBILITY macro. | |||
*/ | */ | |||
// Copyright (C) 2007 Olly Betts | // Copyright (C) 2007,2010 Olly Betts | |||
// | // | |||
// 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 | |||
// GNU General Public License for more details. | // GNU General Public License for more details. | |||
// | // | |||
// You should have received a copy of the GNU General Public License | // You should have received a copy of the GNU General Public License | |||
// along with this program; if not, write to the Free Software | // along with this program; if not, write to the Free Software | |||
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 US A | // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 US A | |||
#ifndef XAPIAN_INCLUDED_VISIBILITY_H | #ifndef XAPIAN_INCLUDED_VISIBILITY_H | |||
#define XAPIAN_INCLUDED_VISIBILITY_H | #define XAPIAN_INCLUDED_VISIBILITY_H | |||
#if defined __GNUC__ && (__GNUC__ >= 4) && !defined XAPIAN_DISABLE_VISIBILI | #include "xapian/version.h" | |||
TY | #if defined XAPIAN_ENABLE_VISIBILITY && defined __GNUC__ && (__GNUC__ >= 4) | |||
// GCC 3.4 has visibility support, but it's a bit buggy so we require 4.0. | // GCC 3.4 has visibility support, but it's a bit buggy so we require 4.0. | |||
# define XAPIAN_VISIBILITY_DEFAULT __attribute__((visibility("default"))) | # define XAPIAN_VISIBILITY_DEFAULT __attribute__((visibility("default"))) | |||
#else | #else | |||
# define XAPIAN_VISIBILITY_DEFAULT | # define XAPIAN_VISIBILITY_DEFAULT | |||
#endif | #endif | |||
#endif | #endif | |||
End of changes. 2 change blocks. | ||||
3 lines changed or deleted | 3 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 Olly Betts | /* Copyright (C) 2007,2008,2009,2010 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 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 &); | |||
/// Don't allow copying. | ||||
Weight(const Weight &); | ||||
/// 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 251 | skipping to change at line 254 | |||
/** @private @internal Return true if the WDF is needed. | /** @private @internal Return true if the WDF is needed. | |||
* | * | |||
* If this method returns true, then the WDF will be fetched and passe d to | * If this method returns true, then the WDF will be fetched and passe d to | |||
* @a get_sumpart(). Otherwise 0 may be passed for the wdf. | * @a get_sumpart(). Otherwise 0 may be passed for the wdf. | |||
*/ | */ | |||
bool get_sumpart_needs_wdf_() const { | bool get_sumpart_needs_wdf_() const { | |||
return stats_needed & WDF; | return stats_needed & WDF; | |||
} | } | |||
protected: | protected: | |||
/// Only allow subclasses to copy us. | ||||
Weight(const Weight &); | ||||
/// Default constructor, needed by subclass constructors. | /// Default constructor, needed by subclass constructors. | |||
Weight() : stats_needed() { } | Weight() : stats_needed() { } | |||
/// The number of documents in the collection. | /// The number of documents in the collection. | |||
Xapian::doccount get_collection_size() const { return collection_size_; } | Xapian::doccount get_collection_size() const { return collection_size_; } | |||
/// The number of documents marked as relevant. | /// The number of documents marked as relevant. | |||
Xapian::doccount get_rset_size() const { return rset_size_; } | Xapian::doccount get_rset_size() const { return rset_size_; } | |||
/// The average length of a document in the collection. | /// The average length of a document in the collection. | |||
End of changes. 3 change blocks. | ||||
4 lines changed or deleted | 4 lines changed or added | |||