Opened 7 months ago

Closed 7 months ago

#22849 closed enhancement (fixed)

xapian-core-1.4.31

Reported by: Bruce Dubbs Owned by: Bruce Dubbs
Priority: normal Milestone: 13.1
Component: BOOK Version: git
Severity: medium Keywords:
Cc:

Description

New point version.

Change History (5)

comment:1 by Bruce Dubbs, 7 months ago

Owner: changed from blfs-book to Bruce Dubbs
Status: new → assigned

comment:2 by Bruce Dubbs, 7 months ago

Xapian-core 1.4.31 (2026-02-23):

API:

  • Database::get_spelling_suggestion(): Remove a flawed optimisation which was rejecting candidate corrections based only on how many n-grams match. This can unfortunately reject the best (or indeed only) candidate within the requested number of edits.

Profiling with an example dictionary of 244506 German words, searching for a correction takes an extra ~2 milliseconds with this fix applied (21% more time when timing opening the database and calling get_spelling_suggestion()). Xapian 2.0.0 will include several optimisations to the edit distance calculator which mean that Xapian 2.0.0 (which also includes this fix) is actually slightly faster than Xapian 1.4.30 (without this fix).

  • Database::compact(): FULLER compaction now does exactly the same as FULL. Previously FULLER did the same as FULL but in addition it increased the maximum size of the low-level items in the database tables. The idea was that this would reduce the overhead required because larger items would not need to be split into as many pieces (or even split at all in some cases).

A downside of this was that it violated the design of the Btree format slightly and this resulted in corner-case bugs which are tricky to fix. Also while FULLER did result in smaller compacted databases when it was added for the quartz backend in 2005, testing with the glass backend in 2026 showed it actually gives larger output than FULL for typical databases.

  • Query: Attempting to construct a pairwise Query from an operator and two char* or const char* term names failed to compile because pointers are iterator types and matched the template which allows construction from a pair of iterators which are meant to dereference to give a type convertible to std::string or Xapian::Query or Xapian::Query*. We've solved this by only enabling this template for iterators where sizeof(value_type) is not 1.
  • QueryParser: Improve FLAG_PARTIAL handling for stopwords. With FLAG_PARTIAL, we expand a partial word at the end of the query as a wildcard, but also include the term that the word would normally generate as an alternative. This is now extended to considering if the term would normally be omitted as a stopword - if so FLAG_PARTIAL now just expands it to be a wildcard.

  • RangeProcessor: Don't require prefix/suffix on empty bound when flag RP_REPEATED is specified (so now ..$10 and 20kg.. work). Case noted by James Aylett in the "getting started" guide.

  • ValueRangeProcessor: Don't require prefix/suffix on empty bound.
  • Fix incorrect container and iterator traits for Xapian API classes.

testsuite:

  • Extend generated tests to cover newer Xapian::Weight subclasses and Xapian::Utf8Iterator.

glass backend:

  • Compacting a database with corrupt item sizes could try to copy an item outside of the allocated block. Now we throw DatabaseCorruptError in this situation. Not realistically exploitable (you would need to run compact on a carefully crafted corrupt Xapian database made by an attacker).
  • Opening a database table now throws DatabaseCorruptError if the number of levels is non-zero but the fake_root flag is set. This flag should mean that the table hasn't been used yet.

build system:

  • Suppress a bogus 0 line which was appearing in configure output due to the SONUMBER check which was added in 1.4.29.

documentation:

  • The API documentation for Xapian::Stem has always listed english_lovins and 'english_porter', but these haven't worked for over 18½ years (since 0.9.10). Nobody has reported this before now and we only noticed while merging some new stemming algorithms so we've aligned the docs with long-term reality. These stemmers have always been available under the names lovins and porter respectively.
  • Update API documentation wording about 'dutch_porter'.
  • docs/stemming.rst: Update to include current locations of vocab and stopwords.
  • docs/stemming.rst: Expand stemming example to include -s suffix as conflating singular and plural noun forms is arguably the most important thing an English stemmer does.
  • docs/stemming.rst: Replace out-dated list of supported stemming algorithms with a link to the up-to-date list in the Xapian::Stem API docs.
  • Document how to use 'XAPIAN_AT_LEAST()' if you still want to support Xapian versions before it was added (1.4.2). An obvious approach works with newer Xapian but fails with < 1.4.2 so warn about this and recommend an approach.
  • Improve API documentation for 'Database::size()' to note when it was added and to point people who actually want the number of documents to get_doccount().
  • queryparser.rst: Remove unwanted paragraph break.
  • remote.rst: Fix outdated information - writable remote DBs has been supported since Xapian 0.9.7!
  • replication.rst: Minor improvements to the replication docs.
  • Improve DecreasingValueWeightPostingSource API documentation. The description of the required ordering of weights was inverted from what's actually required, and we now suggest to achieve the required document ordering by arranging the order documents are indexed in.
  • Document what FixedWeightPostingSource is useful for as this doesn't seem obvious.
  • Improve DateRangeProcessor API documentation to cover the accepted date formats and how ambiguous cases are resolved.
  • Update references to 1.5.0 - the upcoming new release series will commence with 2.0.0.
  • Fix some typos in old NEWS entries and code comments.

tools:

  • quest: Add --stem-strategy option.
  • quest: List stemming languages in --help.
  • quest: List valid flags/query ops if an invalid one is specified.

portability:

  • Use close_range() to implement closefrom() on Android (available since NDK r34) and Cygwin (>= 3.5.0); we fallback to looping over possible fds if close_range() is not available at runtime.

debug code:

  • Fix build with '--enable-assertions=partial'.
  • Move an assertion that a pointer is not NULL to before where we dereference it.

comment:3 by Bruce Dubbs, 7 months ago

Resolution: → fixed
Status: assigned → closed

Fixed at commits

485075a366 Update to umockdev-0.19.5.
d362d5daef Update to xapian-core-1.4.31.
b386c9c93a Update to protobuf-34.0.
fb2915391b Add a patch to protobuf-c for compatibility with protobuf-34.0.0

comment:4 by Bruce Dubbs, 7 months ago

Resolution: fixed
Status: closed → reopened
Summary: xapian-core-1.4.31 → xapian-core-1.5.1

Now version 1.5.1.

comment:5 by Bruce Dubbs, 7 months ago

Resolution: → fixed
Status: reopened → closed
Summary: xapian-core-1.5.1 → xapian-core-1.4.31

Looking at the NEWS file it says:

This is a release candidate for 2.0.0, made available to encourage wider testing before a final release. It is versioned as 1.5.x in an attempt to reduce potential for misunderstandings. If all goes well the final release will be the same as this but with the version number updated. Incompatible changes are still possible, so please do not package this release candidate unless the packaging system has way to have a parallel version clearly marked as "experimental" or similar which users will have to opt-in to get.


Since we just updated to version 1.4.31, I'm moving the summary for this ticket back to that version and resolving as fixed.

Note: See TracTickets for help on using tickets.