Add --read-filters to read list of filters from file
[xapian.git] / xapian-core / docs / deprecation.rst
blob5059c6a77a5db6b5ff9646100c92b578cafba501
2 .. This document was originally written by Richard Boulton.
4 .. Copyright (C) 2007 Lemur Consulting Ltd
5 .. Copyright (C) 2007,2008,2009,2010,2011,2012,2013,2015,2016 Olly Betts
7 ===========
8 Deprecation
9 ===========
11 .. contents:: Table of contents
13 Introduction
14 ============
16 Xapian's API is fairly stable and has been polished piece by piece over time,
17 but it still occasionally needs to be changed.  This may be because a new
18 feature has been implemented and the interface needs to allow access to it, but
19 it may also be required in order to polish a rough edge which has been missed
20 in earlier versions of Xapian, or simply to reflect an internal change which
21 requires a modification to the external interface.
23 We aim to make such changes in a way that allows developers to work against a
24 stable API, while avoiding the need for the Xapian developers to maintain too
25 many old historical interface artefacts.  This document describes the process
26 we use to deprecate old pieces of the API, lists parts of the API which are
27 currently marked as deprecated, and also describes parts of the API which have
28 been deprecated for some time, and are now removed from the Xapian library.
30 It is possible for functions, methods, constants, types or even whole classes
31 to be deprecated, but to save words this document will often use the term
32 "features" to refer collectively to any of these types of interface items.
35 Deprecation Procedure
36 =====================
38 Deprecation markers
39 -------------------
41 At any particular point, some parts of the C++ API will be marked as
42 "deprecated".  Deprecated features are annotated in the API headers with macros
43 such as ``XAPIAN_DEPRECATED()``, which will cause compilers with appropriate
44 support (such as GCC, clang and MSVC) to emit compile-time warnings if these
45 features are used.
47 If a feature is marked with one of these markers, you should avoid using it in
48 new code, and should migrate your code to use a replacement when possible.  The
49 documentation comments for the feature, or the list at the end
50 of this file, will describe possible alternatives to the deprecated feature.
52 If you want to disable deprecation warnings temporarily, you can do so
53 by passing ``"-DXAPIAN_DEPRECATED(X)=X"`` to the compiler (the quotes are
54 needed to protect the brackets from the shell).  If your build system uses
55 make, you might do this like so:
57 .. code-block:: sh
59     make 'CPPFLAGS="-DXAPIAN_DEPRECATED(X)=X"'
61 API and ABI compatibility
62 -------------------------
64 Releases are given three-part version numbers (e.g. 1.2.9), the three parts
65 being termed "major" (1), "minor" (2), and "revision" (9).  Releases with
66 the same major and minor version are termed a "release series".
68 For Xapian releases 1.0.0 and higher, an even minor version indicates a stable
69 release series, while an odd minor version indicates a development release
70 series.
72 Within a stable release series, we strive to maintain API and ABI forwards
73 compatibility.  This means that an application written and compiled against
74 version `X.Y.a` of Xapian should work, without any source changes or need to
75 recompile, with a later version `X.Y.b`, for all `b` >= `a`.
76 Stable releases which increase the minor or major version number will usually
77 change the ABI incompatibly (so that code will need to be recompiled against
78 the newer release series.  They may also make incompatible API changes,
79 though we will attempt to do this in a way which makes it reasonably easy to
80 migrate applications, and document how to do so in this document.
82 It is possible that a feature may be marked as deprecated within a minor
83 release series - that is from version `X.Y.c`
84 onwards, where `c` is not zero.  The API and ABI will not be changed by this
85 deprecation, since the feature will still be available in the API (though the
86 change may cause the compiler to emit new warnings when rebuilding code
87 which uses the now-deprecated feature).
89 Users should generally be able to expect working code which uses Xapian not to
90 stop working without reason.  We attempt to codify this in the following
91 policy, but we reserve the right not to slavishly follow this.  The spirit of
92 the rule should kept in mind - for example if we discovered a feature which
93 didn't actually work, making an incompatible API change at the next ABI bump
94 would be reasonable.
96 Normally a feature will be supported after being deprecated for an entire
97 stable release series.  For example, if a feature is deprecated in release
98 1.2.0, it will be supported for the entire 1.2.x release series, and removed in
99 development release 1.3.0.  If a feature is deprecated in release 1.2.1, it
100 will be supported for the 1.2.x *and* 1.4.x stable release series (and of
101 course the 1.3.x release series in between), and won't be removed until
102 1.5.0.
104 Experimental features
105 ---------------------
107 During a development release series (such as the 1.1.x series), some features
108 may be marked as "experimental".  Such features are liable to change without
109 going through the normal deprecation procedure.  This includes changing on-disk
110 formats for data stored by the feature, and breaking API and ABI compatibility
111 between releases for the feature.  Such features are included in releases to
112 get wider use and corresponding feedback about them.
114 Deprecation in the bindings
115 ---------------------------
117 When the Xapian API changes, the interface provided by the Xapian bindings will
118 usually change in step.  In addition, it is sometimes necessary to change the
119 way in which Xapian is wrapped by bindings - for example, to provide a better
120 convenience wrapper for iterators in Python.  Again, we aim to ensure that an
121 application written (and compiled, if the language being bound is a compiled
122 language) for version `X.Y.a` of Xapian should work without any changes or need
123 to recompile, with a later version `X.Y.b`, for all `a` <= `b`.
125 However, the bindings are a little less mature than the core C++ API, so we
126 don't intend to give the same guarantee that a feature present and not
127 deprecated in version `X.Y.a` will work in all versions `X+1.Y.b`.  In other
128 words, we may remove features which have been deprecated without waiting for
129 an entire release series to pass.
131 Any planned deprecations will be documented in the list of deprecations and
132 removed features at the end of this file.
134 Support for Other Software
135 ==========================
137 Support for other software doesn't follow the same deprecation rules as
138 for API features.
140 Our guiding principle for supporting version of other software is that
141 we don't aim to actively support versions which are no longer supported
142 "upstream".
144 So Xapian 1.1.0 doesn't support PHP4 because the PHP team no longer did
145 when it was released.  By the API deprecation rules we should have announced
146 this when Xapian 1.0.0 was released, but we don't have control over when and
147 to what timescales other software providers discontinue support for older
148 versions.
150 Sometimes we can support such versions without extra effort (e.g. Tcl's
151 stubs mechanism means Tcl 8.1 probably still works, even though the last
152 8.1.x release was over a decade ago), and in some cases Linux distros
153 continue to support software after upstream stops.
155 But in most cases keeping support around is a maintenance overhead and
156 we'd rather spend our time on more useful things.
158 Note that there's no guarantee that we will support and continue to
159 support versions just because upstream still does.  For example, we ceased
160 providing backported packages for Ubuntu dapper with Xapian 1.1.0 - in this
161 case, it's because we felt that if you're conservative enough to run dapper,
162 you'd probably prefer to stick with 1.0.x until you upgrade to hardy (the next
163 Ubuntu LTS release).  But we may decide not to support versions for other
164 reasons too.
166 How to avoid using deprecated features
167 ======================================
169 We recommend taking the following steps to avoid depending on deprecated
170 features when writing your applications:
172  - If at all possible, test compile your project using a compiler which
173    supports warnings about deprecated features (such as GCC 3.1 or later), and
174    check for such warnings.  Use the -Werror flag to GCC to ensure that you
175    don't miss any of them.
177  - Check the NEWS file for each new release for details of any new features
178    which are deprecated in the release.
180  - Check the documentation comments, or the automatically extracted API
181    documentation, for each feature you use in your application.  This
182    documentation will indicate features which are deprecated, or planned for
183    deprecation.
185  - For applications which are not written in C++, there is currently no
186    equivalent of the ``XAPIAN_DEPRECATED`` macro for the bindings, and thus
187    there is no way for the bindings to give a warning if a deprecated feature
188    is used.  This would be a nice addition for those languages in which there
189    is a reasonable way to give such warnings.  Until such a feature is
190    implemented, all application writers using the bindings can do is to check
191    the list of deprecated features in each new release, or lookup the features
192    they are using in the list at the end of this file.
195 Features currently marked for deprecation
196 =========================================
198 Native C++ API
199 --------------
201 .. Substitution definitions for feature names which are two wide for the column:
203 .. |set_max_wildcard_expansion| replace:: ``Xapian::QueryParser::set_max_wildcard_expansion()``
204 .. |flush| replace:: ``Xapian::WritableDatabase::flush()``
205 .. |VRP| replace:: ``Xapian::ValueRangeProcessor``
206 .. |DateVRP| replace:: ``Xapian::DateValueRangeProcessor``
207 .. |NumberVRP| replace:: ``Xapian::NumberValueRangeProcessor``
208 .. |StringVRP| replace:: ``Xapian::StringValueRangeProcessor``
209 .. |add_valuerangeprocessor| replace:: ``Xapian::QueryParser::add_valuerangeprocessor()``
211 .. Keep table width to <= 126 columns.
213 ========== ====== =================================== ========================================================================
214 Deprecated Remove Feature name                        Upgrade suggestion and comments
215 ========== ====== =================================== ========================================================================
216 1.3.6      1.5.0  Subclassing |VRP|                   Subclass ``Xapian::RangeProcessor`` instead, and return a
217                                                       ``Xapian::Query`` from ``operator()()`` (added in 1.3.6).
218 ---------- ------ ----------------------------------- ------------------------------------------------------------------------
219 1.3.6      1.5.0  |DateVRP|                           Use ``Xapian::DateRangeProcessor`` instead (added in 1.3.6).
220 ---------- ------ ----------------------------------- ------------------------------------------------------------------------
221 1.3.6      1.5.0  |NumberVRP|                         Use ``Xapian::NumberRangeProcessor`` instead (added in 1.3.6).
222 ---------- ------ ----------------------------------- ------------------------------------------------------------------------
223 1.3.6      1.5.0  |StringVRP|                         Use ``Xapian::RangeProcessor`` instead, which includes equivalent
224                                                       support for prefix/suffix checking (added in 1.3.6).
225 ---------- ------ ----------------------------------- ------------------------------------------------------------------------
226 1.3.6      1.5.0  |add_valuerangeprocessor|           Use ``Xapian::QueryParser::add_rangeprocessor()`` instead, with a
227                                                       ``Xapian::RangeProcessor`` object instead of a |VRP| object (added in
228                                                       1.3.6).
229 ========== ====== =================================== ========================================================================
231 Bindings
232 --------
234 .. Keep table width to <= 126 columns.
236 ========== ====== ======== ============================ ======================================================================
237 Deprecated Remove Language Feature name                 Upgrade suggestion and comments
238 ========== ====== ======== ============================ ======================================================================
239 ========== ====== ======== ============================ ======================================================================
241 Omega
242 -----
244 .. Keep table width to <= 126 columns.
246 ========== ====== =================================== ========================================================================
247 Deprecated Remove Feature name                        Upgrade suggestion and comments
248 ========== ====== =================================== ========================================================================
249 ========== ====== =================================== ========================================================================
251 .. Features currently marked as experimental
252 .. =========================================
253 .. Native C++ API
254 .. --------------
255 .. ============== ===============================================================================================================
256 .. Name           Details
257 .. ============== ===============================================================================================================
258 .. -------------- ---------------------------------------------------------------------------------------------------------------
259 .. ============== ===============================================================================================================
261 Features removed from Xapian
262 ============================
264 Native C++ API
265 --------------
267 .. Keep table width to <= 126 columns.
269 ======= =================================== ==================================================================================
270 Removed Feature name                        Upgrade suggestion and comments
271 ======= =================================== ==================================================================================
272 1.0.0   QueryParser::set_stemming_options() Use ``set_stemmer()``, ``set_stemming_strategy()`` and/or ``set_stopper()``
273                                             instead:
275                                             - ``set_stemming_options("")`` becomes
276                                               ``set_stemming_strategy(Xapian::QueryParser::STEM_NONE)``
278                                             - ``set_stemming_options("none")`` becomes
279                                               ``set_stemming_strategy(Xapian::QueryParser::STEM_NONE)``
281                                             - ``set_stemming_options(LANG)`` becomes
282                                               ``set_stemmer(Xapian::Stem(LANG)`` and
283                                               ``set_stemming_strategy(Xapian::QueryParser::STEM_SOME)``
285                                             - ``set_stemming_options(LANG, false)`` becomes
286                                               ``set_stemmer(Xapian::Stem(LANG)`` and
287                                               ``set_stemming_strategy(Xapian::QueryParser::STEM_SOME)``
289                                             - ``set_stemming_options(LANG, true)`` becomes
290                                               ``set_stemmer(Xapian::Stem(LANG)`` and
291                                               ``set_stemming_strategy(Xapian::QueryParser::STEM_ALL)``
293                                             If a third parameter is passed, ``set_stopper(PARAM3)`` and treat the first two
294                                             parameters as above.
295 ------- ----------------------------------- ----------------------------------------------------------------------------------
296 1.0.0   Enquire::set_sort_forward()         Use ``Enquire::set_docid_order()`` instead:
298                                              - ``set_sort_forward(true)`` becomes ``set_docid_order(ASCENDING)``
299                                              - ``set_sort_forward(false)`` becomes ``set_docid_order(DESCENDING)``
300 ------- ----------------------------------- ----------------------------------------------------------------------------------
301 1.0.0   Enquire::set_sorting()              Use ``Enquire::set_sort_by_relevance()``, ``Enquire::set_sort_by_value()``, or
302                                             ``Enquire::set_sort_by_value_then_relevance()`` instead.
304                                              - ``set_sorting(KEY, 1)`` becomes ``set_sort_by_value(KEY)``
305                                              - ``set_sorting(KEY, 1, false)`` becomes ``set_sort_by_value(KEY)``
306                                              - ``set_sorting(KEY, 1, true)`` becomes ``set_sort_by_value_then_relevance(KEY)``
307                                              - ``set_sorting(ANYTHING, 0)`` becomes ``set_sort_by_relevance()``
308                                              - ``set_sorting(Xapian::BAD_VALUENO, ANYTHING)`` becomes
309                                                ``set_sort_by_relevance()``
310 ------- ----------------------------------- ----------------------------------------------------------------------------------
311 1.0.0   Stem::stem_word(word)               Use ``Stem::operator()(word)`` instead.
312 ------- ----------------------------------- ----------------------------------------------------------------------------------
313 1.0.0   Auto::open(path)                    Use the ``Database(path)`` constructor instead.
314 ------- ----------------------------------- ----------------------------------------------------------------------------------
315 1.0.0   Auto::open(path, action)            Use the ``WritableDatabase(path, action)`` constructor instead.
316 ------- ----------------------------------- ----------------------------------------------------------------------------------
317 1.0.0   Query::is_empty()                   Use ``Query::empty()`` instead.
318 ------- ----------------------------------- ----------------------------------------------------------------------------------
319 1.0.0   Document::add_term_nopos()          Use ``Document::add_term()`` instead.
320 ------- ----------------------------------- ----------------------------------------------------------------------------------
321 1.0.0   Enquire::set_bias()                 Use ``PostingSource`` instead (new in 1.2).
322 ------- ----------------------------------- ----------------------------------------------------------------------------------
323 1.0.0   ExpandDecider::operator()           Return type is now ``bool`` not ``int``.
324 ------- ----------------------------------- ----------------------------------------------------------------------------------
325 1.0.0   MatchDecider::operator()            Return type is now ``bool`` not ``int``.
326 ------- ----------------------------------- ----------------------------------------------------------------------------------
327 1.0.0   Error::get_type()                   Return type is now ``const char *`` not ``std::string``.  Most existing code
328                                             won't need changes, but if it does the simplest fix is to write
329                                             ``std::string(e.get_type())`` instead of ``e.get_type()``.
330 ------- ----------------------------------- ----------------------------------------------------------------------------------
331 1.0.0   <xapian/output.h>                   Use ``cout << obj.get_description();`` instead of ``cout << obj;``
332 ------- ----------------------------------- ----------------------------------------------------------------------------------
333 1.0.0   Several constructors marked         Explicitly create the object type required, for example use
334         as explicit.                        ``Xapian::Enquire enq(Xapian::Database(path));`` instead of
335                                             ``Xapian::Enquire enq(path);``
336 ------- ----------------------------------- ----------------------------------------------------------------------------------
337 1.0.0   QueryParser::parse_query() throwing Catch ``Xapian::QueryParserError`` instead of ``const char *``, and call
338         ``const char *`` exception.         ``get_msg()`` on the caught object.  If you need to build with either version,
339                                             catch both (you'll need to compile the part which catches ``QueryParserError``
340                                             conditionally, since this exception isn't present in the 0.9 release series).
341 ------- ----------------------------------- ----------------------------------------------------------------------------------
342 1.1.0   xapian_version_string()             Use ``version_string()`` instead.
343 ------- ----------------------------------- ----------------------------------------------------------------------------------
344 1.1.0   xapian_major_version()              Use ``major_version()`` instead.
345 ------- ----------------------------------- ----------------------------------------------------------------------------------
346 1.1.0   xapian_minor_version()              Use ``minor_version()`` instead.
347 ------- ----------------------------------- ----------------------------------------------------------------------------------
348 1.1.0   xapian_revision()                   Use ``revision()`` instead.
349 ------- ----------------------------------- ----------------------------------------------------------------------------------
350 1.1.0   Enquire::include_query_terms        Use ``Enquire::INCLUDE_QUERY_TERMS`` instead.
351 ------- ----------------------------------- ----------------------------------------------------------------------------------
352 1.1.0   Enquire::use_exact_termfreq         Use ``Enquire::USE_EXACT_TERMFREQ`` instead.
353 ------- ----------------------------------- ----------------------------------------------------------------------------------
354 1.1.0   Error::get_errno()                  Use ``Error::get_error_string()`` instead.
355 ------- ----------------------------------- ----------------------------------------------------------------------------------
356 1.1.0   Enquire::register_match_decider()   This method didn't do anything, so just remove calls to it!
357 ------- ----------------------------------- ----------------------------------------------------------------------------------
358 1.1.0   Query::Query(Query::op, Query)      This constructor isn't useful for any currently implemented
359                                             ``Query::op``.
360 ------- ----------------------------------- ----------------------------------------------------------------------------------
361 1.1.0   The Quartz backend                  Use the Chert backend instead.
362 ------- ----------------------------------- ----------------------------------------------------------------------------------
363 1.1.0   Quartz::open()                      Use ``Chert::open()`` instead.
364 ------- ----------------------------------- ----------------------------------------------------------------------------------
365 1.1.0   quartzcheck                         Use ``xapian-check`` instead.
366 ------- ----------------------------------- ----------------------------------------------------------------------------------
367 1.1.0   quartzcompact                       Use ``xapian-compact`` instead.
368 ------- ----------------------------------- ----------------------------------------------------------------------------------
369 1.1.0   quartzdump                          Use ``xapian-inspect`` instead.
370 ------- ----------------------------------- ----------------------------------------------------------------------------------
371 1.1.0   configure --enable-debug            configure --enable-assertions
372 ------- ----------------------------------- ----------------------------------------------------------------------------------
373 1.1.0   configure --enable-debug=full       configure --enable-assertions --enable-log
374 ------- ----------------------------------- ----------------------------------------------------------------------------------
375 1.1.0   configure --enable-debug=partial    configure --enable-assertions=partial
376 ------- ----------------------------------- ----------------------------------------------------------------------------------
377 1.1.0   configure --enable-debug=profile    configure --enable-log=profile
378 ------- ----------------------------------- ----------------------------------------------------------------------------------
379 1.1.0   configure --enable-debug-verbose    configure --enable-log
380 ------- ----------------------------------- ----------------------------------------------------------------------------------
381 1.1.0   ``Database::positionlist_begin()``  This check is quite expensive, and often you don't care.  If you
382         throwing ``RangeError`` if the      do it's easy to check - just open a ``TermListIterator`` for the
383         term specified doesn't index the    document and use ``skip_to()`` to check if the term is there.
384         document specified.
385 ------- ----------------------------------- ----------------------------------------------------------------------------------
386 1.1.0   ``Database::positionlist_begin()``  This check is quite expensive, and often you don't care.  If you
387         throwing ``DocNotFoundError`` if    do, it's easy to check - just call ``Database::get_document()`` with the
388         the document specified doesn't      specified document ID.
389         exist.
390 ------- ----------------------------------- ----------------------------------------------------------------------------------
391 1.1.5   delve -k                            Accepted as an undocumented alias for -V since 0.9.10 for compatibility with 0.9.9
392                                             and earlier.  Just use -V instead.
393 ------- ----------------------------------- ----------------------------------------------------------------------------------
394 1.3.0   The Flint backend                   Use the Chert backend instead.
395 ------- ----------------------------------- ----------------------------------------------------------------------------------
396 1.3.0   Flint::open()                       Use ``Chert::open()`` instead.
397 ------- ----------------------------------- ----------------------------------------------------------------------------------
398 1.3.0   xapian-chert-update                 Install Xapian 1.2.x (where x >= 5) to update chert databases from 1.1.3 and
399                                             earlier.
400 ------- ----------------------------------- ----------------------------------------------------------------------------------
401 1.3.0   Default second parameter to         The parameter name was ``ascending`` and defaulted to ``true``.  However
402         ``Enquire`` sorting functions.      ascending=false gave what you'd expect the default sort order to be (and probably
403                                             think of as ascending) while ascending=true gave the reverse (descending) order.
404                                             For sanity, we renamed the parameter to ``reverse`` and deprecated the default
405                                             value.  In the more distant future, we'll probably add a default again, but of
406                                             ``false`` instead.
408                                             The methods affected are:
409                                             ``Enquire::set_sort_by_value(Xapian::valueno sort_key)``
410                                             ``Enquire::set_sort_by_key(Xapian::Sorter * sorter)``
411                                             ``Enquire::set_sort_by_value_then_relevance(Xapian::valueno sort_key)``
412                                             ``Enquire::set_sort_by_key_then_relevance(Xapian::Sorter * sorter)``
413                                             ``Enquire::set_sort_by_relevance_then_value(Xapian::valueno sort_key)``
414                                             ``Enquire::set_sort_by_relevance_then_key(Xapian::Sorter * sorter)``
416                                             To update them, just add a second parameter with value ``true`` to each of the
417                                             above calls.  For the methods which take a ``Xapian::Sorter`` object, you'll also
418                                             need to migrate to ``Xapian::KeyMaker`` (see below).
419 ------- ----------------------------------- ----------------------------------------------------------------------------------
420 1.3.0   ``Sorter`` abstract base class.     Use ``KeyMaker`` class instead, which has the same semantics, but has been renamed
421                                             to indicate that the keys produced may be used for purposes other than sorting (we
422                                             plan to allow collapsing on generated keys in the future).
423 ------- ----------------------------------- ----------------------------------------------------------------------------------
424 1.3.0   ``MultiValueSorter`` class.         Use ``MultiValueKeyMaker`` class instead.  Note that ``MultiValueSorter::add()``
425                                             becomes ``MultiValueKeyMaker::add_value()``, but the sense of the direction flag
426                                             is reversed (to be consistent with ``Enquire::set_sort_by_value()``), so::
428                                                 MultiValueSorter sorter;
429                                                 // Primary ordering is forwards on value 4.
430                                                 sorter.add(4);
431                                                 // Secondary ordering is reverse on value 5.
432                                                 sorter.add(5, false);
434                                             becomes::
436                                                 MultiValueKeyMaker sorter;
437                                                 // Primary ordering is forwards on value 4.
438                                                 sorter.add_value(4);
439                                                 // Secondary ordering is reverse on value 5.
440                                                 sorter.add_value(5, true);
441 ------- ----------------------------------- ----------------------------------------------------------------------------------
442 1.3.0   ``matchspy`` parameter to           Use the newer ``MatchSpy`` class and ``Enquire::add_matchspy()`` method instead.
443         ``Enquire::get_mset()``
444 ------- ----------------------------------- ----------------------------------------------------------------------------------
445 1.3.0   ``Xapian::Query::unserialise()``    To be compatible with older and newer Xapian, you can catch both exceptions.
446         throws
447         ``Xapian::SerialisationError`` not
448         ``Xapian::InvalidArgumentError``
449         for errors in serialised data
450 ------- ----------------------------------- ----------------------------------------------------------------------------------
451 1.3.2   The Brass backend                   Use the Glass backend instead.
452 ------- ----------------------------------- ----------------------------------------------------------------------------------
453 1.3.2   ``Xapian::Brass::open()``           Use the constructor with ``Xapian::DB_BACKEND_GLASS`` flag (new in 1.3.2) instead.
454 ------- ----------------------------------- ----------------------------------------------------------------------------------
455 1.3.4   Copy constructors and assignment    We think it was a mistake that implicit copy constructors and assignment operators
456         operators for classes:              were being provided for these functor classes - it's hard to use them correctly,
457         ``Xapian::ExpandDecider``,          but easy to use them in ways which compile but don't work correctly, and we doubt
458         ``Xapian::FieldProcessor`` (new in  anyone is intentionally using them, so we've simply removed them.  For more
459         1.3.1), ``Xapian::KeyMaker``,       information, see https://trac.xapian.org/ticket/681
460         ``Xapian::MatchDecider``,
461         ``Xapian::StemImplementation``,
462         ``Xapian::Stopper`` and
463         ``Xapian::ValueRangeProcessor``.
464 ------- ----------------------------------- ----------------------------------------------------------------------------------
465 1.3.5   ``Xapian::DBCHECK_SHOW_BITMAP``     Use ``Xapian::DBCHECK_SHOW_FREELIST`` (added in 1.3.2) instead.
466                                             ``Xapian::DBCHECK_SHOW_BITMAP`` was added in 1.3.0, so has never been in a stable
467                                             release.
468 ------- ----------------------------------- ----------------------------------------------------------------------------------
469 1.5.0   The Chert backend                   Use the Glass backend instead.
470 ------- ----------------------------------- ----------------------------------------------------------------------------------
471 1.5.0   ``Xapian::Auto::open_stub()``       Use the constructor with ``Xapian::DB_BACKEND_STUB`` flag (new in 1.3.2) instead.
472 ------- ----------------------------------- ----------------------------------------------------------------------------------
473 1.5.0   ``Xapian::Chert::open()``           Use the constructor with ``Xapian::DB_BACKEND_GLASS`` flag (new in 1.3.2) instead.
474 ------- ----------------------------------- ----------------------------------------------------------------------------------
475 1.5.0   ``Xapian::InMemory::open()``        Use the constructor with ``Xapian::DB_BACKEND_INMEMORY`` flag (new in
476                                             1.3.5) instead.
477 ------- ----------------------------------- ----------------------------------------------------------------------------------
478 1.5.0   |flush|                             Use ``Xapian::WritableDatabase::commit()`` instead (available since 1.1.0).
479 ------- ----------------------------------- ----------------------------------------------------------------------------------
480 1.5.0   |set_max_wildcard_expansion|        Use ``Xapian::QueryParser::set_max_expansion()`` instead.  The exact equivalent of
481                                             ``set_max_wildcard_expansion(n)`` is
482                                             ``set_max_expansion(n, Xapian::Query::WILDCARD_LIMIT_ERROR,
483                                             Xapian::QueryParser::FLAG_WILDCARD)``
484 ------- ----------------------------------- ----------------------------------------------------------------------------------
485 1.5.0   ``Xapian::Compactor`` methods       Use the ``Xapian::Database::compact()`` method instead.  The
486         ``set_block_size()``,               ``Xapian::Compactor`` class is now just a subclassable functor class to
487         ``set_renumber()``,                 allow access to progress messages and control over merging of user
488         ``set_multipass()``,                metadata.
489         ``set_compaction_level()``,
490         ``set_destdir()``, ``add_source()`
491         and ``compact()``.
492 ------- ----------------------------------- ----------------------------------------------------------------------------------
493 1.5.0   ``Xapian::ValuePostingSource``      Use the respective getter and setter methods instead, added in 1.3.5 and 1.2.23.
494         public member variables
495 ------- ----------------------------------- ----------------------------------------------------------------------------------
496 1.5.0   ``Xapian::timeout`` typedef         Use ``unsigned`` instead, which should also work with older Xapian releases.
497 ------- ----------------------------------- ----------------------------------------------------------------------------------
498 1.5.0   ``Xapian::percent`` typedef         Use ``int`` instead, which should also work with older Xapian releases.
499 ------- ----------------------------------- ----------------------------------------------------------------------------------
500 1.5.0   ``Xapian::weight`` typedef          Use ``double`` instead, which should also work with older Xapian releases.
501 ------- ----------------------------------- ----------------------------------------------------------------------------------
502 1.5.0   ``Xapian::Enquire::get_eset()``     Use ``Xapian::Enquire::set_expansion_scheme()`` to specify the algorithm which
503         overloaded form taking ``k``        ``get_eset()`` should use, along with any parameters (added in 1.3.2).
504         parameter.
505 ------- ----------------------------------- ----------------------------------------------------------------------------------
506 1.5.0   ``Xapian::ErrorHandler``            This API was a no-op in 1.4.x, so you can just remove any lingering uses.  Longer
507                                             term we hope to replace it with a better thought out version.  You can find more
508                                             information at https://trac.xapian.org/ticket/3#comment:8
509 ======= =================================== ==================================================================================
512 Bindings
513 --------
515 .. Keep table width to <= 126 columns.
517 ======= ======== ============================ ================================================================================
518 Removed Language Feature name                 Upgrade suggestion and comments
519 ======= ======== ============================ ================================================================================
520 1.0.0   SWIG     Enquire::set_sort_forward()  Use ``Enquire::set_docid_order()`` instead.
521         [#rswg]_
522                                                 - ``set_sort_forward(true)`` becomes ``set_docid_order(ASCENDING)``
523                                                 - ``set_sort_forward(false)`` becomes ``set_docid_order(DESCENDING)``
524 ------- -------- ---------------------------- --------------------------------------------------------------------------------
525 1.0.0   SWIG     Enquire::set_sorting()       Use ``Enquire::set_sort_by_relevance()``, ``Enquire::set_sort_by_value()``
526         [#rswg]_                              or ``Enquire::set_sort_by_value_then_relevance()`` instead.
528                                                - ``set_sorting(KEY, 1)`` becomes ``set_sort_by_value(KEY)``
529                                                - ``set_sorting(KEY, 1, false) becomes ``set_sort_by_value(KEY)``
530                                                - ``set_sorting(KEY, 1, true)`` becomes
531                                                  ``set_sort_by_value_then_relevance(KEY)``
532                                                - ``set_sorting(ANYTHING, 0) becomes set_sort_by_relevance()``
533                                                - ``set_sorting(Xapian::BAD_VALUENO, ANYTHING)`` becomes
534                                                  ``set_sort_by_relevance()``
535 ------- -------- ---------------------------- --------------------------------------------------------------------------------
536 1.0.0   SWIG     Auto::open(path)             Use the ``Database(path)`` constructor instead.
537         [#rswg]_
539 ------- -------- ---------------------------- --------------------------------------------------------------------------------
540 1.0.0   SWIG     Auto::open(path, action)     Use the ``WritableDatabase(path, action)`` constructor instead.
541         [#rswg]_
542 ------- -------- ---------------------------- --------------------------------------------------------------------------------
543 1.0.0   SWIG     MSet::is_empty()             Use ``MSet::empty()`` instead.
544         [#rsw3]_
545 ------- -------- ---------------------------- --------------------------------------------------------------------------------
546 1.0.0   SWIG     ESet::is_empty()             Use ``ESet::empty()`` instead.
547         [#rsw3]_
548 ------- -------- ---------------------------- --------------------------------------------------------------------------------
549 1.0.0   SWIG     RSet::is_empty()             Use ``RSet::empty()`` instead.
550         [#rsw3]_
551 ------- -------- ---------------------------- --------------------------------------------------------------------------------
552 1.0.0   SWIG     Query::is_empty()            Use ``Query::empty()`` instead.
553         [#rsw3]_
554 ------- -------- ---------------------------- --------------------------------------------------------------------------------
555 1.0.0   SWIG     Document::add_term_nopos()   Use ``Document::add_term()`` instead.
556         [#rswg]_
557 ------- -------- ---------------------------- --------------------------------------------------------------------------------
558 1.0.0   CSharp   ExpandDecider::Apply()       Return type is now ``bool`` instead of ``int``.
559 ------- -------- ---------------------------- --------------------------------------------------------------------------------
560 1.0.0   CSharp   MatchDecider::Apply()        Return type is now ``bool`` instead of ``int``.
561 ------- -------- ---------------------------- --------------------------------------------------------------------------------
562 1.0.0   SWIG     Stem::stem_word(word)        Use ``Stem::operator()(word)`` instead. [#callable]_
563         [#rswg]_
564 ------- -------- ---------------------------- --------------------------------------------------------------------------------
565 1.1.0   SWIG     xapian_version_string()      Use ``version_string()`` instead.
566         [#rswg]_
567 ------- -------- ---------------------------- --------------------------------------------------------------------------------
568 1.1.0   SWIG     xapian_major_version()       Use ``major_version()`` instead.
569         [#rswg]_
570 ------- -------- ---------------------------- --------------------------------------------------------------------------------
571 1.1.0   SWIG     xapian_minor_version()       Use ``minor_version()`` instead.
572         [#rswg]_
573 ------- -------- ---------------------------- --------------------------------------------------------------------------------
574 1.1.0   SWIG     xapian_revision()            Use ``revision()`` instead.
575         [#rswg]_
576 ------- -------- ---------------------------- --------------------------------------------------------------------------------
577 1.1.0   SWIG     ESetIterator::get_termname() Use ``ESetIterator::get_term()`` instead.  This change is intended to
578         [#rswg]_                              bring the ESet iterators in line with other term iterators, which all
579                                               support ``get_term()`` instead of ``get_termname()``.
581 ------- -------- ---------------------------- --------------------------------------------------------------------------------
582 1.1.0   Python   get_description()            All ``get_description()`` methods have been renamed to ``__str__()``,
583                                               so the normal python ``str()`` function can be used.
584 ------- -------- ---------------------------- --------------------------------------------------------------------------------
585 1.1.0   Python   MSetItem.get_*()             All these methods are deprecated, in favour of properties.
586                                               To convert, just change ``msetitem.get_FOO()`` to ``msetitem.FOO``
587 ------- -------- ---------------------------- --------------------------------------------------------------------------------
588 1.1.0   Python   Enquire.get_matching_terms   Replaced by ``Enquire.matching_terms``, for consistency with
589                                               rest of Python API.  Note: an ``Enquire.get_matching_terms`` method existed in
590                                               releases up-to and including 1.2.4, but this was actually an old implementation
591                                               which only accepted a MSetIterator as a parameter, and would have failed with
592                                               code written expecting the version in 1.0.0.  It was fully removed after
593                                               release 1.2.4.
594 ------- -------- ---------------------------- --------------------------------------------------------------------------------
595 1.1.0   SWIG     Error::get_errno()           Use ``Error::get_error_string()`` instead.
596         [#rswg]_
597 ------- -------- ---------------------------- --------------------------------------------------------------------------------
598 1.1.0   SWIG     MSet::get_document_id()      Use ``MSet::get_docid()`` instead.
599         [#rsw2]_
600 ------- -------- ---------------------------- --------------------------------------------------------------------------------
601 1.2.0   Python   mset[i][xapian.MSET_DID] etc This was inadvertently removed in 1.2.0, but not noticed until 1.2.5, by which
602                                               point it no longer seemed worthwhile to reinstate it.  Please use the property
603                                               API instead, e.g. ``mset[i].docid``, ``mset[i].weight``, etc.
604 ------- -------- ---------------------------- --------------------------------------------------------------------------------
605 1.2.5   Python   if idx in mset               This was nominally implemented, but never actually worked.  Since nobody seems
606                                               to have noticed in 3.5 years, we just removed it.  If you have uses (which were
607                                               presumably never called), you can replace them with:
608                                               ``if idx >= 0 and idx < len(mset)``
609 ------- -------- ---------------------------- --------------------------------------------------------------------------------
610 1.3.0   Python   Non-pythonic iterators       Use the pythonic iterators instead.
611 ------- -------- ---------------------------- --------------------------------------------------------------------------------
612 1.3.0   Python   Stem_get_available_languages Use Stem.get_available_languages instead (static method instead of function)
613 ------- -------- ---------------------------- --------------------------------------------------------------------------------
614 1.5.0   Python   MSet.items                   Iterate the MSet object itself instead.
615 ------- -------- ---------------------------- --------------------------------------------------------------------------------
616 1.5.0   Python   ESet.items                   Iterate the ESet object itself instead.
617 ======= ======== ============================ ================================================================================
619 .. [#rswg] This affects all SWIG generated bindings (currently: Python, PHP, Ruby, Tcl8 and CSharp)
621 .. [#rsw2] This affects all SWIG-generated bindings except those for Ruby, support for which was added after the function was deprecated in Xapian-core.
623 .. [#rsw3] This affects all SWIG generated bindings except those for Ruby, which was added after the function was deprecated in Xapian-core, and PHP, where empty is a reserved word (and therefore, the method remains "is_empty").
625 .. [#callable] Python handles this like C++.  Ruby renames it to 'call' (idiomatic Ruby).  PHP renames it to 'apply'.  CSharp to 'Apply' (delegates could probably be used to provide C++-like functor syntax, but that's effort and it seems debatable if it would actually be more natural to a C# programmer).  Tcl8 renames it to 'apply' - need to ask a Tcl type if that's the best solution.
627 Omega
628 -----
630 .. Keep table width to <= 126 columns.
632 ======= =================================== ==================================================================================
633 Removed Feature name                        Upgrade suggestion and comments
634 ======= =================================== ==================================================================================
635 1.0.0   $freqs                              Use ``$map{$queryterms,$_:&nbsp;$nice{$freq{$_}}}`` instead.
636 ------- ----------------------------------- ----------------------------------------------------------------------------------
637 1.0.0   scriptindex -u                      ``-u`` was ignored for compatibility with 0.7.5 and earlier, so just remove it.
638 ------- ----------------------------------- ----------------------------------------------------------------------------------
639 1.0.0   scriptindex -q                      ``-q`` was ignored for compatibility with 0.6.1 and earlier, so just remove it.
640 ------- ----------------------------------- ----------------------------------------------------------------------------------
641 1.1.0   scriptindex index=nopos             Use ``indexnopos`` instead.
642 ------- ----------------------------------- ----------------------------------------------------------------------------------
643 1.3.0   ``OLDP`` CGI parameter              Use ``xP`` CGI parameter instead (direct replacement), which has been supported
644                                             since at least 0.5.0.
645 ------- ----------------------------------- ----------------------------------------------------------------------------------
646 1.5.0   omindex command line long option    Renamed to ``--no-delete``, which works in 1.2.4 and later.
647         ``--preserve-nonduplicates``.
648 ------- ----------------------------------- ----------------------------------------------------------------------------------
649 1.5.0   $set{spelling,true}                 Use $set{flag_spelling_suggestion,true} instead, which was added in 1.2.5.
650 ======= =================================== ==================================================================================