On Mon, 14 Dec 2009 11:01:39 -0600, Michael McDermott <mcdermott.michaelj@gmail.com> wrote: > After running a search in Sup, is there any way to sort the result set? Or, > perhaps, specify the ordering in the query? (ala SQL) The Xapian database (which Sup uses optionally now and perhaps exclusively in the future) allows results to be sorted by anything stored in a "value" field of the documents. If I recall correctly, Sup is currently storing three things in "value" fields: 1. Message ID 2. Thread ID (which is Message ID of a representative message) 3. Date So it's quite easy to have Xapian return things based on an ordering of any one of those values (in either direction). And this does not require fetching all documents. Sorting on anything else would require either fetching all documents, (and doing the sort in the user-interface), or else storing an additional value for each document in the database. What is it that you actually want to sort on? -carl
Attachment:
pgpHhYglx6oFx.pgp
Description: PGP signature
_______________________________________________ sup-talk mailing list sup-talk@rubyforge.org http://rubyforge.org/mailman/listinfo/sup-talk