Release Overview for 2.2.0
This page contains a high level description of the most notable changes in this release. For full details of user-visible changes, see the NEWS files in each module:
See also the full list of bug reports marked as fixed in this release.
API
Xapian::C::isalpha()and friends: New public API functions which mostly follow those in<ctype.h>but always work in the C locale, so are suitable for parsing file formats, etc. These have long existed in libxapian, and were already exposed so that omega can use them, but they may be useful to applications using Xapian as well. See #63.
matcher
- Fix bugs in optimisation of a term indexing all docs. If a query has such a
term in a situation where we don't need its wdfs, and the used docids don't
form a contiguous range starting at 1, then we use an alldocs
PostListinstead. We callset_term()on this so it knows the real term name, but unfortunately this termname was then getting used in ways that it shouldn't be. For glass this could result inDatabaseCorruptErrorbeing thrown when the database wasn't actually corrupt. For both glass and honey it meant some operations such as skip_to() could cause us to switch to the real postlist for the term (which doesn't affect correctness, but is less efficient). Fixes #855, reported by Dan Callaghan.
- Fix
AndNotPostList::skip_to()bug, which could result in documents which shouldn't match being included in the results. This bug was introduced in 2.0.0. Fixes #857, reported by Adrian Ratiu.
- Fix
SelectPostList::skip_to()bug, which could result in documents which shouldn't match being included in the results. This bug was introduced in 2.0.0. Related to #857.
- Fix
OrPostList::check()bug which could result in returning documents which don't match the query. This bug was introduced in Xapian 2.0.0; 1.4.x is not affected. Reported by Ludovic on the xapian-discuss list.
- Fix bug with percentage calculation for a positional query on a sharded database where only some of the terms occurred in one shard but it matched in another shard. Xapian would overcount the number of weighted leaf subqueries by one, leading to too low a percentage score for the top match. E.g. for a 3 term phrase, it would score 75% instead of 100%. This bug was introduced in 2.0.0 (1.4.x is unaffected). It was found by Eric Wong via a testcase in public-inbox's testsuite which fails when run with Xapian 2.
portability
- Fix
Xapian::serialise_double()on non-IEEE754 big-endian platforms. Xapian 2 switched to serialising doubles as little-endian IEEE 754. This is extremely efficient for platforms which use that format, and still very efficient for platforms using big-endian IEEE 754. Most modern platforms are the former, with most of the rest being the latter.
We have fallback code for platforms which don't use IEEE 754 format for doubles, which was failing to byte swap on big endian platforms. This release adds the missing byte swapping so now all platforms serialise compatibly. The byte-swapping was missing in both serialisation and unserialisation code, so the remote backend would work if both client and server were on the same architecture, but some combinations with differing architectures would fail. However if both client and server are running on an unusual platform which is BOTH big-endian AND uses a non-IEEE-754 double format, then the client and server both need to be >= 2.2.0, or 2.0.0 to 2.1.0.
- The choice of integer types used in the code has been audited using both UBSan defined behaviour checks and additional compiler warnings. All identified issues have been addressed by adjusting the code (often using a more suitable type or adding an explicit check). Nothing terrible was found. Changes which have a user-visible effect are documented elsewhere in the NEWS entry for this release.
- Emscripten: We now require >= 1.39.10, which was released in 2020, and
have removed a workaround for a bug in
O_TRUNCemulation in older Emscripten versions.
- Use explicit A-suffixed Win32 APIs (e.g
CreateProcessA()instead ofCreateProcess()) which seems clearer and and prevents a compilation error if UNICODE is defined. Patch from Jean-Francois Dockes (https://github.com/xapian/xapian/pull/342).
- MSVC warnings enabled by its -W3 command line option have been fixed, and configure now automatically enables -W3 for MSVC. This is documented as the default warning level in the MSVC IDE, so this should also mean there won't be warnings from Xapian headers when building code which uses Xapian's public API.
- The public API headers now consistently use nullptr (instead of NULL or 0)
so user code can be compiled with warning options such as GCC's
-Wzero-as-null-pointer-constant.
Perl bindings
- Use Perl's
$Config{ccflags}when compiling the Perl bindings, like the oldSearch::Xapianbindings did. These flags can contain -D options which change the layout of perl's internal structures - for example, on 32-bit Linux,-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64, which changes the size ofStat_t(PL_statcache) in the interpreter structure, so every interpreter field after it is at a different offset in the extension, leading to undefined behaviour. The flags are filtered to remove GCC option-Wdeclaration-after-statementif present, since this is not meaningful for C++. Patch from Vitaly Lipatov.
PHP
- Support PHP 8.6. Fixes #859, reported by casper.
Python3
- Support Python 3.15, which required upgrading the SWIG version we bootstrap with - we're now using SWIG 4.5.0.
Omega
omindex
- Support
message/global, which is likemessage/rfc822but without the 7-bit clean requirements.
- Add mapping from
.xhtextension totext/html. This is listed in RFC3236 as an extension in use, though it doesn't seem very common.
portability
- Workaround magic.h from libmagic 5.48 breaking if
ssize_tmacro defined.
- Update to use the new public xapian-core API functions
Xapian::C::isalpha(), etc instead of an equivalent private API which xapian-core exposed for xapian-omega to use. This means xapian-core >= 2.2.0 is required. See #63.
