base.h   base.h 
skipping to change at line 118 skipping to change at line 118
if (dest) ++dest->ref_count; if (dest) ++dest->ref_count;
} }
template <class T> template <class T>
inline void RefCntPtr<T>::operator=(const RefCntPtr &other) { inline void RefCntPtr<T>::operator=(const RefCntPtr &other) {
operator=(other.dest); operator=(other.dest);
} }
template <class T> template <class T>
inline void RefCntPtr<T>::operator=(T *dest_) { inline void RefCntPtr<T>::operator=(T *dest_) {
// check if we're assigning a pointer to itself
if (dest == dest_) return;
// copy the new dest in before we delete the old to avoid a small // copy the new dest in before we delete the old to avoid a small
// window in which dest points to a deleted object // window in which dest points to a deleted object
// FIXME: if pointer assignment isn't atomic, we ought to use locking.. . // FIXME: if pointer assignment isn't atomic, we ought to use locking.. .
T *old_dest = dest; T *old_dest = dest;
dest = dest_; dest = dest_;
// Increment the new before we decrement the old so that if dest == des
t_
// we don't delete the pointer.
//
// Note that if dest == dest_, either both are NULL (in which case we
// aren't reference counting), or we're already reference counting the
// object, in which case ref_count is non-zero at this point. So we
// won't accidentally delete an untracked object by doing this.
if (dest) ++dest->ref_count; if (dest) ++dest->ref_count;
if (old_dest && --old_dest->ref_count == 0) delete old_dest; if (old_dest && --old_dest->ref_count == 0) delete old_dest;
} }
template <class T> template <class T>
inline RefCntPtr<T>::~RefCntPtr() inline RefCntPtr<T>::~RefCntPtr()
{ {
if (dest && --dest->ref_count == 0) { if (dest && --dest->ref_count == 0) {
// zero before we delete to avoid a small window in which dest point s // zero before we delete to avoid a small window in which dest point s
// to a deleted object // to a deleted object
 End of changes. 2 change blocks. 
3 lines changed or deleted 8 lines changed or added


 database.h   database.h 
skipping to change at line 134 skipping to change at line 134
* 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 he * This closes the database and releases all file handles held by t he
* database. * database.
* *
* This is a permanent close of the database: calling reopen() afte * This cannot be undone - in particular, calling reopen() after
r * closing a database will not reopen it, but will instead throw a
* closing a database will not reopen it, and will raise an excepti * Xapian::DatabaseError exception.
on.
*
* Calling close() on a database which is already closed has no eff
ect
* (and doesn't raise an exception).
* *
* After this call, calls made to methods of the database (other th * Calling close() again on a database which has already been close
an d
* close() or the destructor), or to objects associated with the * has no effect (and doesn't raise an exception).
* database will behave in one of the following ways (but which
* behaviour happens may vary between releases, and between databas
e
* backends):
* *
* - raise a Xapian::DatabaseError indicating that the database is * After close() has been called, calls to other methods of the
* closed. * database, and to methods of other objects associated with the
* 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
* been closed (by using cached data). * been closed (this can only happen if all the required data is
* cached)
* *
* To summarise - you should not rely on the exception being raised * - raise a Xapian::DatabaseError exception indicating that the
, * database is closed.
* or the normal result being available, but if you do get a result *
, * The reason for this behaviour is that otherwise we'd have to che
* it will be correct. ck
* that the database is still open on every method call on every
* object associated with a Database, when in many cases they are
* working on data which has already been loaded and so they are ab
le
* to just behave correctly.
*/ */
virtual void close(); virtual void close();
/// Return a string describing this object. /// Return a string describing this object.
virtual std::string get_description() const; virtual std::string get_description() const;
/** An iterator pointing to the start of the postlist /** An iterator pointing to the start of the postlist
* for a given term. * for a given term.
* *
* If the term name is the empty string, the iterator returned * If the term name is the empty string, the iterator returned
* will list all the documents in the database. Such an iterator * will list all the documents in the database. Such an iterator
* will always return a WDF value of 1, since there is no obvious * will always return a WDF value of 1, since there is no obvious
* meaning for this quantity in this case. * meaning for this quantity in this case.
*/ */
PostingIterator postlist_begin(const std::string &tname) const; PostingIterator postlist_begin(const std::string &tname) const;
/** Corresponding end iterator to postlist_begin(). /** Corresponding end iterator to postlist_begin().
*/ */
PostingIterator postlist_end(const std::string &) const { PostingIterator postlist_end(const std::string &) const {
return PostingIterator(NULL); return PostingIterator();
} }
/** An iterator pointing to the start of the termlist /** An iterator pointing to the start of the termlist
* for a given document. * for a given document.
*/ */
TermIterator termlist_begin(Xapian::docid did) const; TermIterator termlist_begin(Xapian::docid did) const;
/** Corresponding end iterator to termlist_begin(). /** Corresponding end iterator to termlist_begin().
*/ */
TermIterator termlist_end(Xapian::docid) const { TermIterator termlist_end(Xapian::docid) const {
return TermIterator(NULL); return TermIterator();
} }
/** Does this database have any positional information? */ /** Does this database have any positional information? */
bool has_positions() const; bool has_positions() const;
/** An iterator pointing to the start of the position list /** An iterator pointing to the start of the position list
* for a given term in a given document. * for a given term in a given document.
*/ */
PositionIterator positionlist_begin(Xapian::docid did, const std::st ring &tname) const; PositionIterator positionlist_begin(Xapian::docid did, const std::st ring &tname) const;
/** Corresponding end iterator to positionlist_begin(). /** Corresponding end iterator to positionlist_begin().
*/ */
PositionIterator positionlist_end(Xapian::docid, const std::string & ) const { PositionIterator positionlist_end(Xapian::docid, const std::string & ) const {
return PositionIterator(NULL); return PositionIterator();
} }
/** An iterator which runs across all terms in the database. /** An iterator which runs across all terms in the database.
*/ */
TermIterator allterms_begin() const; TermIterator allterms_begin() const;
/** Corresponding end iterator to allterms_begin(). /** Corresponding end iterator to allterms_begin().
*/ */
TermIterator allterms_end() const { TermIterator allterms_end() const {
return TermIterator(NULL); return TermIterator();
} }
/** An iterator which runs across all terms with a given prefix. /** An iterator which runs across all terms with a given prefix.
* *
* This is functionally similar to getting an iterator with * This is functionally similar to getting an iterator with
* allterms_begin() and then calling skip_to(prefix) on that iterat or * allterms_begin() and then calling skip_to(prefix) on that iterat or
* to move to the start of the prefix, but is more convenient (beca use * to move to the start of the prefix, but is more convenient (beca use
* it detects the end of the prefixed terms), and may be more * it detects the end of the prefixed terms), and may be more
* efficient than simply calling skip_to() after opening the iterat or, * efficient than simply calling skip_to() after opening the iterat or,
* particularly for remote databases. * particularly for remote databases.
* *
* @param prefix The prefix to restrict the returned terms to. * @param prefix The prefix to restrict the returned terms to.
*/ */
TermIterator allterms_begin(const std::string & prefix) const; TermIterator allterms_begin(const std::string & prefix) const;
/** Corresponding end iterator to allterms_begin(prefix). /** Corresponding end iterator to allterms_begin(prefix).
*/ */
TermIterator allterms_end(const std::string &) const { TermIterator allterms_end(const std::string &) const {
return TermIterator(NULL); return TermIterator();
} }
/// Get the number of documents in the database. /// Get the number of documents in the database.
Xapian::doccount get_doccount() const; Xapian::doccount get_doccount() const;
/// Get the highest document id which has been used in the database. /// Get the highest document id which has been used in the database.
Xapian::docid get_lastdocid() const; Xapian::docid get_lastdocid() const;
/// Get the average length of the documents in the database. /// Get the average length of the documents in the database.
Xapian::doclength get_avlength() const; Xapian::doclength get_avlength() const;
skipping to change at line 366 skipping to change at line 368
* *
* This returns all the words which are considered as targets for t he * This returns all the words which are considered as targets for t he
* spelling correction algorithm. The frequency of each word is * spelling correction algorithm. The frequency of each word is
* available as the term frequency of each entry in the returned * available as the term frequency of each entry in the returned
* iterator. * iterator.
*/ */
Xapian::TermIterator spellings_begin() const; Xapian::TermIterator spellings_begin() const;
/// Corresponding end iterator to spellings_begin(). /// Corresponding end iterator to spellings_begin().
Xapian::TermIterator spellings_end() const { Xapian::TermIterator spellings_end() const {
return Xapian::TermIterator(NULL); return Xapian::TermIterator();
} }
/** An iterator which returns all the synonyms for a given term. /** An iterator which returns all the synonyms for a given term.
* *
* @param term The term to return synonyms for. * @param term The term to return synonyms for.
*/ */
Xapian::TermIterator synonyms_begin(const std::string &term) const; Xapian::TermIterator synonyms_begin(const std::string &term) const;
/// Corresponding end iterator to synonyms_begin(term). /// Corresponding end iterator to synonyms_begin(term).
Xapian::TermIterator synonyms_end(const std::string &) const { Xapian::TermIterator synonyms_end(const std::string &) const {
return Xapian::TermIterator(NULL); return Xapian::TermIterator();
} }
/** An iterator which returns all terms which have synonyms. /** An iterator which returns all terms which have synonyms.
* *
* @param prefix If non-empty, only terms with this prefix are * @param prefix If non-empty, only terms with this prefix are
* returned. * returned.
*/ */
Xapian::TermIterator synonym_keys_begin(const std::string &prefix = std::string()) const; Xapian::TermIterator synonym_keys_begin(const std::string &prefix = std::string()) const;
/// Corresponding end iterator to synonym_keys_begin(prefix). /// Corresponding end iterator to synonym_keys_begin(prefix).
Xapian::TermIterator synonym_keys_end(const std::string & = std::str ing()) const { Xapian::TermIterator synonym_keys_end(const std::string & = std::str ing()) const {
return Xapian::TermIterator(NULL); return Xapian::TermIterator();
} }
/** Get the user-specified metadata associated with a given key. /** Get the user-specified metadata associated with a given key.
* *
* User-specified metadata allows you to store arbitrary informatio n * User-specified metadata allows you to store arbitrary informatio n
* in the form of (key,tag) pairs. See @a * in the form of (key,tag) pairs. See @a
* WritableDatabase::set_metadata() for more information. * WritableDatabase::set_metadata() for more information.
* *
* When invoked on a Xapian::Database object representing multiple * When invoked on a Xapian::Database object representing multiple
* databases, currently only the metadata for the first is consider ed * databases, currently only the metadata for the first is consider ed
skipping to change at line 440 skipping to change at line 442
* *
* @exception Xapian::UnimplementedError will be thrown if the * @exception Xapian::UnimplementedError will be thrown if the
* backend implements user-specified metadata, but * backend implements user-specified metadata, but
* doesn't implement iterating its keys (curren tly * doesn't implement iterating its keys (curren tly
* this happens for the InMemory backend). * this happens for the InMemory backend).
*/ */
Xapian::TermIterator metadata_keys_begin(const std::string &prefix = std::string()) const; Xapian::TermIterator metadata_keys_begin(const std::string &prefix = std::string()) const;
/// Corresponding end iterator to metadata_keys_begin(). /// Corresponding end iterator to metadata_keys_begin().
Xapian::TermIterator metadata_keys_end(const std::string & = std::st ring()) const { Xapian::TermIterator metadata_keys_end(const std::string & = std::st ring()) const {
return Xapian::TermIterator(NULL); return Xapian::TermIterator();
} }
/** Get a UUID for the database. /** Get a UUID for the database.
* *
* The UUID will persist for the lifetime of the database. * The UUID will persist for the lifetime of the database.
* *
* Replicas (eg, made with the replication protocol, or by copying all * Replicas (eg, made with the replication protocol, or by copying all
* the database files) will have the same UUID. However, copies (m ade * the database files) will have the same UUID. However, copies (m ade
* with copydatabase, or xapian-compact) will have different UUIDs. * with copydatabase, or xapian-compact) will have different UUIDs.
* *
 End of changes. 14 change blocks. 
32 lines changed or deleted 30 lines changed or added


 document.h   document.h 
skipping to change at line 209 skipping to change at line 209
/** The length of the termlist - i.e. the number of different terms /** The length of the termlist - i.e. the number of different terms
* which index this document. * which index this document.
*/ */
Xapian::termcount termlist_count() const; Xapian::termcount termlist_count() const;
/// Iterator for the terms in this document. /// Iterator for the terms in this document.
TermIterator termlist_begin() const; TermIterator termlist_begin() const;
/// Equivalent end iterator for termlist_begin(). /// Equivalent end iterator for termlist_begin().
TermIterator termlist_end() const { TermIterator termlist_end() const {
return TermIterator(NULL); return TermIterator();
} }
/// Count the values in this document. /// Count the values in this document.
Xapian::termcount values_count() const; Xapian::termcount values_count() const;
/// Iterator for the values in this document. /// Iterator for the values in this document.
ValueIterator values_begin() const; ValueIterator values_begin() const;
/// Equivalent end iterator for values_begin(). /// Equivalent end iterator for values_begin().
ValueIteratorEnd_ values_end() const { ValueIteratorEnd_ values_end() const {
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 enquire.h   enquire.h 
skipping to change at line 671 skipping to change at line 671
* @param database Specification of the database or databases to * @param database Specification of the database or databases to
* use. * use.
* @param errorhandler_ A pointer to the error handler to use. * @param errorhandler_ A pointer to the error handler to use.
* Ownership of the object pointed to is not assumed by the * Ownership of the object pointed to is not assumed by the
* Xapian::Enquire object - the user should delete the * Xapian::Enquire object - the user should delete the
* Xapian::ErrorHandler object after the Xapian::Enquire obj ect * Xapian::ErrorHandler object after the Xapian::Enquire obj ect
* is deleted. To use no error handler, this parameter * is deleted. To use no error handler, this parameter
* should be 0. * should be 0.
* *
* @exception Xapian::InvalidArgumentError will be thrown if an * @exception Xapian::InvalidArgumentError will be thrown if an
* initialised Database object is supplied. * empty Database object is supplied.
*/ */
explicit Enquire(const Database &database, ErrorHandler * errorhandl er_ = 0); explicit Enquire(const Database &database, ErrorHandler * errorhandl er_ = 0);
/** Close the Xapian::Enquire object. /** Close the Xapian::Enquire object.
*/ */
~Enquire(); ~Enquire();
/** Set the query to run. /** Set the query to run.
* *
* @param query the new query to run. * @param query the new query to run.
skipping to change at line 1103 skipping to change at line 1103
* even if they do in the query. * even if they do in the query.
* *
* @exception Xapian::InvalidArgumentError See class documentation . * @exception Xapian::InvalidArgumentError See class documentation .
* @exception Xapian::DocNotFoundError The document specified * @exception Xapian::DocNotFoundError The document specified
* could not be found in the database. * could not be found in the database.
*/ */
TermIterator get_matching_terms_begin(Xapian::docid did) const; TermIterator get_matching_terms_begin(Xapian::docid did) const;
/** End iterator corresponding to get_matching_terms_begin() */ /** End iterator corresponding to get_matching_terms_begin() */
TermIterator get_matching_terms_end(Xapian::docid /*did*/) const { TermIterator get_matching_terms_end(Xapian::docid /*did*/) const {
return TermIterator(NULL); return TermIterator();
} }
/** Get terms which match a given document, by match set item. /** Get terms which match a given document, by match set item.
* *
* This method returns the terms in the current query which match * This method returns the terms in the current query which match
* the given document. * the given document.
* *
* If the underlying database has suitable support, using this call * If the underlying database has suitable support, using this call
* (rather than passing a Xapian::docid) will enable the system to * (rather than passing a Xapian::docid) will enable the system to
* ensure that the correct data is returned, and that the document * ensure that the correct data is returned, and that the document
skipping to change at line 1132 skipping to change at line 1132
* even if they do in the query. * even if they do in the query.
* *
* @exception Xapian::InvalidArgumentError See class documentation . * @exception Xapian::InvalidArgumentError See class documentation .
* @exception Xapian::DocNotFoundError The document specified * @exception Xapian::DocNotFoundError The document specified
* could not be found in the database. * could not be found in the database.
*/ */
TermIterator get_matching_terms_begin(const MSetIterator &it) const; TermIterator get_matching_terms_begin(const MSetIterator &it) const;
/** End iterator corresponding to get_matching_terms_begin() */ /** End iterator corresponding to get_matching_terms_begin() */
TermIterator get_matching_terms_end(const MSetIterator &/*it*/) cons t { TermIterator get_matching_terms_end(const MSetIterator &/*it*/) cons t {
return TermIterator(NULL); return TermIterator();
} }
/// Return a string describing this object. /// Return a string describing this object.
std::string get_description() const; std::string get_description() const;
}; };
// Deprecated forms: // Deprecated forms:
inline void inline void
Enquire::set_sort_by_value(Xapian::valueno sort_key) Enquire::set_sort_by_value(Xapian::valueno sort_key)
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 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.6/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.7/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


 matchspy.h   matchspy.h 
skipping to change at line 213 skipping to change at line 213
* *
* Items will be returned in ascending alphabetical order. * Items will be returned in ascending alphabetical order.
* *
* During the iteration, the frequency of the current value can be * During the iteration, the frequency of the current value can be
* obtained with the get_termfreq() method on the iterator. * obtained with the get_termfreq() method on the iterator.
*/ */
TermIterator values_begin() const; TermIterator values_begin() const;
/** End iterator corresponding to values_begin() */ /** End iterator corresponding to values_begin() */
TermIterator values_end() const { TermIterator values_end() const {
return TermIterator(NULL); return TermIterator();
} }
/** Get an iterator over the most frequent values seen in the slot. /** Get an iterator over the most frequent values seen in the slot.
* *
* Items will be returned in descending order of frequency. Values wi th * Items will be returned in descending order of frequency. Values wi th
* the same frequency will be returned in ascending alphabetical order . * the same frequency will be returned in ascending alphabetical order .
* *
* During the iteration, the frequency of the current value can be * During the iteration, the frequency of the current value can be
* obtained with the get_termfreq() method on the iterator. * obtained with the get_termfreq() method on the iterator.
* *
* @param maxvalues The maximum number of values to return. * @param maxvalues The maximum number of values to return.
*/ */
TermIterator top_values_begin(size_t maxvalues) const; TermIterator top_values_begin(size_t maxvalues) const;
/** End iterator corresponding to top_values_begin() */ /** End iterator corresponding to top_values_begin() */
TermIterator top_values_end(size_t) const { TermIterator top_values_end(size_t) const {
return TermIterator(NULL); return TermIterator();
} }
/** Implementation of virtual operator(). /** Implementation of virtual operator().
* *
* This implementation tallies values for a matching document. * This implementation tallies values for a matching document.
*/ */
void operator()(const Xapian::Document &doc, Xapian::weight wt); void operator()(const Xapian::Document &doc, Xapian::weight wt);
virtual MatchSpy * clone() const; virtual MatchSpy * clone() const;
virtual std::string name() const; virtual std::string name() const;
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 postingiterator.h   postingiterator.h 
skipping to change at line 117 skipping to change at line 117
/** Return PositionIterator pointing to start of positionlist for /** Return PositionIterator pointing to start of positionlist for
* current document. * current document.
*/ */
PositionIterator positionlist_begin() const; PositionIterator positionlist_begin() const;
/** Return PositionIterator pointing to end of positionlist for /** Return PositionIterator pointing to end of positionlist for
* current document. * current document.
*/ */
PositionIterator positionlist_end() const { PositionIterator positionlist_end() const {
return PositionIterator(NULL); return PositionIterator();
} }
// Don't expose these methods here. A container iterator doesn't // Don't expose these methods here. A container iterator doesn't
// provide a method to find the size of the container... // provide a method to find the size of the container...
// Xapian::doccount get_termfreq() const; // Xapian::doccount get_termfreq() const;
// Xapian::termcount get_collection_freq() const; // Xapian::termcount get_collection_freq() const;
/// Return a string describing this object. /// Return a string describing this object.
std::string get_description() const; std::string get_description() const;
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 postingsource.h   postingsource.h 
skipping to change at line 505 skipping to change at line 505
* *
* @param slot_ The value slot to read values from. * @param slot_ The value slot to read values from.
*/ */
ValueMapPostingSource(Xapian::valueno slot_); ValueMapPostingSource(Xapian::valueno slot_);
/** Add a mapping. /** Add a mapping.
* *
* @param key The key looked up from the value slot. * @param key The key looked up from the value slot.
* @param weight The weight to give this key. * @param weight The weight to give this key.
*/ */
void add_mapping(const std::string &key, double weight); void add_mapping(const std::string &key, double wt);
/** Clear all mappings. */ /** Clear all mappings. */
void clear_mappings(); void clear_mappings();
/** Set a default weight for document values not in the map. */ /** Set a default weight for document values not in the map. */
void set_default_weight(double wt); void set_default_weight(double wt);
Xapian::weight get_weight() const; Xapian::weight get_weight() const;
ValueMapPostingSource * clone() const; ValueMapPostingSource * clone() const;
std::string name() const; std::string name() const;
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 query.h   query.h 
skipping to change at line 262 skipping to change at line 262
* in order of termpos. If multiple terms have the same term * in order of termpos. If multiple terms have the same term
* position, their order is unspecified. Duplicates (same term and * position, their order is unspecified. Duplicates (same term and
* termpos) will be removed. * termpos) will be removed.
*/ */
TermIterator get_terms_begin() const; TermIterator get_terms_begin() const;
/** Return a Xapian::TermIterator to the end of the list of terms in the /** Return a Xapian::TermIterator to the end of the list of terms in the
* query. * query.
*/ */
TermIterator get_terms_end() const { TermIterator get_terms_end() const {
return TermIterator(NULL); return TermIterator();
} }
/** Test if the query is empty (i.e. was constructed using /** Test if the query is empty (i.e. was constructed using
* the default ctor or with an empty iterator ctor). * the default ctor or with an empty iterator ctor).
*/ */
bool empty() const; bool empty() const;
/** Serialise query into a string. /** Serialise query into a string.
* *
* The query representation may change between Xapian releases: * The query representation may change between Xapian releases:
 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 571 skipping to change at line 571
* *
* 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 * @param exclusive If true, each document can have at most one term w
of ith
* the field, so Xapian should combine multiple values * this prefix, so multiple filters with this prefix
* with OP_OR. If false, each document can have multi * should be combined with OP_OR. If false, each
ple * document can have multiple terms with this prefix,
* values of the field, so Xapian combine them with so
* OP_AND, as we would with filters with different * multiple filters should be combined with OP_AND, li
* prefixes. [default: true] ke
* happens with filters with different prefixes.
* [default: true]
*/ */
void add_boolean_prefix(const std::string &field, const std::string &pr efix, void add_boolean_prefix(const std::string &field, const std::string &pr efix,
bool exclusive); bool exclusive);
/* FIXME:1.3: Merge two versions into one with optional parameter /* FIXME:1.3: Merge two versions into one with optional parameter
* "exclusive", default true. */ * "exclusive", default true. */
void add_boolean_prefix(const std::string &field, const std::string &pr efix); 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();
} }
/// 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 {
return TermIterator(NULL); return TermIterator();
} }
/// Register a ValueRangeProcessor. /// Register a ValueRangeProcessor.
void add_valuerangeprocessor(Xapian::ValueRangeProcessor * vrproc); void add_valuerangeprocessor(Xapian::ValueRangeProcessor * vrproc);
/** Get the spelling-corrected query string. /** Get the spelling-corrected query string.
* *
* This will only be set if FLAG_SPELLING_CORRECTION is specified when * This will only be set if FLAG_SPELLING_CORRECTION is specified when
* QueryParser::parse_query() was last called. * QueryParser::parse_query() was last called.
* *
 End of changes. 3 change blocks. 
10 lines changed or deleted 12 lines changed or added


 termgenerator.h   termgenerator.h 
skipping to change at line 104 skipping to change at line 104
* *
* @param toggle Flags to XOR. * @param toggle Flags to XOR.
* @param mask Flags to AND with first. * @param mask Flags to AND with first.
* *
* @return The old flags setting. * @return The old flags setting.
*/ */
flags set_flags(flags toggle, flags mask = flags(0)); flags set_flags(flags toggle, flags mask = flags(0));
/** Index some text. /** Index some text.
* *
* @param weight The wdf increment (default 1). * @param wdf_inc The wdf increment (default 1).
* @param prefix The term prefix to use (default is no prefix). * @param prefix The term prefix to use (default is no prefix).
*/ */
void index_text(const Xapian::Utf8Iterator & itor, void index_text(const Xapian::Utf8Iterator & itor,
Xapian::termcount weight = 1, Xapian::termcount wdf_inc = 1,
const std::string & prefix = std::string()); const std::string & prefix = std::string());
/** Index some text in a std::string. /** Index some text in a std::string.
* *
* @param weight The wdf increment (default 1). * @param wdf_inc The wdf increment (default 1).
* @param prefix The term prefix to use (default is no prefix). * @param prefix The term prefix to use (default is no prefix).
*/ */
void index_text(const std::string & text, void index_text(const std::string & text,
Xapian::termcount weight = 1, Xapian::termcount wdf_inc = 1,
const std::string & prefix = std::string()) { const std::string & prefix = std::string()) {
return index_text(Utf8Iterator(text), weight, prefix); return index_text(Utf8Iterator(text), wdf_inc, prefix);
} }
/** Index some text without positional information. /** Index some text without positional information.
* *
* Just like index_text, but no positional information is generated. T his * Just like index_text, but no positional information is generated. T his
* means that the database will be significantly smaller, but that phra se * means that the database will be significantly smaller, but that phra se
* searching and NEAR won't be supported. * searching and NEAR won't be supported.
*/ */
void index_text_without_positions(const Xapian::Utf8Iterator & itor, void index_text_without_positions(const Xapian::Utf8Iterator & itor,
Xapian::termcount weight = 1, Xapian::termcount wdf_inc = 1,
const std::string & prefix = std::stri ng()); const std::string & prefix = std::stri ng());
/** Index some text in a std::string without positional information. /** Index some text in a std::string without positional information.
* *
* Just like index_text, but no positional information is generated. T his * Just like index_text, but no positional information is generated. T his
* means that the database will be significantly smaller, but that phra se * means that the database will be significantly smaller, but that phra se
* searching and NEAR won't be supported. * searching and NEAR won't be supported.
*/ */
void index_text_without_positions(const std::string & text, void index_text_without_positions(const std::string & text,
Xapian::termcount weight = 1, Xapian::termcount wdf_inc = 1,
const std::string & prefix = std::stri ng()) { const std::string & prefix = std::stri ng()) {
return index_text_without_positions(Utf8Iterator(text), weight, pref ix); return index_text_without_positions(Utf8Iterator(text), wdf_inc, pre fix);
} }
/** Increase the termpos used by index_text by @a delta. /** Increase the termpos used by index_text by @a delta.
* *
* This can be used to prevent phrase searches from spanning two * This can be used to prevent phrase searches from spanning two
* unconnected blocks of text (e.g. the title and body text). * unconnected blocks of text (e.g. the title and body text).
*/ */
void increase_termpos(Xapian::termcount delta = 100); void increase_termpos(Xapian::termcount delta = 100);
/// Get the current term position. /// Get the current term position.
 End of changes. 8 change blocks. 
8 lines changed or deleted 8 lines changed or added


 termiterator.h   termiterator.h 
skipping to change at line 111 skipping to change at line 111
/** Return PositionIterator pointing to start of positionlist for /** Return PositionIterator pointing to start of positionlist for
* current term. * current term.
*/ */
PositionIterator positionlist_begin() const; PositionIterator positionlist_begin() const;
/** Return PositionIterator pointing to end of positionlist for /** Return PositionIterator pointing to end of positionlist for
* current term. * current term.
*/ */
PositionIterator positionlist_end() const { PositionIterator positionlist_end() const {
return PositionIterator(NULL); return PositionIterator();
} }
/// Return a string describing this object. /// Return a string describing this object.
std::string get_description() const; std::string get_description() const;
/// Allow use as an STL iterator /// Allow use as an STL iterator
//@{ //@{
typedef std::input_iterator_tag iterator_category; typedef std::input_iterator_tag iterator_category;
typedef std::string value_type; typedef std::string value_type;
typedef Xapian::termcount_diff difference_type; typedef Xapian::termcount_diff difference_type;
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 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.6" #define XAPIAN_VERSION "1.2.7"
/** 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 6 #define XAPIAN_REVISION 7
/// 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

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/