[Xapian-discuss] sort by value fails
Olly Betts
olly at survex.com
Thu Sep 11 15:32:06 BST 2008
On Thu, Sep 11, 2008 at 02:47:21PM +0100, James Aylett wrote:
> On Thu, Sep 11, 2008 at 03:44:35PM +0200, Dr.BYTE at web.de wrote:
>
> > thank you for your reply. if i see correctly, i will have to write a
> > serializer method which converts è to e and Ö to Oe and so far.
> > is it possible, that sort by value cannot sort floats correctly,
> > too? i never workt with C, so i dont know how memcmp compares
> > floats.
>
> You want to serialise floats as well.
There is a public API pair for this exact purpose:
Xapian::sortable_serialise()
Xapian::sortable_unserialise()
> There's a serialise_double/unserialise_double pair in Xapian, but I
> believe it's not accessible externally. However you could reuse the
> code.
No, those functions aren't suitable, as they don't preserve the sort
order.
Cheers,
Olly
More information about the Xapian-discuss
mailing list