[Xapian-devel] Re: [XapianBug 84] Enquire_set_sort_by_value() and
friends have no effect
Olly Betts
olly at survex.com
Thu Jul 6 18:01:18 BST 2006
On Thu, Jul 06, 2006 at 05:38:28PM +0100, richard at lemurconsulting.com wrote:
> On Thu, Jul 06, 2006 at 09:08:10AM -0700, Alexander Lind wrote:
> > ah, that explains it ... sorry to waste your time, im going to go sit in
> > the corner for a while now :p
Don't worry, it was sufficiently unobvious that it took me a while to
spot what was happening.
> > is there a reason you have no numeric sort function?
>
> Simply that no one has implemented it yet.
Partly that was due to the combinatorial explosion of comparison
functions that would result, but with the new template based code in
msetcmp.cc that's less of a problem.
> If you wish to try making a patch, the relevant code is in
> matcher/msetcmp.cc, and you'd need to make some kind of suitable API.
It might be nice to be able to specify a comparison functor (in a
similar way to how the MatchDecider class works). A simple byte
value ordered string compare is a sane default, but there are lots
of ways you might want to sort other than that and we can't hard
code all of them.
Cheers,
Olly
More information about the Xapian-devel
mailing list