[Xapian-discuss] Patch to enable numeric sorting in Omega using scriptindex

Olly Betts olly at survex.com
Wed Apr 30 07:26:03 BST 2008


On Mon, Apr 28, 2008 at 01:49:05PM -0500, Yevgeny Binder wrote:
> On Apr 28, 2008, at 8:23 AM, Kevin Duraj wrote:
> 
> > How about performance ? Will the numeric sorting be faster then  
> > string sorting?
> 
> I'm still new to the code, but I'm pretty sure that the speed will be  
> unchanged. The sorting method itself remains the same -- the patch  
> only affects how the documents are indexed.

Yes, that's completely correct.

The same end result could also be achieved by using a Xapian::Sorter
subclass at search time, but that would probably be a little slower.
The encoding sortable_serialise() uses is carefully designed to be
very compact for common cases, so I/O is reduced.

The main benefits of using Xapian::Sorter are that you can sort by
dynamic combinations of values without having to precompute and index
all the possible combinations, and that you can sort by a metric which
simply can't be sanely precomputed at index time (like geographical
distance from a user-specified location).

> >> Could you regenerate the patch with "diff -u" and attach it to a new
> >> ticket in trac?
> 
> Done.

Thankyou!

Cheers,
    Olly



More information about the Xapian-discuss mailing list