[Xesam] Sorting API to be more flexible
Mikkel Kamstrup Erlandsen
mikkel.kamstrup at gmail.com
Mon Jun 30 14:16:05 PDT 2008
2008/6/29 Arun Raghavan <arunisgod at gmail.com>:
> On Mon, Jun 30, 2008 at 1:53 AM, Mikkel Kamstrup Erlandsen
> <mikkel.kamstrup at gmail.com> wrote:
>> To be honest I didn't even think about that. I think that this may be
>> tricky to implement on some backends, I will have to check up on
>> sqlite, Lucene, and Xapian to verify this. I am also wondering about
>> the real usefulness of this feature. Do we have some concrete use
>> cases? Urho's original Artist, Album, Track# does not seem to require
>> this feature at least. Will think.
> Mainly, I see this being imporatant for cases where a character field
> and a date field are in sort.fields. For example, documents sorted
> newest first and then by title.
That is indeed a good use case. However I also think that it will "do
the right thing" by default without any needs to specify the sort
order, see http://xesam.org/main/XesamSearchAPI#sorting
As far as I can tell Lucene and SQLite should be able to do it very
easily. Xapian can do it too, but it will require some work (although
I am a bit unsure of how much).
Looking at that paragraph I figure there is something wrong with the
example in there. The numbers (int and float) are clearly ordered in
ascending order while the example states that it is in descending...
We should do something about this. How have people implemented this -
if anybody has done so yet?
More information about the Xesam