[Xapian-discuss] Fwd: Re: what is the fastest way to fetch results which are sorted by timestamp ?

Richard Boulton richard at tartarus.org
Thu Aug 11 10:18:19 BST 2011

On 11 August 2011 09:55, Tim Brody <tdb2 at ecs.soton.ac.uk> wrote:
> On Thu, 11 Aug 2011 09:04:33 +0100, Richard Boulton <richard at tartarus.org>
> I took that example from here:
> http://xapian.org/docs/apidoc/html/classXapian_1_1Enquire.html#bbf7ff734ff6adcb301e493f6eed803b
> Which says reverse-sorting by docid is "very efficient" ?

Hmm - I think that comment is referring to such sorting being
significantly more efficient than the alternative approach of storing
the timestamp in a slot and sorting on that slot.  However, it's still
much more efficient at search time to have the database in the
reversed order and sort by ascending docid; the penalty for that is
the difficulty of maintaining the database in reversed date order.


More information about the Xapian-discuss mailing list