[Xapian-discuss] Latest revision and backwards compatibility

Olly Betts olly at survex.com
Thu Jan 14 11:40:08 GMT 2010


On Thu, Jan 14, 2010 at 11:10:45AM +0200, henka at cityweb.co.za wrote:
> I've been wondering about the index format and backwards compatibility.
> 
> We're using the dev version (for chert) and each svn up means that any
> indexes created prior to this revision cannot be read.

That's incorrect.  The format of a "development" backend (which chert
currently is) may change incompatibly between releases, but this has only
happened twice so far in chert's history - see the comment in
chert_version.cc:

// 200804180       Chert debuts.
// 200903070 1.1.0 doclen bounds and wdf upper bound.
// 200912150 1.1.4 shorter position, postlist, record and termlist keys.

> Is this purely a
> cautious move to prevent errors, and, barring any obvious index format
> changes, can I safely force the current revision to read existing indexes?
>  eg, by commenting out the throw in
> xapian-core/backends/chert/chert_version.cc.

No - if we bump the version, there really has been an incompatible change.

> Or is there a better way?

I guess your last "svn update" spanned 2009-12-15?  For this particular
change there's a xapian-chert-update utility which can upgrade a database
for you with about the same efficiency as xapian-compact (and the result
is compacted too).

In general you can upgrade using copydatabase to flint before upgrading
and again back to chert afterwards - see here for details (though this
talks about flint and quartz):

http://xapian.org/docs/admin_notes#converting-a-0-9-x-flint-database-to-work-with-1-0-y

Cheers,
    Olly



More information about the Xapian-discuss mailing list