[Xapian-discuss] omindex doesn't check last_mod

richard at lemurconsulting.com richard at lemurconsulting.com
Mon Aug 7 23:16:06 BST 2006


On Mon, Aug 07, 2006 at 06:16:53PM +0100, James Aylett wrote:
> Because it's a little awkward, and no one has done it yet :-)

James' email covers what's involved pretty well - I'd just add that a third
approach would be to store the last mod times for documents in a separate
file - possibly even a flat file, where the 4 (or 8?) bytes holding a
timestamp are located at offset "<docid> * 4" - this could conceivably cut
down IO when looking up the modification times, and would not be referenced
at all at search time, so there would be no risk of slowing that down by
storing unused information in the database. (Of course, you'd still have to
look up the document ID in the xapian database given the unique ID.)

Experiment is the best (only?) approach to work out what actually works in
practice.

> It probably needs an option to override this, in case atime gets
> mangled for some reason (restore from backup, for instance).

Definitely.

-- 
Richard



More information about the Xapian-discuss mailing list