Alexander Lind
2006-Jul-06 16:08 UTC
[Xapian-devel] Re: [XapianBug 84] Enquire_set_sort_by_value() and friends have no effect
ah, that explains it ... sorry to waste your time, im going to go sit in the corner for a while now :p is there a reason you have no numeric sort function? cheers alec bugzilla-daemon at ixion.tartarus.org wrote:> http://www.xapian.org/cgi-bin/bugzilla/show_bug.cgi?id=84 > > olly at survex.com changed: > > What |Removed |Added > ---------------------------------------------------------------------------- > Status|ASSIGNED |RESOLVED > Resolution| |INVALID > > > > ------- Additional Comments From olly at survex.com 2006-07-06 16:36 ------- > I've just taken a look. The example script is actually working correctly. > > You should note that the sort uses a *STRING* compare as documented here: > > http://www.xapian.org/docs/apidoc/html/classXapian_1_1Enquire.html#cc00543ba0459cc8ceca25e89fe69e19 > > So "100" < "20" < "3". > > I suspect you were expecting a numeric sort - if you want to sort numbers > you'll need to left pad them with zeros or spaces at present. > > > > ------- You are receiving this mail because: ------- > You reported the bug, or are watching the reporter. > >
richard at lemurconsulting.com
2006-Jul-06 16:38 UTC
[Xapian-devel] Re: [XapianBug 84] Enquire_set_sort_by_value() and friends have no effect
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 > > is there a reason you have no numeric sort function?Simply that no one has implemented it yet. 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. -- Richard